curl --request POST \
--url https://payment-gw.production-mainnet.atum.xyz/x402/v1/settle \
--header 'Content-Type: application/json' \
--data '
{
"x402Version": 2,
"paymentPayload": {
"x402Version": 2,
"accepted": {
"scheme": "atum-escrow",
"network": "<string>",
"asset": "<string>",
"payTo": "<string>",
"amount": "<string>",
"maxTimeoutSeconds": 2,
"extra": {
"atum": {}
}
},
"payload": {
"paymentRequest": {
"version": "<string>",
"request_id": "<string>",
"source": {
"asset_identifier": "<string>",
"account": "<string>"
},
"destination": [
{
"asset_identifier": "<string>",
"account": "<string>"
}
],
"fulfillment_amount": "<string>",
"max_source_amount": "<string>",
"quote_deadline": "2023-11-07T05:31:56Z",
"fulfillment_deadline": "2023-11-07T05:31:56Z",
"sender_auth": {
"signed_messages": [
{
"message": "<string>",
"signature": "<string>",
"message_prehash": "<unknown>"
}
]
}
}
},
"extensions": {
"payment-identifier": {
"info": {
"required": true,
"id": "<string>"
}
}
}
},
"paymentRequirements": {
"scheme": "atum-escrow",
"network": "<string>",
"asset": "<string>",
"payTo": "<string>",
"amount": "<string>",
"maxTimeoutSeconds": 2,
"extra": {
"atum": {
"destination": {
"network": "<string>",
"asset": "<string>",
"address": "<string>"
},
"fulfillmentAmount": "<string>",
"escrow": "<string>",
"fulfillmentProxy": "<string>",
"reserver": "<string>",
"releaser": "<string>",
"fulfillmentVerifierEndpoint": "<string>",
"quoteDeadlineSeconds": 2,
"fulfillmentDeadlineSeconds": 2,
"svmSignatureClusterId": "<string>",
"svmSignatureDomainVersion": 128
}
}
}
}
'import requests
url = "https://payment-gw.production-mainnet.atum.xyz/x402/v1/settle"
payload = {
"x402Version": 2,
"paymentPayload": {
"x402Version": 2,
"accepted": {
"scheme": "atum-escrow",
"network": "<string>",
"asset": "<string>",
"payTo": "<string>",
"amount": "<string>",
"maxTimeoutSeconds": 2,
"extra": { "atum": {} }
},
"payload": { "paymentRequest": {
"version": "<string>",
"request_id": "<string>",
"source": {
"asset_identifier": "<string>",
"account": "<string>"
},
"destination": [
{
"asset_identifier": "<string>",
"account": "<string>"
}
],
"fulfillment_amount": "<string>",
"max_source_amount": "<string>",
"quote_deadline": "2023-11-07T05:31:56Z",
"fulfillment_deadline": "2023-11-07T05:31:56Z",
"sender_auth": { "signed_messages": [
{
"message": "<string>",
"signature": "<string>",
"message_prehash": "<unknown>"
}
] }
} },
"extensions": { "payment-identifier": { "info": {
"required": True,
"id": "<string>"
} } }
},
"paymentRequirements": {
"scheme": "atum-escrow",
"network": "<string>",
"asset": "<string>",
"payTo": "<string>",
"amount": "<string>",
"maxTimeoutSeconds": 2,
"extra": { "atum": {
"destination": {
"network": "<string>",
"asset": "<string>",
"address": "<string>"
},
"fulfillmentAmount": "<string>",
"escrow": "<string>",
"fulfillmentProxy": "<string>",
"reserver": "<string>",
"releaser": "<string>",
"fulfillmentVerifierEndpoint": "<string>",
"quoteDeadlineSeconds": 2,
"fulfillmentDeadlineSeconds": 2,
"svmSignatureClusterId": "<string>",
"svmSignatureDomainVersion": 128
} }
}
}
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({
x402Version: 2,
paymentPayload: {
x402Version: 2,
accepted: {
scheme: 'atum-escrow',
network: '<string>',
asset: '<string>',
payTo: '<string>',
amount: '<string>',
maxTimeoutSeconds: 2,
extra: {atum: {}}
},
payload: {
paymentRequest: {
version: '<string>',
request_id: '<string>',
source: {asset_identifier: '<string>', account: '<string>'},
destination: [{asset_identifier: '<string>', account: '<string>'}],
fulfillment_amount: '<string>',
max_source_amount: '<string>',
quote_deadline: '2023-11-07T05:31:56Z',
fulfillment_deadline: '2023-11-07T05:31:56Z',
sender_auth: {
signed_messages: [{message: '<string>', signature: '<string>', message_prehash: '<unknown>'}]
}
}
},
extensions: {'payment-identifier': {info: {required: true, id: '<string>'}}}
},
paymentRequirements: {
scheme: 'atum-escrow',
network: '<string>',
asset: '<string>',
payTo: '<string>',
amount: '<string>',
maxTimeoutSeconds: 2,
extra: {
atum: {
destination: {network: '<string>', asset: '<string>', address: '<string>'},
fulfillmentAmount: '<string>',
escrow: '<string>',
fulfillmentProxy: '<string>',
reserver: '<string>',
releaser: '<string>',
fulfillmentVerifierEndpoint: '<string>',
quoteDeadlineSeconds: 2,
fulfillmentDeadlineSeconds: 2,
svmSignatureClusterId: '<string>',
svmSignatureDomainVersion: 128
}
}
}
})
};
fetch('https://payment-gw.production-mainnet.atum.xyz/x402/v1/settle', 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://payment-gw.production-mainnet.atum.xyz/x402/v1/settle",
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([
'x402Version' => 2,
'paymentPayload' => [
'x402Version' => 2,
'accepted' => [
'scheme' => 'atum-escrow',
'network' => '<string>',
'asset' => '<string>',
'payTo' => '<string>',
'amount' => '<string>',
'maxTimeoutSeconds' => 2,
'extra' => [
'atum' => [
]
]
],
'payload' => [
'paymentRequest' => [
'version' => '<string>',
'request_id' => '<string>',
'source' => [
'asset_identifier' => '<string>',
'account' => '<string>'
],
'destination' => [
[
'asset_identifier' => '<string>',
'account' => '<string>'
]
],
'fulfillment_amount' => '<string>',
'max_source_amount' => '<string>',
'quote_deadline' => '2023-11-07T05:31:56Z',
'fulfillment_deadline' => '2023-11-07T05:31:56Z',
'sender_auth' => [
'signed_messages' => [
[
'message' => '<string>',
'signature' => '<string>',
'message_prehash' => '<unknown>'
]
]
]
]
],
'extensions' => [
'payment-identifier' => [
'info' => [
'required' => true,
'id' => '<string>'
]
]
]
],
'paymentRequirements' => [
'scheme' => 'atum-escrow',
'network' => '<string>',
'asset' => '<string>',
'payTo' => '<string>',
'amount' => '<string>',
'maxTimeoutSeconds' => 2,
'extra' => [
'atum' => [
'destination' => [
'network' => '<string>',
'asset' => '<string>',
'address' => '<string>'
],
'fulfillmentAmount' => '<string>',
'escrow' => '<string>',
'fulfillmentProxy' => '<string>',
'reserver' => '<string>',
'releaser' => '<string>',
'fulfillmentVerifierEndpoint' => '<string>',
'quoteDeadlineSeconds' => 2,
'fulfillmentDeadlineSeconds' => 2,
'svmSignatureClusterId' => '<string>',
'svmSignatureDomainVersion' => 128
]
]
]
]),
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://payment-gw.production-mainnet.atum.xyz/x402/v1/settle"
payload := strings.NewReader("{\n \"x402Version\": 2,\n \"paymentPayload\": {\n \"x402Version\": 2,\n \"accepted\": {\n \"scheme\": \"atum-escrow\",\n \"network\": \"<string>\",\n \"asset\": \"<string>\",\n \"payTo\": \"<string>\",\n \"amount\": \"<string>\",\n \"maxTimeoutSeconds\": 2,\n \"extra\": {\n \"atum\": {}\n }\n },\n \"payload\": {\n \"paymentRequest\": {\n \"version\": \"<string>\",\n \"request_id\": \"<string>\",\n \"source\": {\n \"asset_identifier\": \"<string>\",\n \"account\": \"<string>\"\n },\n \"destination\": [\n {\n \"asset_identifier\": \"<string>\",\n \"account\": \"<string>\"\n }\n ],\n \"fulfillment_amount\": \"<string>\",\n \"max_source_amount\": \"<string>\",\n \"quote_deadline\": \"2023-11-07T05:31:56Z\",\n \"fulfillment_deadline\": \"2023-11-07T05:31:56Z\",\n \"sender_auth\": {\n \"signed_messages\": [\n {\n \"message\": \"<string>\",\n \"signature\": \"<string>\",\n \"message_prehash\": \"<unknown>\"\n }\n ]\n }\n }\n },\n \"extensions\": {\n \"payment-identifier\": {\n \"info\": {\n \"required\": true,\n \"id\": \"<string>\"\n }\n }\n }\n },\n \"paymentRequirements\": {\n \"scheme\": \"atum-escrow\",\n \"network\": \"<string>\",\n \"asset\": \"<string>\",\n \"payTo\": \"<string>\",\n \"amount\": \"<string>\",\n \"maxTimeoutSeconds\": 2,\n \"extra\": {\n \"atum\": {\n \"destination\": {\n \"network\": \"<string>\",\n \"asset\": \"<string>\",\n \"address\": \"<string>\"\n },\n \"fulfillmentAmount\": \"<string>\",\n \"escrow\": \"<string>\",\n \"fulfillmentProxy\": \"<string>\",\n \"reserver\": \"<string>\",\n \"releaser\": \"<string>\",\n \"fulfillmentVerifierEndpoint\": \"<string>\",\n \"quoteDeadlineSeconds\": 2,\n \"fulfillmentDeadlineSeconds\": 2,\n \"svmSignatureClusterId\": \"<string>\",\n \"svmSignatureDomainVersion\": 128\n }\n }\n }\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://payment-gw.production-mainnet.atum.xyz/x402/v1/settle")
.header("Content-Type", "application/json")
.body("{\n \"x402Version\": 2,\n \"paymentPayload\": {\n \"x402Version\": 2,\n \"accepted\": {\n \"scheme\": \"atum-escrow\",\n \"network\": \"<string>\",\n \"asset\": \"<string>\",\n \"payTo\": \"<string>\",\n \"amount\": \"<string>\",\n \"maxTimeoutSeconds\": 2,\n \"extra\": {\n \"atum\": {}\n }\n },\n \"payload\": {\n \"paymentRequest\": {\n \"version\": \"<string>\",\n \"request_id\": \"<string>\",\n \"source\": {\n \"asset_identifier\": \"<string>\",\n \"account\": \"<string>\"\n },\n \"destination\": [\n {\n \"asset_identifier\": \"<string>\",\n \"account\": \"<string>\"\n }\n ],\n \"fulfillment_amount\": \"<string>\",\n \"max_source_amount\": \"<string>\",\n \"quote_deadline\": \"2023-11-07T05:31:56Z\",\n \"fulfillment_deadline\": \"2023-11-07T05:31:56Z\",\n \"sender_auth\": {\n \"signed_messages\": [\n {\n \"message\": \"<string>\",\n \"signature\": \"<string>\",\n \"message_prehash\": \"<unknown>\"\n }\n ]\n }\n }\n },\n \"extensions\": {\n \"payment-identifier\": {\n \"info\": {\n \"required\": true,\n \"id\": \"<string>\"\n }\n }\n }\n },\n \"paymentRequirements\": {\n \"scheme\": \"atum-escrow\",\n \"network\": \"<string>\",\n \"asset\": \"<string>\",\n \"payTo\": \"<string>\",\n \"amount\": \"<string>\",\n \"maxTimeoutSeconds\": 2,\n \"extra\": {\n \"atum\": {\n \"destination\": {\n \"network\": \"<string>\",\n \"asset\": \"<string>\",\n \"address\": \"<string>\"\n },\n \"fulfillmentAmount\": \"<string>\",\n \"escrow\": \"<string>\",\n \"fulfillmentProxy\": \"<string>\",\n \"reserver\": \"<string>\",\n \"releaser\": \"<string>\",\n \"fulfillmentVerifierEndpoint\": \"<string>\",\n \"quoteDeadlineSeconds\": 2,\n \"fulfillmentDeadlineSeconds\": 2,\n \"svmSignatureClusterId\": \"<string>\",\n \"svmSignatureDomainVersion\": 128\n }\n }\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://payment-gw.production-mainnet.atum.xyz/x402/v1/settle")
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 \"x402Version\": 2,\n \"paymentPayload\": {\n \"x402Version\": 2,\n \"accepted\": {\n \"scheme\": \"atum-escrow\",\n \"network\": \"<string>\",\n \"asset\": \"<string>\",\n \"payTo\": \"<string>\",\n \"amount\": \"<string>\",\n \"maxTimeoutSeconds\": 2,\n \"extra\": {\n \"atum\": {}\n }\n },\n \"payload\": {\n \"paymentRequest\": {\n \"version\": \"<string>\",\n \"request_id\": \"<string>\",\n \"source\": {\n \"asset_identifier\": \"<string>\",\n \"account\": \"<string>\"\n },\n \"destination\": [\n {\n \"asset_identifier\": \"<string>\",\n \"account\": \"<string>\"\n }\n ],\n \"fulfillment_amount\": \"<string>\",\n \"max_source_amount\": \"<string>\",\n \"quote_deadline\": \"2023-11-07T05:31:56Z\",\n \"fulfillment_deadline\": \"2023-11-07T05:31:56Z\",\n \"sender_auth\": {\n \"signed_messages\": [\n {\n \"message\": \"<string>\",\n \"signature\": \"<string>\",\n \"message_prehash\": \"<unknown>\"\n }\n ]\n }\n }\n },\n \"extensions\": {\n \"payment-identifier\": {\n \"info\": {\n \"required\": true,\n \"id\": \"<string>\"\n }\n }\n }\n },\n \"paymentRequirements\": {\n \"scheme\": \"atum-escrow\",\n \"network\": \"<string>\",\n \"asset\": \"<string>\",\n \"payTo\": \"<string>\",\n \"amount\": \"<string>\",\n \"maxTimeoutSeconds\": 2,\n \"extra\": {\n \"atum\": {\n \"destination\": {\n \"network\": \"<string>\",\n \"asset\": \"<string>\",\n \"address\": \"<string>\"\n },\n \"fulfillmentAmount\": \"<string>\",\n \"escrow\": \"<string>\",\n \"fulfillmentProxy\": \"<string>\",\n \"reserver\": \"<string>\",\n \"releaser\": \"<string>\",\n \"fulfillmentVerifierEndpoint\": \"<string>\",\n \"quoteDeadlineSeconds\": 2,\n \"fulfillmentDeadlineSeconds\": 2,\n \"svmSignatureClusterId\": \"<string>\",\n \"svmSignatureDomainVersion\": 128\n }\n }\n }\n}"
response = http.request(request)
puts response.read_body{
"success": true,
"transaction": "<string>",
"network": "<string>",
"payer": "<string>",
"errorReason": "<string>",
"extensions": {
"atum": {
"paymentId": "<string>",
"state": "<string>",
"statusUrl": "<string>",
"retryClassification": "NOT_RETRYABLE_FIX_REQUEST"
}
},
"fulfillmentConfirmation": {}
}Settle payment
Submits the request to the Atum network for settlement and resolves synchronously when the payment is delivered, within the requirement’s maxTimeoutSeconds. Returns the settlement transaction and network plus the settlement receipt (also carried to the payer in the PAYMENT-RESPONSE header). Asynchronous settlement beyond the synchronous window is a deferred extension.
curl --request POST \
--url https://payment-gw.production-mainnet.atum.xyz/x402/v1/settle \
--header 'Content-Type: application/json' \
--data '
{
"x402Version": 2,
"paymentPayload": {
"x402Version": 2,
"accepted": {
"scheme": "atum-escrow",
"network": "<string>",
"asset": "<string>",
"payTo": "<string>",
"amount": "<string>",
"maxTimeoutSeconds": 2,
"extra": {
"atum": {}
}
},
"payload": {
"paymentRequest": {
"version": "<string>",
"request_id": "<string>",
"source": {
"asset_identifier": "<string>",
"account": "<string>"
},
"destination": [
{
"asset_identifier": "<string>",
"account": "<string>"
}
],
"fulfillment_amount": "<string>",
"max_source_amount": "<string>",
"quote_deadline": "2023-11-07T05:31:56Z",
"fulfillment_deadline": "2023-11-07T05:31:56Z",
"sender_auth": {
"signed_messages": [
{
"message": "<string>",
"signature": "<string>",
"message_prehash": "<unknown>"
}
]
}
}
},
"extensions": {
"payment-identifier": {
"info": {
"required": true,
"id": "<string>"
}
}
}
},
"paymentRequirements": {
"scheme": "atum-escrow",
"network": "<string>",
"asset": "<string>",
"payTo": "<string>",
"amount": "<string>",
"maxTimeoutSeconds": 2,
"extra": {
"atum": {
"destination": {
"network": "<string>",
"asset": "<string>",
"address": "<string>"
},
"fulfillmentAmount": "<string>",
"escrow": "<string>",
"fulfillmentProxy": "<string>",
"reserver": "<string>",
"releaser": "<string>",
"fulfillmentVerifierEndpoint": "<string>",
"quoteDeadlineSeconds": 2,
"fulfillmentDeadlineSeconds": 2,
"svmSignatureClusterId": "<string>",
"svmSignatureDomainVersion": 128
}
}
}
}
'import requests
url = "https://payment-gw.production-mainnet.atum.xyz/x402/v1/settle"
payload = {
"x402Version": 2,
"paymentPayload": {
"x402Version": 2,
"accepted": {
"scheme": "atum-escrow",
"network": "<string>",
"asset": "<string>",
"payTo": "<string>",
"amount": "<string>",
"maxTimeoutSeconds": 2,
"extra": { "atum": {} }
},
"payload": { "paymentRequest": {
"version": "<string>",
"request_id": "<string>",
"source": {
"asset_identifier": "<string>",
"account": "<string>"
},
"destination": [
{
"asset_identifier": "<string>",
"account": "<string>"
}
],
"fulfillment_amount": "<string>",
"max_source_amount": "<string>",
"quote_deadline": "2023-11-07T05:31:56Z",
"fulfillment_deadline": "2023-11-07T05:31:56Z",
"sender_auth": { "signed_messages": [
{
"message": "<string>",
"signature": "<string>",
"message_prehash": "<unknown>"
}
] }
} },
"extensions": { "payment-identifier": { "info": {
"required": True,
"id": "<string>"
} } }
},
"paymentRequirements": {
"scheme": "atum-escrow",
"network": "<string>",
"asset": "<string>",
"payTo": "<string>",
"amount": "<string>",
"maxTimeoutSeconds": 2,
"extra": { "atum": {
"destination": {
"network": "<string>",
"asset": "<string>",
"address": "<string>"
},
"fulfillmentAmount": "<string>",
"escrow": "<string>",
"fulfillmentProxy": "<string>",
"reserver": "<string>",
"releaser": "<string>",
"fulfillmentVerifierEndpoint": "<string>",
"quoteDeadlineSeconds": 2,
"fulfillmentDeadlineSeconds": 2,
"svmSignatureClusterId": "<string>",
"svmSignatureDomainVersion": 128
} }
}
}
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({
x402Version: 2,
paymentPayload: {
x402Version: 2,
accepted: {
scheme: 'atum-escrow',
network: '<string>',
asset: '<string>',
payTo: '<string>',
amount: '<string>',
maxTimeoutSeconds: 2,
extra: {atum: {}}
},
payload: {
paymentRequest: {
version: '<string>',
request_id: '<string>',
source: {asset_identifier: '<string>', account: '<string>'},
destination: [{asset_identifier: '<string>', account: '<string>'}],
fulfillment_amount: '<string>',
max_source_amount: '<string>',
quote_deadline: '2023-11-07T05:31:56Z',
fulfillment_deadline: '2023-11-07T05:31:56Z',
sender_auth: {
signed_messages: [{message: '<string>', signature: '<string>', message_prehash: '<unknown>'}]
}
}
},
extensions: {'payment-identifier': {info: {required: true, id: '<string>'}}}
},
paymentRequirements: {
scheme: 'atum-escrow',
network: '<string>',
asset: '<string>',
payTo: '<string>',
amount: '<string>',
maxTimeoutSeconds: 2,
extra: {
atum: {
destination: {network: '<string>', asset: '<string>', address: '<string>'},
fulfillmentAmount: '<string>',
escrow: '<string>',
fulfillmentProxy: '<string>',
reserver: '<string>',
releaser: '<string>',
fulfillmentVerifierEndpoint: '<string>',
quoteDeadlineSeconds: 2,
fulfillmentDeadlineSeconds: 2,
svmSignatureClusterId: '<string>',
svmSignatureDomainVersion: 128
}
}
}
})
};
fetch('https://payment-gw.production-mainnet.atum.xyz/x402/v1/settle', 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://payment-gw.production-mainnet.atum.xyz/x402/v1/settle",
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([
'x402Version' => 2,
'paymentPayload' => [
'x402Version' => 2,
'accepted' => [
'scheme' => 'atum-escrow',
'network' => '<string>',
'asset' => '<string>',
'payTo' => '<string>',
'amount' => '<string>',
'maxTimeoutSeconds' => 2,
'extra' => [
'atum' => [
]
]
],
'payload' => [
'paymentRequest' => [
'version' => '<string>',
'request_id' => '<string>',
'source' => [
'asset_identifier' => '<string>',
'account' => '<string>'
],
'destination' => [
[
'asset_identifier' => '<string>',
'account' => '<string>'
]
],
'fulfillment_amount' => '<string>',
'max_source_amount' => '<string>',
'quote_deadline' => '2023-11-07T05:31:56Z',
'fulfillment_deadline' => '2023-11-07T05:31:56Z',
'sender_auth' => [
'signed_messages' => [
[
'message' => '<string>',
'signature' => '<string>',
'message_prehash' => '<unknown>'
]
]
]
]
],
'extensions' => [
'payment-identifier' => [
'info' => [
'required' => true,
'id' => '<string>'
]
]
]
],
'paymentRequirements' => [
'scheme' => 'atum-escrow',
'network' => '<string>',
'asset' => '<string>',
'payTo' => '<string>',
'amount' => '<string>',
'maxTimeoutSeconds' => 2,
'extra' => [
'atum' => [
'destination' => [
'network' => '<string>',
'asset' => '<string>',
'address' => '<string>'
],
'fulfillmentAmount' => '<string>',
'escrow' => '<string>',
'fulfillmentProxy' => '<string>',
'reserver' => '<string>',
'releaser' => '<string>',
'fulfillmentVerifierEndpoint' => '<string>',
'quoteDeadlineSeconds' => 2,
'fulfillmentDeadlineSeconds' => 2,
'svmSignatureClusterId' => '<string>',
'svmSignatureDomainVersion' => 128
]
]
]
]),
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://payment-gw.production-mainnet.atum.xyz/x402/v1/settle"
payload := strings.NewReader("{\n \"x402Version\": 2,\n \"paymentPayload\": {\n \"x402Version\": 2,\n \"accepted\": {\n \"scheme\": \"atum-escrow\",\n \"network\": \"<string>\",\n \"asset\": \"<string>\",\n \"payTo\": \"<string>\",\n \"amount\": \"<string>\",\n \"maxTimeoutSeconds\": 2,\n \"extra\": {\n \"atum\": {}\n }\n },\n \"payload\": {\n \"paymentRequest\": {\n \"version\": \"<string>\",\n \"request_id\": \"<string>\",\n \"source\": {\n \"asset_identifier\": \"<string>\",\n \"account\": \"<string>\"\n },\n \"destination\": [\n {\n \"asset_identifier\": \"<string>\",\n \"account\": \"<string>\"\n }\n ],\n \"fulfillment_amount\": \"<string>\",\n \"max_source_amount\": \"<string>\",\n \"quote_deadline\": \"2023-11-07T05:31:56Z\",\n \"fulfillment_deadline\": \"2023-11-07T05:31:56Z\",\n \"sender_auth\": {\n \"signed_messages\": [\n {\n \"message\": \"<string>\",\n \"signature\": \"<string>\",\n \"message_prehash\": \"<unknown>\"\n }\n ]\n }\n }\n },\n \"extensions\": {\n \"payment-identifier\": {\n \"info\": {\n \"required\": true,\n \"id\": \"<string>\"\n }\n }\n }\n },\n \"paymentRequirements\": {\n \"scheme\": \"atum-escrow\",\n \"network\": \"<string>\",\n \"asset\": \"<string>\",\n \"payTo\": \"<string>\",\n \"amount\": \"<string>\",\n \"maxTimeoutSeconds\": 2,\n \"extra\": {\n \"atum\": {\n \"destination\": {\n \"network\": \"<string>\",\n \"asset\": \"<string>\",\n \"address\": \"<string>\"\n },\n \"fulfillmentAmount\": \"<string>\",\n \"escrow\": \"<string>\",\n \"fulfillmentProxy\": \"<string>\",\n \"reserver\": \"<string>\",\n \"releaser\": \"<string>\",\n \"fulfillmentVerifierEndpoint\": \"<string>\",\n \"quoteDeadlineSeconds\": 2,\n \"fulfillmentDeadlineSeconds\": 2,\n \"svmSignatureClusterId\": \"<string>\",\n \"svmSignatureDomainVersion\": 128\n }\n }\n }\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://payment-gw.production-mainnet.atum.xyz/x402/v1/settle")
.header("Content-Type", "application/json")
.body("{\n \"x402Version\": 2,\n \"paymentPayload\": {\n \"x402Version\": 2,\n \"accepted\": {\n \"scheme\": \"atum-escrow\",\n \"network\": \"<string>\",\n \"asset\": \"<string>\",\n \"payTo\": \"<string>\",\n \"amount\": \"<string>\",\n \"maxTimeoutSeconds\": 2,\n \"extra\": {\n \"atum\": {}\n }\n },\n \"payload\": {\n \"paymentRequest\": {\n \"version\": \"<string>\",\n \"request_id\": \"<string>\",\n \"source\": {\n \"asset_identifier\": \"<string>\",\n \"account\": \"<string>\"\n },\n \"destination\": [\n {\n \"asset_identifier\": \"<string>\",\n \"account\": \"<string>\"\n }\n ],\n \"fulfillment_amount\": \"<string>\",\n \"max_source_amount\": \"<string>\",\n \"quote_deadline\": \"2023-11-07T05:31:56Z\",\n \"fulfillment_deadline\": \"2023-11-07T05:31:56Z\",\n \"sender_auth\": {\n \"signed_messages\": [\n {\n \"message\": \"<string>\",\n \"signature\": \"<string>\",\n \"message_prehash\": \"<unknown>\"\n }\n ]\n }\n }\n },\n \"extensions\": {\n \"payment-identifier\": {\n \"info\": {\n \"required\": true,\n \"id\": \"<string>\"\n }\n }\n }\n },\n \"paymentRequirements\": {\n \"scheme\": \"atum-escrow\",\n \"network\": \"<string>\",\n \"asset\": \"<string>\",\n \"payTo\": \"<string>\",\n \"amount\": \"<string>\",\n \"maxTimeoutSeconds\": 2,\n \"extra\": {\n \"atum\": {\n \"destination\": {\n \"network\": \"<string>\",\n \"asset\": \"<string>\",\n \"address\": \"<string>\"\n },\n \"fulfillmentAmount\": \"<string>\",\n \"escrow\": \"<string>\",\n \"fulfillmentProxy\": \"<string>\",\n \"reserver\": \"<string>\",\n \"releaser\": \"<string>\",\n \"fulfillmentVerifierEndpoint\": \"<string>\",\n \"quoteDeadlineSeconds\": 2,\n \"fulfillmentDeadlineSeconds\": 2,\n \"svmSignatureClusterId\": \"<string>\",\n \"svmSignatureDomainVersion\": 128\n }\n }\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://payment-gw.production-mainnet.atum.xyz/x402/v1/settle")
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 \"x402Version\": 2,\n \"paymentPayload\": {\n \"x402Version\": 2,\n \"accepted\": {\n \"scheme\": \"atum-escrow\",\n \"network\": \"<string>\",\n \"asset\": \"<string>\",\n \"payTo\": \"<string>\",\n \"amount\": \"<string>\",\n \"maxTimeoutSeconds\": 2,\n \"extra\": {\n \"atum\": {}\n }\n },\n \"payload\": {\n \"paymentRequest\": {\n \"version\": \"<string>\",\n \"request_id\": \"<string>\",\n \"source\": {\n \"asset_identifier\": \"<string>\",\n \"account\": \"<string>\"\n },\n \"destination\": [\n {\n \"asset_identifier\": \"<string>\",\n \"account\": \"<string>\"\n }\n ],\n \"fulfillment_amount\": \"<string>\",\n \"max_source_amount\": \"<string>\",\n \"quote_deadline\": \"2023-11-07T05:31:56Z\",\n \"fulfillment_deadline\": \"2023-11-07T05:31:56Z\",\n \"sender_auth\": {\n \"signed_messages\": [\n {\n \"message\": \"<string>\",\n \"signature\": \"<string>\",\n \"message_prehash\": \"<unknown>\"\n }\n ]\n }\n }\n },\n \"extensions\": {\n \"payment-identifier\": {\n \"info\": {\n \"required\": true,\n \"id\": \"<string>\"\n }\n }\n }\n },\n \"paymentRequirements\": {\n \"scheme\": \"atum-escrow\",\n \"network\": \"<string>\",\n \"asset\": \"<string>\",\n \"payTo\": \"<string>\",\n \"amount\": \"<string>\",\n \"maxTimeoutSeconds\": 2,\n \"extra\": {\n \"atum\": {\n \"destination\": {\n \"network\": \"<string>\",\n \"asset\": \"<string>\",\n \"address\": \"<string>\"\n },\n \"fulfillmentAmount\": \"<string>\",\n \"escrow\": \"<string>\",\n \"fulfillmentProxy\": \"<string>\",\n \"reserver\": \"<string>\",\n \"releaser\": \"<string>\",\n \"fulfillmentVerifierEndpoint\": \"<string>\",\n \"quoteDeadlineSeconds\": 2,\n \"fulfillmentDeadlineSeconds\": 2,\n \"svmSignatureClusterId\": \"<string>\",\n \"svmSignatureDomainVersion\": 128\n }\n }\n }\n}"
response = http.request(request)
puts response.read_body{
"success": true,
"transaction": "<string>",
"network": "<string>",
"payer": "<string>",
"errorReason": "<string>",
"extensions": {
"atum": {
"paymentId": "<string>",
"state": "<string>",
"statusUrl": "<string>",
"retryClassification": "NOT_RETRYABLE_FIX_REQUEST"
}
},
"fulfillmentConfirmation": {}
}Body
The shared request body for /verify and /settle.
The payer's signed credential. Its payload.paymentRequest conforms to the canonical PaymentRequest declaration and carries the PaymentRequestEnvelope (PRE) identity binding.
Show child attributes
Show child attributes
The single requirement the payer selected from the 402.
Show child attributes
Show child attributes
Response
The synchronous settlement result.
The synchronous settlement result — the standard x402 SettleResponse fields plus the Atum settlement receipt.
Destination settlement transaction hash.
CAIP-2 destination chain id.
Present when success is false.
Facilitator-specific members. See AtumExtension for the atum one.
Show child attributes
Show child attributes
Full settlement receipt; also returned to the payer in PAYMENT-RESPONSE.