curl --request POST \
--url https://api.sandbox.lead.bank/v0/blockchain_payments \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--header 'Idempotency-Key: <idempotency-key>' \
--data '
{
"debtor": {
"account_identifier": {
"type": "account_number_id",
"value": "account_number_xyz123"
},
"chain": "ethereum",
"refund_wallet_address": "0xabc123def456",
"entity_id": "entity_xyz123"
},
"creditor": {
"payment_rail": "wire",
"ach": {
"account_number": "123456789",
"routing_number": "021000021"
},
"type": "individual",
"address": {
"line_one": "123 Main St",
"city": "San Francisco",
"country": "US",
"line_two": "Suite 100",
"state": "CA",
"postal_code": "94105"
}
},
"amounts": {
"instructed_amount": 100000,
"instructed_currency_code": "USD",
"settlement_currency_code": "MXN"
},
"payment_purpose": {
"type": "invoice_payment",
"other_details": "Monthly vendor payment"
},
"reference": "INV2024001"
}
'import requests
url = "https://api.sandbox.lead.bank/v0/blockchain_payments"
payload = {
"debtor": {
"account_identifier": {
"type": "account_number_id",
"value": "account_number_xyz123"
},
"chain": "ethereum",
"refund_wallet_address": "0xabc123def456",
"entity_id": "entity_xyz123"
},
"creditor": {
"payment_rail": "wire",
"ach": {
"account_number": "123456789",
"routing_number": "021000021"
},
"type": "individual",
"address": {
"line_one": "123 Main St",
"city": "San Francisco",
"country": "US",
"line_two": "Suite 100",
"state": "CA",
"postal_code": "94105"
}
},
"amounts": {
"instructed_amount": 100000,
"instructed_currency_code": "USD",
"settlement_currency_code": "MXN"
},
"payment_purpose": {
"type": "invoice_payment",
"other_details": "Monthly vendor payment"
},
"reference": "INV2024001"
}
headers = {
"Idempotency-Key": "<idempotency-key>",
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {
'Idempotency-Key': '<idempotency-key>',
Authorization: 'Bearer <token>',
'Content-Type': 'application/json'
},
body: JSON.stringify({
debtor: {
account_identifier: {type: 'account_number_id', value: 'account_number_xyz123'},
chain: 'ethereum',
refund_wallet_address: '0xabc123def456',
entity_id: 'entity_xyz123'
},
creditor: {
payment_rail: 'wire',
ach: {account_number: '123456789', routing_number: '021000021'},
type: 'individual',
address: {
line_one: '123 Main St',
city: 'San Francisco',
country: 'US',
line_two: 'Suite 100',
state: 'CA',
postal_code: '94105'
}
},
amounts: {
instructed_amount: 100000,
instructed_currency_code: 'USD',
settlement_currency_code: 'MXN'
},
payment_purpose: {type: 'invoice_payment', other_details: 'Monthly vendor payment'},
reference: 'INV2024001'
})
};
fetch('https://api.sandbox.lead.bank/v0/blockchain_payments', 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.sandbox.lead.bank/v0/blockchain_payments",
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([
'debtor' => [
'account_identifier' => [
'type' => 'account_number_id',
'value' => 'account_number_xyz123'
],
'chain' => 'ethereum',
'refund_wallet_address' => '0xabc123def456',
'entity_id' => 'entity_xyz123'
],
'creditor' => [
'payment_rail' => 'wire',
'ach' => [
'account_number' => '123456789',
'routing_number' => '021000021'
],
'type' => 'individual',
'address' => [
'line_one' => '123 Main St',
'city' => 'San Francisco',
'country' => 'US',
'line_two' => 'Suite 100',
'state' => 'CA',
'postal_code' => '94105'
]
],
'amounts' => [
'instructed_amount' => 100000,
'instructed_currency_code' => 'USD',
'settlement_currency_code' => 'MXN'
],
'payment_purpose' => [
'type' => 'invoice_payment',
'other_details' => 'Monthly vendor payment'
],
'reference' => 'INV2024001'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json",
"Idempotency-Key: <idempotency-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.sandbox.lead.bank/v0/blockchain_payments"
payload := strings.NewReader("{\n \"debtor\": {\n \"account_identifier\": {\n \"type\": \"account_number_id\",\n \"value\": \"account_number_xyz123\"\n },\n \"chain\": \"ethereum\",\n \"refund_wallet_address\": \"0xabc123def456\",\n \"entity_id\": \"entity_xyz123\"\n },\n \"creditor\": {\n \"payment_rail\": \"wire\",\n \"ach\": {\n \"account_number\": \"123456789\",\n \"routing_number\": \"021000021\"\n },\n \"type\": \"individual\",\n \"address\": {\n \"line_one\": \"123 Main St\",\n \"city\": \"San Francisco\",\n \"country\": \"US\",\n \"line_two\": \"Suite 100\",\n \"state\": \"CA\",\n \"postal_code\": \"94105\"\n }\n },\n \"amounts\": {\n \"instructed_amount\": 100000,\n \"instructed_currency_code\": \"USD\",\n \"settlement_currency_code\": \"MXN\"\n },\n \"payment_purpose\": {\n \"type\": \"invoice_payment\",\n \"other_details\": \"Monthly vendor payment\"\n },\n \"reference\": \"INV2024001\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Idempotency-Key", "<idempotency-key>")
req.Header.Add("Authorization", "Bearer <token>")
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.sandbox.lead.bank/v0/blockchain_payments")
.header("Idempotency-Key", "<idempotency-key>")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"debtor\": {\n \"account_identifier\": {\n \"type\": \"account_number_id\",\n \"value\": \"account_number_xyz123\"\n },\n \"chain\": \"ethereum\",\n \"refund_wallet_address\": \"0xabc123def456\",\n \"entity_id\": \"entity_xyz123\"\n },\n \"creditor\": {\n \"payment_rail\": \"wire\",\n \"ach\": {\n \"account_number\": \"123456789\",\n \"routing_number\": \"021000021\"\n },\n \"type\": \"individual\",\n \"address\": {\n \"line_one\": \"123 Main St\",\n \"city\": \"San Francisco\",\n \"country\": \"US\",\n \"line_two\": \"Suite 100\",\n \"state\": \"CA\",\n \"postal_code\": \"94105\"\n }\n },\n \"amounts\": {\n \"instructed_amount\": 100000,\n \"instructed_currency_code\": \"USD\",\n \"settlement_currency_code\": \"MXN\"\n },\n \"payment_purpose\": {\n \"type\": \"invoice_payment\",\n \"other_details\": \"Monthly vendor payment\"\n },\n \"reference\": \"INV2024001\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.sandbox.lead.bank/v0/blockchain_payments")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Idempotency-Key"] = '<idempotency-key>'
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"debtor\": {\n \"account_identifier\": {\n \"type\": \"account_number_id\",\n \"value\": \"account_number_xyz123\"\n },\n \"chain\": \"ethereum\",\n \"refund_wallet_address\": \"0xabc123def456\",\n \"entity_id\": \"entity_xyz123\"\n },\n \"creditor\": {\n \"payment_rail\": \"wire\",\n \"ach\": {\n \"account_number\": \"123456789\",\n \"routing_number\": \"021000021\"\n },\n \"type\": \"individual\",\n \"address\": {\n \"line_one\": \"123 Main St\",\n \"city\": \"San Francisco\",\n \"country\": \"US\",\n \"line_two\": \"Suite 100\",\n \"state\": \"CA\",\n \"postal_code\": \"94105\"\n }\n },\n \"amounts\": {\n \"instructed_amount\": 100000,\n \"instructed_currency_code\": \"USD\",\n \"settlement_currency_code\": \"MXN\"\n },\n \"payment_purpose\": {\n \"type\": \"invoice_payment\",\n \"other_details\": \"Monthly vendor payment\"\n },\n \"reference\": \"INV2024001\"\n}"
response = http.request(request)
puts response.read_body{
"id": "blockchain_payment_xyz123",
"debtor": {
"account_identifier": {
"type": "account_number_id",
"value": "account_number_xyz123"
},
"chain": "ethereum",
"refund_wallet_address": "0xabc123def456",
"funding_instructions": {
"from_wallet_address": "0xabc123def456",
"chain": "ethereum",
"amount": "100.00",
"currency_code": "USDC",
"to_wallet_address": "0xdef456abc789"
},
"entity_id": "entity_xyz123"
},
"creditor": {
"payment_rail": "wire",
"ach": {
"account_number": "123456789",
"routing_number": "021000021"
},
"type": "individual",
"address": {
"line_one": "123 Main St",
"city": "San Francisco",
"country": "US",
"line_two": "Suite 100",
"state": "CA",
"postal_code": "94105"
},
"ach_wire": {
"account_number": "123456789",
"routing_number": "021000021"
},
"wire": {
"account_number": "123456789",
"routing_number": "021000021"
},
"bre_b": {
"bre_b_key": "1234567890"
},
"fps": {
"account_number": "12345678",
"sort_code": "123456"
},
"iban": {
"account_number": "DE89370400440532013000",
"country": "DE",
"business_identifier_code": "COBADEFFXXX"
},
"swift": {
"account_number": "123456789",
"country": "GB",
"business_identifier_code": "BARCGB22XXX",
"role": "client",
"purpose_of_funds": "invoice_for_goods_and_services",
"short_business_desc": "Software development services"
},
"clabe": {
"account_number": "032180000118359719"
},
"pix_key": {
"pix_key": "12345678909",
"document_number": "12345678901"
},
"pix_br_code": {
"br_code": "00020126580014br.gov.bcb.pix...",
"document_number": "12345678901"
},
"co_bank_transfer": {
"account_number": "1234567890",
"bank_code": "1007",
"account_type": "savings",
"document_type": "cc",
"document_number": "12345678901",
"phone_number": "+573001234567"
},
"wallet": {
"wallet_address": "0xdef456abc789"
},
"individual": {
"first_name": "Maria",
"last_name": "Garcia"
},
"business": {
"business_name": "Acme International LLC"
}
},
"creditor_agent": {
"bank_name": "Banco Nacional de Mexico",
"country_code": "MX",
"address": {
"line_one": "123 Main St",
"city": "San Francisco",
"country": "US",
"line_two": "Suite 100",
"state": "CA",
"postal_code": "94105"
}
},
"amounts": {
"instructed_amount": 100000,
"instructed_currency_code": "USD",
"settlement_currency_code": "MXN",
"settlement_amount": 100000,
"settlement_exchange_rate": "1.00"
},
"payment_purpose": {
"type": "invoice_payment",
"other_details": "Monthly vendor payment"
},
"reference": "INV2024001",
"status": "created",
"rejection_reason": "name_mismatch",
"cancelation_reason": "Requested by customer",
"return": {
"code": "account_closed",
"reason": "The destination account has been closed."
},
"related_blockchain_payments": {
"original_blockchain_payment_id": "blockchain_payment_2x7abc123def456ghi789jkl",
"return_blockchain_payment_ids": [
"blockchain_payment_9y4mno321pqr654stu987vwx"
]
},
"created_at": "2024-06-27T11:22:33Z",
"updated_at": "2024-06-27T11:22:33Z"
}{
"code": "<string>",
"title": "<string>",
"detail": "<string>",
"status": "<string>",
"invalid_parameters": [
{
"parameter": "transaction_type",
"reason": "<string>"
}
],
"instance": "<string>"
}{
"code": "<string>",
"title": "<string>",
"detail": "<string>",
"status": "<string>",
"invalid_parameters": [
{
"parameter": "transaction_type",
"reason": "<string>"
}
],
"instance": "<string>"
}{
"code": "<string>",
"title": "<string>",
"detail": "<string>",
"status": "<string>",
"invalid_parameters": [
{
"parameter": "transaction_type",
"reason": "<string>"
}
],
"instance": "<string>"
}{
"code": "<string>",
"title": "<string>",
"detail": "<string>",
"status": "<string>",
"invalid_parameters": [
{
"parameter": "transaction_type",
"reason": "<string>"
}
],
"instance": "<string>"
}{
"code": "<string>",
"title": "<string>",
"detail": "<string>",
"status": "<string>",
"invalid_parameters": [
{
"parameter": "transaction_type",
"reason": "<string>"
}
],
"instance": "<string>"
}{
"code": "<string>",
"title": "<string>",
"detail": "<string>",
"status": "<string>",
"invalid_parameters": [
{
"parameter": "transaction_type",
"reason": "<string>"
}
],
"instance": "<string>"
}{
"code": "<string>",
"title": "<string>",
"detail": "<string>",
"status": "<string>",
"invalid_parameters": [
{
"parameter": "transaction_type",
"reason": "<string>"
}
],
"instance": "<string>"
}Create a Blockchain Payment
Creates a blockchain payment for fiat or cross-border payments.
curl --request POST \
--url https://api.sandbox.lead.bank/v0/blockchain_payments \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--header 'Idempotency-Key: <idempotency-key>' \
--data '
{
"debtor": {
"account_identifier": {
"type": "account_number_id",
"value": "account_number_xyz123"
},
"chain": "ethereum",
"refund_wallet_address": "0xabc123def456",
"entity_id": "entity_xyz123"
},
"creditor": {
"payment_rail": "wire",
"ach": {
"account_number": "123456789",
"routing_number": "021000021"
},
"type": "individual",
"address": {
"line_one": "123 Main St",
"city": "San Francisco",
"country": "US",
"line_two": "Suite 100",
"state": "CA",
"postal_code": "94105"
}
},
"amounts": {
"instructed_amount": 100000,
"instructed_currency_code": "USD",
"settlement_currency_code": "MXN"
},
"payment_purpose": {
"type": "invoice_payment",
"other_details": "Monthly vendor payment"
},
"reference": "INV2024001"
}
'import requests
url = "https://api.sandbox.lead.bank/v0/blockchain_payments"
payload = {
"debtor": {
"account_identifier": {
"type": "account_number_id",
"value": "account_number_xyz123"
},
"chain": "ethereum",
"refund_wallet_address": "0xabc123def456",
"entity_id": "entity_xyz123"
},
"creditor": {
"payment_rail": "wire",
"ach": {
"account_number": "123456789",
"routing_number": "021000021"
},
"type": "individual",
"address": {
"line_one": "123 Main St",
"city": "San Francisco",
"country": "US",
"line_two": "Suite 100",
"state": "CA",
"postal_code": "94105"
}
},
"amounts": {
"instructed_amount": 100000,
"instructed_currency_code": "USD",
"settlement_currency_code": "MXN"
},
"payment_purpose": {
"type": "invoice_payment",
"other_details": "Monthly vendor payment"
},
"reference": "INV2024001"
}
headers = {
"Idempotency-Key": "<idempotency-key>",
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {
'Idempotency-Key': '<idempotency-key>',
Authorization: 'Bearer <token>',
'Content-Type': 'application/json'
},
body: JSON.stringify({
debtor: {
account_identifier: {type: 'account_number_id', value: 'account_number_xyz123'},
chain: 'ethereum',
refund_wallet_address: '0xabc123def456',
entity_id: 'entity_xyz123'
},
creditor: {
payment_rail: 'wire',
ach: {account_number: '123456789', routing_number: '021000021'},
type: 'individual',
address: {
line_one: '123 Main St',
city: 'San Francisco',
country: 'US',
line_two: 'Suite 100',
state: 'CA',
postal_code: '94105'
}
},
amounts: {
instructed_amount: 100000,
instructed_currency_code: 'USD',
settlement_currency_code: 'MXN'
},
payment_purpose: {type: 'invoice_payment', other_details: 'Monthly vendor payment'},
reference: 'INV2024001'
})
};
fetch('https://api.sandbox.lead.bank/v0/blockchain_payments', 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.sandbox.lead.bank/v0/blockchain_payments",
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([
'debtor' => [
'account_identifier' => [
'type' => 'account_number_id',
'value' => 'account_number_xyz123'
],
'chain' => 'ethereum',
'refund_wallet_address' => '0xabc123def456',
'entity_id' => 'entity_xyz123'
],
'creditor' => [
'payment_rail' => 'wire',
'ach' => [
'account_number' => '123456789',
'routing_number' => '021000021'
],
'type' => 'individual',
'address' => [
'line_one' => '123 Main St',
'city' => 'San Francisco',
'country' => 'US',
'line_two' => 'Suite 100',
'state' => 'CA',
'postal_code' => '94105'
]
],
'amounts' => [
'instructed_amount' => 100000,
'instructed_currency_code' => 'USD',
'settlement_currency_code' => 'MXN'
],
'payment_purpose' => [
'type' => 'invoice_payment',
'other_details' => 'Monthly vendor payment'
],
'reference' => 'INV2024001'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json",
"Idempotency-Key: <idempotency-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.sandbox.lead.bank/v0/blockchain_payments"
payload := strings.NewReader("{\n \"debtor\": {\n \"account_identifier\": {\n \"type\": \"account_number_id\",\n \"value\": \"account_number_xyz123\"\n },\n \"chain\": \"ethereum\",\n \"refund_wallet_address\": \"0xabc123def456\",\n \"entity_id\": \"entity_xyz123\"\n },\n \"creditor\": {\n \"payment_rail\": \"wire\",\n \"ach\": {\n \"account_number\": \"123456789\",\n \"routing_number\": \"021000021\"\n },\n \"type\": \"individual\",\n \"address\": {\n \"line_one\": \"123 Main St\",\n \"city\": \"San Francisco\",\n \"country\": \"US\",\n \"line_two\": \"Suite 100\",\n \"state\": \"CA\",\n \"postal_code\": \"94105\"\n }\n },\n \"amounts\": {\n \"instructed_amount\": 100000,\n \"instructed_currency_code\": \"USD\",\n \"settlement_currency_code\": \"MXN\"\n },\n \"payment_purpose\": {\n \"type\": \"invoice_payment\",\n \"other_details\": \"Monthly vendor payment\"\n },\n \"reference\": \"INV2024001\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Idempotency-Key", "<idempotency-key>")
req.Header.Add("Authorization", "Bearer <token>")
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.sandbox.lead.bank/v0/blockchain_payments")
.header("Idempotency-Key", "<idempotency-key>")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"debtor\": {\n \"account_identifier\": {\n \"type\": \"account_number_id\",\n \"value\": \"account_number_xyz123\"\n },\n \"chain\": \"ethereum\",\n \"refund_wallet_address\": \"0xabc123def456\",\n \"entity_id\": \"entity_xyz123\"\n },\n \"creditor\": {\n \"payment_rail\": \"wire\",\n \"ach\": {\n \"account_number\": \"123456789\",\n \"routing_number\": \"021000021\"\n },\n \"type\": \"individual\",\n \"address\": {\n \"line_one\": \"123 Main St\",\n \"city\": \"San Francisco\",\n \"country\": \"US\",\n \"line_two\": \"Suite 100\",\n \"state\": \"CA\",\n \"postal_code\": \"94105\"\n }\n },\n \"amounts\": {\n \"instructed_amount\": 100000,\n \"instructed_currency_code\": \"USD\",\n \"settlement_currency_code\": \"MXN\"\n },\n \"payment_purpose\": {\n \"type\": \"invoice_payment\",\n \"other_details\": \"Monthly vendor payment\"\n },\n \"reference\": \"INV2024001\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.sandbox.lead.bank/v0/blockchain_payments")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Idempotency-Key"] = '<idempotency-key>'
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"debtor\": {\n \"account_identifier\": {\n \"type\": \"account_number_id\",\n \"value\": \"account_number_xyz123\"\n },\n \"chain\": \"ethereum\",\n \"refund_wallet_address\": \"0xabc123def456\",\n \"entity_id\": \"entity_xyz123\"\n },\n \"creditor\": {\n \"payment_rail\": \"wire\",\n \"ach\": {\n \"account_number\": \"123456789\",\n \"routing_number\": \"021000021\"\n },\n \"type\": \"individual\",\n \"address\": {\n \"line_one\": \"123 Main St\",\n \"city\": \"San Francisco\",\n \"country\": \"US\",\n \"line_two\": \"Suite 100\",\n \"state\": \"CA\",\n \"postal_code\": \"94105\"\n }\n },\n \"amounts\": {\n \"instructed_amount\": 100000,\n \"instructed_currency_code\": \"USD\",\n \"settlement_currency_code\": \"MXN\"\n },\n \"payment_purpose\": {\n \"type\": \"invoice_payment\",\n \"other_details\": \"Monthly vendor payment\"\n },\n \"reference\": \"INV2024001\"\n}"
response = http.request(request)
puts response.read_body{
"id": "blockchain_payment_xyz123",
"debtor": {
"account_identifier": {
"type": "account_number_id",
"value": "account_number_xyz123"
},
"chain": "ethereum",
"refund_wallet_address": "0xabc123def456",
"funding_instructions": {
"from_wallet_address": "0xabc123def456",
"chain": "ethereum",
"amount": "100.00",
"currency_code": "USDC",
"to_wallet_address": "0xdef456abc789"
},
"entity_id": "entity_xyz123"
},
"creditor": {
"payment_rail": "wire",
"ach": {
"account_number": "123456789",
"routing_number": "021000021"
},
"type": "individual",
"address": {
"line_one": "123 Main St",
"city": "San Francisco",
"country": "US",
"line_two": "Suite 100",
"state": "CA",
"postal_code": "94105"
},
"ach_wire": {
"account_number": "123456789",
"routing_number": "021000021"
},
"wire": {
"account_number": "123456789",
"routing_number": "021000021"
},
"bre_b": {
"bre_b_key": "1234567890"
},
"fps": {
"account_number": "12345678",
"sort_code": "123456"
},
"iban": {
"account_number": "DE89370400440532013000",
"country": "DE",
"business_identifier_code": "COBADEFFXXX"
},
"swift": {
"account_number": "123456789",
"country": "GB",
"business_identifier_code": "BARCGB22XXX",
"role": "client",
"purpose_of_funds": "invoice_for_goods_and_services",
"short_business_desc": "Software development services"
},
"clabe": {
"account_number": "032180000118359719"
},
"pix_key": {
"pix_key": "12345678909",
"document_number": "12345678901"
},
"pix_br_code": {
"br_code": "00020126580014br.gov.bcb.pix...",
"document_number": "12345678901"
},
"co_bank_transfer": {
"account_number": "1234567890",
"bank_code": "1007",
"account_type": "savings",
"document_type": "cc",
"document_number": "12345678901",
"phone_number": "+573001234567"
},
"wallet": {
"wallet_address": "0xdef456abc789"
},
"individual": {
"first_name": "Maria",
"last_name": "Garcia"
},
"business": {
"business_name": "Acme International LLC"
}
},
"creditor_agent": {
"bank_name": "Banco Nacional de Mexico",
"country_code": "MX",
"address": {
"line_one": "123 Main St",
"city": "San Francisco",
"country": "US",
"line_two": "Suite 100",
"state": "CA",
"postal_code": "94105"
}
},
"amounts": {
"instructed_amount": 100000,
"instructed_currency_code": "USD",
"settlement_currency_code": "MXN",
"settlement_amount": 100000,
"settlement_exchange_rate": "1.00"
},
"payment_purpose": {
"type": "invoice_payment",
"other_details": "Monthly vendor payment"
},
"reference": "INV2024001",
"status": "created",
"rejection_reason": "name_mismatch",
"cancelation_reason": "Requested by customer",
"return": {
"code": "account_closed",
"reason": "The destination account has been closed."
},
"related_blockchain_payments": {
"original_blockchain_payment_id": "blockchain_payment_2x7abc123def456ghi789jkl",
"return_blockchain_payment_ids": [
"blockchain_payment_9y4mno321pqr654stu987vwx"
]
},
"created_at": "2024-06-27T11:22:33Z",
"updated_at": "2024-06-27T11:22:33Z"
}{
"code": "<string>",
"title": "<string>",
"detail": "<string>",
"status": "<string>",
"invalid_parameters": [
{
"parameter": "transaction_type",
"reason": "<string>"
}
],
"instance": "<string>"
}{
"code": "<string>",
"title": "<string>",
"detail": "<string>",
"status": "<string>",
"invalid_parameters": [
{
"parameter": "transaction_type",
"reason": "<string>"
}
],
"instance": "<string>"
}{
"code": "<string>",
"title": "<string>",
"detail": "<string>",
"status": "<string>",
"invalid_parameters": [
{
"parameter": "transaction_type",
"reason": "<string>"
}
],
"instance": "<string>"
}{
"code": "<string>",
"title": "<string>",
"detail": "<string>",
"status": "<string>",
"invalid_parameters": [
{
"parameter": "transaction_type",
"reason": "<string>"
}
],
"instance": "<string>"
}{
"code": "<string>",
"title": "<string>",
"detail": "<string>",
"status": "<string>",
"invalid_parameters": [
{
"parameter": "transaction_type",
"reason": "<string>"
}
],
"instance": "<string>"
}{
"code": "<string>",
"title": "<string>",
"detail": "<string>",
"status": "<string>",
"invalid_parameters": [
{
"parameter": "transaction_type",
"reason": "<string>"
}
],
"instance": "<string>"
}{
"code": "<string>",
"title": "<string>",
"detail": "<string>",
"status": "<string>",
"invalid_parameters": [
{
"parameter": "transaction_type",
"reason": "<string>"
}
],
"instance": "<string>"
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Headers
Idempotency key
5 - 255Body
Creates a payment to a fiat or cross-border creditor.
Only fiat-to-fiat transfers are currently accepted: a wallet_address
debtor and the blockchain creditor rails (solana, base, ethereum)
are advertised in the enums but rejected at creation.
The debtor's available balance is checked at creation: insufficient funds
are normally rejected synchronously with HTTP 400 and no payment is
created. When the balance service is temporarily unavailable the check is
deferred to asynchronous processing, so a successful create response is not
an absolute guarantee of settlement.
The source of funds for the transfer.
Show child attributes
Show child attributes
Common creditor fields shared by every payment rail. This is the base of
the rail-specific creditor variants; integrations reference
BlockchainPaymentCreditor, which selects the correct variant from
payment_rail.
- Option 1
- Option 2
- Option 3
- Option 4
- Option 5
- Option 6
- Option 7
- Option 8
- Option 9
- Option 10
- Option 11
- Option 12
Show child attributes
Show child attributes
The transfer amounts and currency codes.
Show child attributes
Show child attributes
The purpose of the transfer.
Show child attributes
Show child attributes
Details of the receiving financial institution. Required when
creditor.payment_rail is not a blockchain network (solana, base,
ethereum). When creditor.payment_rail is swift, address is also
required.
Show child attributes
Show child attributes
An optional reference message for the transfer, passed on to the recipient on rails that carry a reference.
Formatting requirements depend on creditor.payment_rail. The reference
is stored and delivered exactly as submitted — it is never shortened,
stripped, or otherwise altered. A reference that does not meet its
rail's requirements is rejected when the payment is created, with HTTP
422 and an invalid_parameters entry for reference.
payment_rail | Length | Allowed characters |
|---|---|---|
ach | 1–10 | letters, digits, spaces |
wire | 1–140 | any character (line-formatted, see below) |
sepa | 6–140 | letters, digits, spaces, and & - . / |
spei | 1–40 | letters, digits, spaces |
swift | 1–190 | letters, digits, spaces, and / - ? : ( ) . , ' + (line-formatted, see below) |
pix | 1–100 | letters, digits, spaces |
faster_payments | 1–18 | letters, digits, spaces |
Additional rules:
wireandswiftreferences are formatted into at most 4 lines of 35 characters. Words are kept whole and wrapped at spaces; include your own line breaks (\n) to control the layout. A single word longer than 35 characters, or text that cannot fit within 4 lines, is rejected.separequires a minimum of 6 characters. If you omit the reference on asepapayment, one is generated for you and returned on the created payment object.bre_b,co_bank_transfer,ethereum,base, andsolanado not carry a reference; supplying one is rejected.- Omitting the field, or sending an empty string, is allowed on every
rail except
sepaand results in no reference being sent.
"INV2024001"
Response
Successful response
A blockchain payment object representing a fiat or cross-border payment.
The ID of the Blockchain Payment object.
^blockchain_payment_\w+$"blockchain_payment_xyz123"
The source of funds for the transfer, with enriched entity data.
Show child attributes
Show child attributes
Common creditor fields shared by every payment rail. This is the base of
the rail-specific creditor variants; integrations reference
BlockchainPaymentCreditor, which selects the correct variant from
payment_rail.
- Option 1
- Option 2
- Option 3
- Option 4
- Option 5
- Option 6
- Option 7
- Option 8
- Option 9
- Option 10
- Option 11
- Option 12
Show child attributes
Show child attributes
Details of the receiving financial institution. Required when
creditor.payment_rail is not a blockchain network (solana, base,
ethereum). When creditor.payment_rail is swift, address is also
required.
Show child attributes
Show child attributes
The transfer amounts, currency codes, and settlement details.
Show child attributes
Show child attributes
The purpose of the transfer.
Show child attributes
Show child attributes
The reference message for the transfer. For sepa payments created
without a reference, this is a value generated automatically at
creation, of the form Payment via Lead <payment id> (the payment's
public ID with underscores replaced by hyphens, e.g.
Payment via Lead blockchain-payment-2x7abc...). See reference on the
create request for the per-rail formatting rules.
"INV2024001"
The current status of the blockchain payment.
created, under_review, awaiting_funds, submitted, posted, rejected, canceled "created"
Reason the transfer was rejected, as a closed machine-readable code
(BlockchainPaymentStatusReasonCode). Present only when status is
rejected. See that enum for the per-value terminal-vs-retryable
semantics you need to build the right resubmit logic.
payment_could_not_be_processed, name_mismatch, name_not_validated, account_closed "name_mismatch"
Reason the transfer was canceled. Present only if status is canceled.
"Requested by customer"
Details of the return on this payment. Present only when the payment was returned after being sent.
Show child attributes
Show child attributes
Other blockchain payments linked to this one. On a payment that was returned, this holds the IDs of the return payments sending the funds back. On a return payment, it holds the ID of the original payment being returned. Absent when the payment has no related payments.
Show child attributes
Show child attributes
ISO 8601 format timestamp representing when the blockchain payment was created.
"2024-06-27T11:22:33Z"
ISO 8601 format timestamp representing when the blockchain payment was last updated.
"2024-06-27T11:22:33Z"
Was this page helpful?

