Create payin
curl --request POST \
--url https://api.vitawallet.io/api/businesses/payment_orders \
--header 'Authorization: <api-key>' \
--header 'Content-Type: application/json' \
--header 'x-date: <api-key>' \
--header 'x-login: <api-key>' \
--header 'x-trans-key: <api-key>' \
--data '
{
"amount": 100000,
"country_iso_code": "MX",
"issue": "This is a test",
"success_redirect_url": "https://www.google.com/success",
"cancel_redirect_url": "https://www.google.com/cancel",
"error_redirect_url": "https://www.google.com/error",
"pending_redirect_url": "https://www.google.com/pending"
}
'import requests
url = "https://api.vitawallet.io/api/businesses/payment_orders"
payload = {
"amount": 100000,
"country_iso_code": "MX",
"issue": "This is a test",
"success_redirect_url": "https://www.google.com/success",
"cancel_redirect_url": "https://www.google.com/cancel",
"error_redirect_url": "https://www.google.com/error",
"pending_redirect_url": "https://www.google.com/pending"
}
headers = {
"x-login": "<api-key>",
"x-trans-key": "<api-key>",
"x-date": "<api-key>",
"Authorization": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {
'x-login': '<api-key>',
'x-trans-key': '<api-key>',
'x-date': '<api-key>',
Authorization: '<api-key>',
'Content-Type': 'application/json'
},
body: JSON.stringify({
amount: 100000,
country_iso_code: 'MX',
issue: 'This is a test',
success_redirect_url: 'https://www.google.com/success',
cancel_redirect_url: 'https://www.google.com/cancel',
error_redirect_url: 'https://www.google.com/error',
pending_redirect_url: 'https://www.google.com/pending'
})
};
fetch('https://api.vitawallet.io/api/businesses/payment_orders', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.vitawallet.io/api/businesses/payment_orders",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'amount' => 100000,
'country_iso_code' => 'MX',
'issue' => 'This is a test',
'success_redirect_url' => 'https://www.google.com/success',
'cancel_redirect_url' => 'https://www.google.com/cancel',
'error_redirect_url' => 'https://www.google.com/error',
'pending_redirect_url' => 'https://www.google.com/pending'
]),
CURLOPT_HTTPHEADER => [
"Authorization: <api-key>",
"Content-Type: application/json",
"x-date: <api-key>",
"x-login: <api-key>",
"x-trans-key: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.vitawallet.io/api/businesses/payment_orders"
payload := strings.NewReader("{\n \"amount\": 100000,\n \"country_iso_code\": \"MX\",\n \"issue\": \"This is a test\",\n \"success_redirect_url\": \"https://www.google.com/success\",\n \"cancel_redirect_url\": \"https://www.google.com/cancel\",\n \"error_redirect_url\": \"https://www.google.com/error\",\n \"pending_redirect_url\": \"https://www.google.com/pending\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("x-login", "<api-key>")
req.Header.Add("x-trans-key", "<api-key>")
req.Header.Add("x-date", "<api-key>")
req.Header.Add("Authorization", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.vitawallet.io/api/businesses/payment_orders")
.header("x-login", "<api-key>")
.header("x-trans-key", "<api-key>")
.header("x-date", "<api-key>")
.header("Authorization", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"amount\": 100000,\n \"country_iso_code\": \"MX\",\n \"issue\": \"This is a test\",\n \"success_redirect_url\": \"https://www.google.com/success\",\n \"cancel_redirect_url\": \"https://www.google.com/cancel\",\n \"error_redirect_url\": \"https://www.google.com/error\",\n \"pending_redirect_url\": \"https://www.google.com/pending\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.vitawallet.io/api/businesses/payment_orders")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["x-login"] = '<api-key>'
request["x-trans-key"] = '<api-key>'
request["x-date"] = '<api-key>'
request["Authorization"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"amount\": 100000,\n \"country_iso_code\": \"MX\",\n \"issue\": \"This is a test\",\n \"success_redirect_url\": \"https://www.google.com/success\",\n \"cancel_redirect_url\": \"https://www.google.com/cancel\",\n \"error_redirect_url\": \"https://www.google.com/error\",\n \"pending_redirect_url\": \"https://www.google.com/pending\"\n}"
response = http.request(request)
puts response.read_body{
"data": {
"id": 11,
"type": "payment_order",
"attributes": {
"public_code": "bd20882d-455b-4ide-9d1d-d2afi850c27f",
"issue": "This is a test",
"status": "pending",
"success_redirect_url": "https://www.google.com/success",
"cancel_redirect_url": "https://www.google.com/cancel",
"error_redirect_url": "https://www.google.com/error",
"pending_redirect_url": "https://www.google.com/pending",
"currency_destiny": {
"iso_code": "USD",
"singular_name": "Dólar estadounidense",
"plural_name": "Dólares estadounidenses"
},
"source_currency": {
"iso_code": "ARS",
"singular_name": "Peso argentino",
"plural_name": "Pesos argentinos"
},
"country": {
"iso_code": "AR",
"name": "Argentina",
"default_currency": {
"iso_code": "ARS",
"singular_name": "Peso argentino",
"plural_name": "Pesos argentinos"
}
},
"amount": 10000,
"url": "https://app.vitawallet.io/s/uwN88",
"expires_at": "2026-10-05T14:22:06Z",
"created_at": "2026-10-05T13:22:06Z",
"paid_at": null,
"paid_attempt": null
}
}
}Create Payin
Create payin
Please use this endpoint to create a new payment order. Upon successful creation, you will receive a detailed response containing the data of the new payment order, along with a URL. This URL can be utilized to proceed with payment through one of the providers configured for your account. If a webhook URL is configured for your account, you will automatically receive a webhook notification once the order has been paid.
Note: For more information about webhooks please go to the Webhooks Section.
Structure
| Field | Description |
|---|---|
currency_destiny | Indicates the ISO currency code in which the owner of the payment link will receive the funds. Example: COP, USD, USDT, USDC, |
is_receive | If true → The amount represents the value that the owner of the payment link will receive (in their configured currency). If false → The amount represents the value that the customer will pay in their local currency. |
amount | Amount in the local currency of the destination country for the payment order. |
country_iso_code | ISO code for the destination country. |
issue | Issue for the payment order. |
success_redirect_url | URL to redirect in case of success. When the payment is successful, the flow will be redirected to this URL. |
cancel_redirect_url | URL to redirect in case of cancel. If the end customer decides not to proceed with the payment, they will be redirected to this URL and the payment link will remain in pending status. |
error_redirect_url | URL to redirect in case of error. If the provider throws an error, you will be redirected to this URL and the payment link will remain in pending status. |
pending_redirect_url | URL to redirect in case of pending. You will be redirected to this URL if the supplier has not yet responded to us regarding the payment. NOTE: You can perform long polling on the endpoint that allows you to check the status of a payment attempt. |
POST
/
api
/
businesses
/
payment_orders
Create payin
curl --request POST \
--url https://api.vitawallet.io/api/businesses/payment_orders \
--header 'Authorization: <api-key>' \
--header 'Content-Type: application/json' \
--header 'x-date: <api-key>' \
--header 'x-login: <api-key>' \
--header 'x-trans-key: <api-key>' \
--data '
{
"amount": 100000,
"country_iso_code": "MX",
"issue": "This is a test",
"success_redirect_url": "https://www.google.com/success",
"cancel_redirect_url": "https://www.google.com/cancel",
"error_redirect_url": "https://www.google.com/error",
"pending_redirect_url": "https://www.google.com/pending"
}
'import requests
url = "https://api.vitawallet.io/api/businesses/payment_orders"
payload = {
"amount": 100000,
"country_iso_code": "MX",
"issue": "This is a test",
"success_redirect_url": "https://www.google.com/success",
"cancel_redirect_url": "https://www.google.com/cancel",
"error_redirect_url": "https://www.google.com/error",
"pending_redirect_url": "https://www.google.com/pending"
}
headers = {
"x-login": "<api-key>",
"x-trans-key": "<api-key>",
"x-date": "<api-key>",
"Authorization": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {
'x-login': '<api-key>',
'x-trans-key': '<api-key>',
'x-date': '<api-key>',
Authorization: '<api-key>',
'Content-Type': 'application/json'
},
body: JSON.stringify({
amount: 100000,
country_iso_code: 'MX',
issue: 'This is a test',
success_redirect_url: 'https://www.google.com/success',
cancel_redirect_url: 'https://www.google.com/cancel',
error_redirect_url: 'https://www.google.com/error',
pending_redirect_url: 'https://www.google.com/pending'
})
};
fetch('https://api.vitawallet.io/api/businesses/payment_orders', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.vitawallet.io/api/businesses/payment_orders",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'amount' => 100000,
'country_iso_code' => 'MX',
'issue' => 'This is a test',
'success_redirect_url' => 'https://www.google.com/success',
'cancel_redirect_url' => 'https://www.google.com/cancel',
'error_redirect_url' => 'https://www.google.com/error',
'pending_redirect_url' => 'https://www.google.com/pending'
]),
CURLOPT_HTTPHEADER => [
"Authorization: <api-key>",
"Content-Type: application/json",
"x-date: <api-key>",
"x-login: <api-key>",
"x-trans-key: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.vitawallet.io/api/businesses/payment_orders"
payload := strings.NewReader("{\n \"amount\": 100000,\n \"country_iso_code\": \"MX\",\n \"issue\": \"This is a test\",\n \"success_redirect_url\": \"https://www.google.com/success\",\n \"cancel_redirect_url\": \"https://www.google.com/cancel\",\n \"error_redirect_url\": \"https://www.google.com/error\",\n \"pending_redirect_url\": \"https://www.google.com/pending\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("x-login", "<api-key>")
req.Header.Add("x-trans-key", "<api-key>")
req.Header.Add("x-date", "<api-key>")
req.Header.Add("Authorization", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.vitawallet.io/api/businesses/payment_orders")
.header("x-login", "<api-key>")
.header("x-trans-key", "<api-key>")
.header("x-date", "<api-key>")
.header("Authorization", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"amount\": 100000,\n \"country_iso_code\": \"MX\",\n \"issue\": \"This is a test\",\n \"success_redirect_url\": \"https://www.google.com/success\",\n \"cancel_redirect_url\": \"https://www.google.com/cancel\",\n \"error_redirect_url\": \"https://www.google.com/error\",\n \"pending_redirect_url\": \"https://www.google.com/pending\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.vitawallet.io/api/businesses/payment_orders")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["x-login"] = '<api-key>'
request["x-trans-key"] = '<api-key>'
request["x-date"] = '<api-key>'
request["Authorization"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"amount\": 100000,\n \"country_iso_code\": \"MX\",\n \"issue\": \"This is a test\",\n \"success_redirect_url\": \"https://www.google.com/success\",\n \"cancel_redirect_url\": \"https://www.google.com/cancel\",\n \"error_redirect_url\": \"https://www.google.com/error\",\n \"pending_redirect_url\": \"https://www.google.com/pending\"\n}"
response = http.request(request)
puts response.read_body{
"data": {
"id": 11,
"type": "payment_order",
"attributes": {
"public_code": "bd20882d-455b-4ide-9d1d-d2afi850c27f",
"issue": "This is a test",
"status": "pending",
"success_redirect_url": "https://www.google.com/success",
"cancel_redirect_url": "https://www.google.com/cancel",
"error_redirect_url": "https://www.google.com/error",
"pending_redirect_url": "https://www.google.com/pending",
"currency_destiny": {
"iso_code": "USD",
"singular_name": "Dólar estadounidense",
"plural_name": "Dólares estadounidenses"
},
"source_currency": {
"iso_code": "ARS",
"singular_name": "Peso argentino",
"plural_name": "Pesos argentinos"
},
"country": {
"iso_code": "AR",
"name": "Argentina",
"default_currency": {
"iso_code": "ARS",
"singular_name": "Peso argentino",
"plural_name": "Pesos argentinos"
}
},
"amount": 10000,
"url": "https://app.vitawallet.io/s/uwN88",
"expires_at": "2026-10-05T14:22:06Z",
"created_at": "2026-10-05T13:22:06Z",
"paid_at": null,
"paid_attempt": null
}
}
}Authorizations
Body
application/json
The body is of type object.
Response
Resource created successfully.