Skip to main content
GET
/
v0
/
blockchain_payments
/
{blockchain_payment_id}
Retrieve a Blockchain Payment
curl --request GET \
  --url https://api.sandbox.lead.bank/v0/blockchain_payments/{blockchain_payment_id} \
  --header 'Authorization: Bearer <token>'
import requests

url = "https://api.sandbox.lead.bank/v0/blockchain_payments/{blockchain_payment_id}"

headers = {"Authorization": "Bearer <token>"}

response = requests.get(url, headers=headers)

print(response.text)
const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};

fetch('https://api.sandbox.lead.bank/v0/blockchain_payments/{blockchain_payment_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.sandbox.lead.bank/v0/blockchain_payments/{blockchain_payment_id}",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => "",
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 30,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => "GET",
  CURLOPT_HTTPHEADER => [
    "Authorization: Bearer <token>"
  ],
]);

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
  echo "cURL Error #:" . $err;
} else {
  echo $response;
}
package main

import (
	"fmt"
	"net/http"
	"io"
)

func main() {

	url := "https://api.sandbox.lead.bank/v0/blockchain_payments/{blockchain_payment_id}"

	req, _ := http.NewRequest("GET", url, nil)

	req.Header.Add("Authorization", "Bearer <token>")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(string(body))

}
HttpResponse<String> response = Unirest.get("https://api.sandbox.lead.bank/v0/blockchain_payments/{blockchain_payment_id}")
  .header("Authorization", "Bearer <token>")
  .asString();
require 'uri'
require 'net/http'

url = URI("https://api.sandbox.lead.bank/v0/blockchain_payments/{blockchain_payment_id}")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'

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 in request and name on account do not match",
  "cancelation_reason": "Requested by customer",
  "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>"
}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Path Parameters

blockchain_payment_id
string
required

The ID of the blockchain payment object to be retrieved.

Minimum string length: 5
Pattern: ^blockchain_payment_\w+$

Response

A Blockchain Payment object.

A blockchain payment object representing a fiat or cross-border payment.

id
string

The ID of the Blockchain Payment object.

Pattern: ^blockchain_payment_\w+$
Example:

"blockchain_payment_xyz123"

debtor
object

The source of funds for the transfer, with enriched entity data.

creditor
object

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.

creditor_agent
object

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.

amounts
object

The transfer amounts, currency codes, and settlement details.

payment_purpose
object

The purpose of the transfer.

reference
string

The reference message for the transfer. For iban 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.

Example:

"INV2024001"

status
enum<string>

The current status of the blockchain payment.

Available options:
created,
under_review,
awaiting_funds,
submitted,
posted,
rejected,
canceled
Example:

"created"

rejection_reason
string

Reason the transfer was rejected. Present only if status is rejected.

On account-validated rails (currently pix and spei), name validation against the receiving account produces the following reasons. Distinguish retryable from terminal so you build the right resubmit logic:

  • name in request and name on account do not matchterminal. The creditor name did not match the legal name on the validated receiving account. Do not resubmit unchanged; correct the creditor name to match the account.
  • name could not be validatedretryable. The receiving account's name was not validated in time. Resubmit the same payment; it reuses the held account and succeeds once validation completes.
  • account closedterminal. The receiving account is closed and a resubmit cannot succeed.

Other reasons may be returned as plain text.

Example:

"name in request and name on account do not match"

cancelation_reason
string

Reason the transfer was canceled. Present only if status is canceled.

Example:

"Requested by customer"

created_at
string<date-time>

ISO 8601 format timestamp representing when the blockchain payment was created.

Example:

"2024-06-27T11:22:33Z"

updated_at
string<date-time>

ISO 8601 format timestamp representing when the blockchain payment was last updated.

Example:

"2024-06-27T11:22:33Z"