curl --request POST \
--url https://api.example.com/checkout/{id} \
--header 'Content-Type: application/json' \
--data '
{
"cardNumber": "4111111111111111",
"expiration": "122025",
"CVC": "123",
"paymentMethod": "card",
"cardHolderName": "Juan Perez",
"cardHolderEmail": "juan.perez@example.com"
}
'import requests
url = "https://api.example.com/checkout/{id}"
payload = {
"cardNumber": "4111111111111111",
"expiration": "122025",
"CVC": "123",
"paymentMethod": "card",
"cardHolderName": "Juan Perez",
"cardHolderEmail": "juan.perez@example.com"
}
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({
cardNumber: '4111111111111111',
expiration: '122025',
CVC: '123',
paymentMethod: 'card',
cardHolderName: 'Juan Perez',
cardHolderEmail: 'juan.perez@example.com'
})
};
fetch('https://api.example.com/checkout/{id}', 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/{id}",
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([
'cardNumber' => '4111111111111111',
'expiration' => '122025',
'CVC' => '123',
'paymentMethod' => 'card',
'cardHolderName' => 'Juan Perez',
'cardHolderEmail' => 'juan.perez@example.com'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json"
],
]);
$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/{id}"
payload := strings.NewReader("{\n \"cardNumber\": \"4111111111111111\",\n \"expiration\": \"122025\",\n \"CVC\": \"123\",\n \"paymentMethod\": \"card\",\n \"cardHolderName\": \"Juan Perez\",\n \"cardHolderEmail\": \"juan.perez@example.com\"\n}")
req, _ := http.NewRequest("POST", url, payload)
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/{id}")
.header("Content-Type", "application/json")
.body("{\n \"cardNumber\": \"4111111111111111\",\n \"expiration\": \"122025\",\n \"CVC\": \"123\",\n \"paymentMethod\": \"card\",\n \"cardHolderName\": \"Juan Perez\",\n \"cardHolderEmail\": \"juan.perez@example.com\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/checkout/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"cardNumber\": \"4111111111111111\",\n \"expiration\": \"122025\",\n \"CVC\": \"123\",\n \"paymentMethod\": \"card\",\n \"cardHolderName\": \"Juan Perez\",\n \"cardHolderEmail\": \"juan.perez@example.com\"\n}"
response = http.request(request)
puts response.read_body{
"success": true
}{
"message": "<string>"
}{
"message": "<string>"
}Submit payment details for a checkout
Submits card, Google Pay or Apple Pay payment details to process a previously created checkout. This initiates the payment flow which may include 3D Secure authentication.
curl --request POST \
--url https://api.example.com/checkout/{id} \
--header 'Content-Type: application/json' \
--data '
{
"cardNumber": "4111111111111111",
"expiration": "122025",
"CVC": "123",
"paymentMethod": "card",
"cardHolderName": "Juan Perez",
"cardHolderEmail": "juan.perez@example.com"
}
'import requests
url = "https://api.example.com/checkout/{id}"
payload = {
"cardNumber": "4111111111111111",
"expiration": "122025",
"CVC": "123",
"paymentMethod": "card",
"cardHolderName": "Juan Perez",
"cardHolderEmail": "juan.perez@example.com"
}
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({
cardNumber: '4111111111111111',
expiration: '122025',
CVC: '123',
paymentMethod: 'card',
cardHolderName: 'Juan Perez',
cardHolderEmail: 'juan.perez@example.com'
})
};
fetch('https://api.example.com/checkout/{id}', 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/{id}",
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([
'cardNumber' => '4111111111111111',
'expiration' => '122025',
'CVC' => '123',
'paymentMethod' => 'card',
'cardHolderName' => 'Juan Perez',
'cardHolderEmail' => 'juan.perez@example.com'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json"
],
]);
$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/{id}"
payload := strings.NewReader("{\n \"cardNumber\": \"4111111111111111\",\n \"expiration\": \"122025\",\n \"CVC\": \"123\",\n \"paymentMethod\": \"card\",\n \"cardHolderName\": \"Juan Perez\",\n \"cardHolderEmail\": \"juan.perez@example.com\"\n}")
req, _ := http.NewRequest("POST", url, payload)
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/{id}")
.header("Content-Type", "application/json")
.body("{\n \"cardNumber\": \"4111111111111111\",\n \"expiration\": \"122025\",\n \"CVC\": \"123\",\n \"paymentMethod\": \"card\",\n \"cardHolderName\": \"Juan Perez\",\n \"cardHolderEmail\": \"juan.perez@example.com\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/checkout/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"cardNumber\": \"4111111111111111\",\n \"expiration\": \"122025\",\n \"CVC\": \"123\",\n \"paymentMethod\": \"card\",\n \"cardHolderName\": \"Juan Perez\",\n \"cardHolderEmail\": \"juan.perez@example.com\"\n}"
response = http.request(request)
puts response.read_body{
"success": true
}{
"message": "<string>"
}{
"message": "<string>"
}Path Parameters
The unique identifier of the checkout
"550e8400-e29b-41d4-a716-446655440000"
Body
Card, Google Pay or Apple Pay payment details
- Option 1
- Option 2
- Option 3
Credit/debit card number without spaces or dashes
"4111111111111111"
Card expiration date in MMYYYY format
6"122025"
Card verification code (3 or 4 digits)
"123"
Pay with card details entered by the customer. Defaults to card when omitted.
card Card holder name as the customer entered it, forwarded to Azul for dispute evidence
1"Juan Perez"
Card holder email as the customer entered it, forwarded to Azul for dispute evidence
"juan.perez@example.com"
Display and runtime facts the checkout page reads from the cardholder browser, forwarded to Azul as part of BrowserInfo for 3D Secure risk analysis
Show child attributes
Show child attributes
Response
Payment details received. The outcome comes from GET /checkout/{id}, also when the outcome of the sale is not yet known.
Indicates the payment details were received. The payment outcome comes from GET /checkout/{id}.
true