curl --request POST \
--url https://api.example.com/checkout \
--header 'Content-Type: application/json' \
--header 'x-hub-signature: <api-key>' \
--data '
{
"amount": 10000,
"ITBIS": 1800,
"metadata": "order-12345",
"webhookURL": "https://example.com/webhooks/payment",
"forceNo3DS": false,
"currency": "DOP",
"statementDescriptor": "RAPIDOTICKETS BOLETAS",
"items": [
{
"product": {
"externalId": "ticket-type-vip",
"name": "Concierto X, VIP"
},
"quantity": 2,
"unitPrice": {
"amount": 5000,
"currency": "DOP"
}
}
]
}
'import requests
url = "https://api.example.com/checkout"
payload = {
"amount": 10000,
"ITBIS": 1800,
"metadata": "order-12345",
"webhookURL": "https://example.com/webhooks/payment",
"forceNo3DS": False,
"currency": "DOP",
"statementDescriptor": "RAPIDOTICKETS BOLETAS",
"items": [
{
"product": {
"externalId": "ticket-type-vip",
"name": "Concierto X, VIP"
},
"quantity": 2,
"unitPrice": {
"amount": 5000,
"currency": "DOP"
}
}
]
}
headers = {
"x-hub-signature": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'x-hub-signature': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
amount: 10000,
ITBIS: 1800,
metadata: 'order-12345',
webhookURL: 'https://example.com/webhooks/payment',
forceNo3DS: false,
currency: 'DOP',
statementDescriptor: 'RAPIDOTICKETS BOLETAS',
items: [
{
product: {externalId: 'ticket-type-vip', name: 'Concierto X, VIP'},
quantity: 2,
unitPrice: {amount: 5000, currency: 'DOP'}
}
]
})
};
fetch('https://api.example.com/checkout', 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.example.com/checkout",
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' => 10000,
'ITBIS' => 1800,
'metadata' => 'order-12345',
'webhookURL' => 'https://example.com/webhooks/payment',
'forceNo3DS' => false,
'currency' => 'DOP',
'statementDescriptor' => 'RAPIDOTICKETS BOLETAS',
'items' => [
[
'product' => [
'externalId' => 'ticket-type-vip',
'name' => 'Concierto X, VIP'
],
'quantity' => 2,
'unitPrice' => [
'amount' => 5000,
'currency' => 'DOP'
]
]
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"x-hub-signature: <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.example.com/checkout"
payload := strings.NewReader("{\n \"amount\": 10000,\n \"ITBIS\": 1800,\n \"metadata\": \"order-12345\",\n \"webhookURL\": \"https://example.com/webhooks/payment\",\n \"forceNo3DS\": false,\n \"currency\": \"DOP\",\n \"statementDescriptor\": \"RAPIDOTICKETS BOLETAS\",\n \"items\": [\n {\n \"product\": {\n \"externalId\": \"ticket-type-vip\",\n \"name\": \"Concierto X, VIP\"\n },\n \"quantity\": 2,\n \"unitPrice\": {\n \"amount\": 5000,\n \"currency\": \"DOP\"\n }\n }\n ]\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("x-hub-signature", "<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.example.com/checkout")
.header("x-hub-signature", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"amount\": 10000,\n \"ITBIS\": 1800,\n \"metadata\": \"order-12345\",\n \"webhookURL\": \"https://example.com/webhooks/payment\",\n \"forceNo3DS\": false,\n \"currency\": \"DOP\",\n \"statementDescriptor\": \"RAPIDOTICKETS BOLETAS\",\n \"items\": [\n {\n \"product\": {\n \"externalId\": \"ticket-type-vip\",\n \"name\": \"Concierto X, VIP\"\n },\n \"quantity\": 2,\n \"unitPrice\": {\n \"amount\": 5000,\n \"currency\": \"DOP\"\n }\n }\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/checkout")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["x-hub-signature"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"amount\": 10000,\n \"ITBIS\": 1800,\n \"metadata\": \"order-12345\",\n \"webhookURL\": \"https://example.com/webhooks/payment\",\n \"forceNo3DS\": false,\n \"currency\": \"DOP\",\n \"statementDescriptor\": \"RAPIDOTICKETS BOLETAS\",\n \"items\": [\n {\n \"product\": {\n \"externalId\": \"ticket-type-vip\",\n \"name\": \"Concierto X, VIP\"\n },\n \"quantity\": 2,\n \"unitPrice\": {\n \"amount\": 5000,\n \"currency\": \"DOP\"\n }\n }\n ]\n}"
response = http.request(request)
puts response.read_body{
"id": "550e8400-e29b-41d4-a716-446655440000"
}{
"message": "<string>"
}{
"message": "<string>"
}Create a new checkout
Creates a new checkout that can be used to process a card payment. The checkout must be paid using the pay endpoint before it expires.
curl --request POST \
--url https://api.example.com/checkout \
--header 'Content-Type: application/json' \
--header 'x-hub-signature: <api-key>' \
--data '
{
"amount": 10000,
"ITBIS": 1800,
"metadata": "order-12345",
"webhookURL": "https://example.com/webhooks/payment",
"forceNo3DS": false,
"currency": "DOP",
"statementDescriptor": "RAPIDOTICKETS BOLETAS",
"items": [
{
"product": {
"externalId": "ticket-type-vip",
"name": "Concierto X, VIP"
},
"quantity": 2,
"unitPrice": {
"amount": 5000,
"currency": "DOP"
}
}
]
}
'import requests
url = "https://api.example.com/checkout"
payload = {
"amount": 10000,
"ITBIS": 1800,
"metadata": "order-12345",
"webhookURL": "https://example.com/webhooks/payment",
"forceNo3DS": False,
"currency": "DOP",
"statementDescriptor": "RAPIDOTICKETS BOLETAS",
"items": [
{
"product": {
"externalId": "ticket-type-vip",
"name": "Concierto X, VIP"
},
"quantity": 2,
"unitPrice": {
"amount": 5000,
"currency": "DOP"
}
}
]
}
headers = {
"x-hub-signature": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'x-hub-signature': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
amount: 10000,
ITBIS: 1800,
metadata: 'order-12345',
webhookURL: 'https://example.com/webhooks/payment',
forceNo3DS: false,
currency: 'DOP',
statementDescriptor: 'RAPIDOTICKETS BOLETAS',
items: [
{
product: {externalId: 'ticket-type-vip', name: 'Concierto X, VIP'},
quantity: 2,
unitPrice: {amount: 5000, currency: 'DOP'}
}
]
})
};
fetch('https://api.example.com/checkout', 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.example.com/checkout",
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' => 10000,
'ITBIS' => 1800,
'metadata' => 'order-12345',
'webhookURL' => 'https://example.com/webhooks/payment',
'forceNo3DS' => false,
'currency' => 'DOP',
'statementDescriptor' => 'RAPIDOTICKETS BOLETAS',
'items' => [
[
'product' => [
'externalId' => 'ticket-type-vip',
'name' => 'Concierto X, VIP'
],
'quantity' => 2,
'unitPrice' => [
'amount' => 5000,
'currency' => 'DOP'
]
]
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"x-hub-signature: <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.example.com/checkout"
payload := strings.NewReader("{\n \"amount\": 10000,\n \"ITBIS\": 1800,\n \"metadata\": \"order-12345\",\n \"webhookURL\": \"https://example.com/webhooks/payment\",\n \"forceNo3DS\": false,\n \"currency\": \"DOP\",\n \"statementDescriptor\": \"RAPIDOTICKETS BOLETAS\",\n \"items\": [\n {\n \"product\": {\n \"externalId\": \"ticket-type-vip\",\n \"name\": \"Concierto X, VIP\"\n },\n \"quantity\": 2,\n \"unitPrice\": {\n \"amount\": 5000,\n \"currency\": \"DOP\"\n }\n }\n ]\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("x-hub-signature", "<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.example.com/checkout")
.header("x-hub-signature", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"amount\": 10000,\n \"ITBIS\": 1800,\n \"metadata\": \"order-12345\",\n \"webhookURL\": \"https://example.com/webhooks/payment\",\n \"forceNo3DS\": false,\n \"currency\": \"DOP\",\n \"statementDescriptor\": \"RAPIDOTICKETS BOLETAS\",\n \"items\": [\n {\n \"product\": {\n \"externalId\": \"ticket-type-vip\",\n \"name\": \"Concierto X, VIP\"\n },\n \"quantity\": 2,\n \"unitPrice\": {\n \"amount\": 5000,\n \"currency\": \"DOP\"\n }\n }\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/checkout")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["x-hub-signature"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"amount\": 10000,\n \"ITBIS\": 1800,\n \"metadata\": \"order-12345\",\n \"webhookURL\": \"https://example.com/webhooks/payment\",\n \"forceNo3DS\": false,\n \"currency\": \"DOP\",\n \"statementDescriptor\": \"RAPIDOTICKETS BOLETAS\",\n \"items\": [\n {\n \"product\": {\n \"externalId\": \"ticket-type-vip\",\n \"name\": \"Concierto X, VIP\"\n },\n \"quantity\": 2,\n \"unitPrice\": {\n \"amount\": 5000,\n \"currency\": \"DOP\"\n }\n }\n ]\n}"
response = http.request(request)
puts response.read_body{
"id": "550e8400-e29b-41d4-a716-446655440000"
}{
"message": "<string>"
}{
"message": "<string>"
}Authorizations
HMAC-SHA256 hex digest keyed with the shared secret: over the raw request body for POST requests, or over the query string (the characters after "?") for GET requests. The signed query string is the one the WHATWG URL parser serializes, so a query built with URLSearchParams and appended unchanged verifies, while a hand-assembled query must be percent-encoded the same way.
Body
Checkout configuration
Payment amount in cents
x >= 110000
Tax amount (ITBIS) in cents
x >= 01800
Optional metadata to associate with the checkout
"order-12345"
URL to receive payment status webhook notifications
"https://example.com/webhooks/payment"
Skip 3D Secure authentication (use with caution)
false
ISO 4217 currency of amount and ITBIS. The card is always charged in Dominican pesos, so a USD checkout is converted at the exchange rate current when the checkout is created.
DOP, USD "DOP"
What the cardholder sees on their statement, sent to Azul as AltMerchantName. At most 25 characters, with no quotes or backslashes.
1 - 25"RAPIDOTICKETS BOLETAS"
Who is paying. Creates the customer on first use and updates its details on later checkouts.
Show child attributes
Show child attributes
What is being sold. Each product is created on first use and renamed on later checkouts. The items must add up to amount.
1Show child attributes
Show child attributes
Response
Successfully created checkout
Unique identifier for the created checkout
"550e8400-e29b-41d4-a716-446655440000"