Depa LogoDocsv1
API Reference

Blockchain Payments

Blockchain payments are on-chain transfers into and out of an account's wallets.

Incoming deposits appear automatically once confirmed. Outgoing payments are validated and queued; follow them by polling or through webhooks. As with fiat payments, a four-eyes policy can hold an outgoing payment in pending_approval until it's approved. Check the network fee first with GET /gas_fees.

List blockchain payments

GET/accounts/{account_id}/blockchain_wallets/{blockchain_wallet_id}/blockchain_payments

Returns the incoming and outgoing transfers of a wallet, page by page. Filter by status.

Authorization

BearerAuth
AuthorizationBearer <token>

Token from POST /sign_in, sent as Authorization: Bearer <token>.

In: header

Path Parameters

account_id*string

ID of the account.

Formatuuid
blockchain_wallet_id*string

ID of the blockchain wallet.

Formatuuid

Query Parameters

status?string

Return only payments with this status.

Value in

  • "blocked"
  • "completed"
  • "confirmed"
  • "failed"
  • "initiated"
  • "pending"
  • "pending_approval"
  • "ready_to_release"
  • "rejected"
  • "sent"
page?integer

Page number, starting at 1.

Range1 <= value
Default1
per_page?integer

Number of results per page. Defaults to 80.

Range1 <= value

Response Body

application/json

application/json

application/json

curl -X GET "https://example.com/accounts/8f3a2c1e-5b7d-4e9a-9c21-7d4b6e0f1a23/blockchain_wallets/9a7b3c2d-1e4f-4a6b-8c9d-0e1f2a3b4c5d/blockchain_payments?page=1&per_page=80"
{  "data": [    {      "id": "0c4f8a2e-6b1d-4e7a-8f3c-9d5b2a1e7c60",      "amount": "500.0",      "currency": "USDC",      "kind": "outgoing",      "status": "sent",      "created_at": 1772813114,      "approval_progress": "1/2",      "initiated_by": "maria@acme.example",      "approved_by": [        "jon@acme.example"      ],      "rejected_by": null    }  ],  "pagination": {    "current_page": 1,    "per_page": 80,    "total_pages": 1,    "total_count": 2  }}
POST/accounts/{account_id}/blockchain_wallets/{blockchain_wallet_id}/blockchain_payments

Creates an outgoing on-chain payment of amount currency for the wallet in the path. Depa validates and queues it; follow its status by polling or through webhooks. If a four-eyes policy covers the amount, it waits in pending_approval until approved.

Estimate the network fee first with GET /gas_fees.

Authorization

BearerAuth
AuthorizationBearer <token>

Token from POST /sign_in, sent as Authorization: Bearer <token>.

In: header

Path Parameters

account_id*string

ID of the account.

Formatuuid
blockchain_wallet_id*string

ID of the blockchain wallet.

Formatuuid

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

application/json

application/json

application/json

curl -X POST "https://example.com/accounts/8f3a2c1e-5b7d-4e9a-9c21-7d4b6e0f1a23/blockchain_wallets/9a7b3c2d-1e4f-4a6b-8c9d-0e1f2a3b4c5d/blockchain_payments" \  -H "Content-Type: application/json" \  -d '{    "amount": 500,    "currency": "USDC"  }'
{  "data": {    "id": "0c4f8a2e-6b1d-4e7a-8f3c-9d5b2a1e7c60",    "amount": "500.0",    "currency": "USDC",    "kind": "outgoing",    "status": "sent",    "created_at": 1772813114,    "approval_progress": "1/2",    "initiated_by": "maria@acme.example",    "approved_by": [      "jon@acme.example"    ],    "rejected_by": null  }}
GET/accounts/{account_id}/blockchain_wallets/{blockchain_wallet_id}/blockchain_payments/{id}

Returns an on-chain transfer and its current status.

Authorization

BearerAuth
AuthorizationBearer <token>

Token from POST /sign_in, sent as Authorization: Bearer <token>.

In: header

Path Parameters

account_id*string

ID of the account.

Formatuuid
blockchain_wallet_id*string

ID of the blockchain wallet.

Formatuuid
id*string

ID of the payment.

Formatuuid

Response Body

application/json

application/json

application/json

curl -X GET "https://example.com/accounts/8f3a2c1e-5b7d-4e9a-9c21-7d4b6e0f1a23/blockchain_wallets/9a7b3c2d-1e4f-4a6b-8c9d-0e1f2a3b4c5d/blockchain_payments/0c4f8a2e-6b1d-4e7a-8f3c-9d5b2a1e7c60"
{  "data": {    "id": "0c4f8a2e-6b1d-4e7a-8f3c-9d5b2a1e7c60",    "amount": "500.0",    "currency": "USDC",    "kind": "outgoing",    "status": "sent",    "created_at": 1772813114,    "approval_progress": "1/2",    "initiated_by": "maria@acme.example",    "approved_by": [      "jon@acme.example"    ],    "rejected_by": null  }}
POST/accounts/{account_id}/blockchain_wallets/{blockchain_wallet_id}/blockchain_payments/{id}/approve

Approves an outgoing payment that's waiting for four-eyes approval. Each user can approve a payment once. When it has enough approvals it moves to ready_to_release and is sent automatically.

Authorization

BearerAuth
AuthorizationBearer <token>

Token from POST /sign_in, sent as Authorization: Bearer <token>.

In: header

Path Parameters

account_id*string

ID of the account.

Formatuuid
blockchain_wallet_id*string

ID of the blockchain wallet.

Formatuuid
id*string

ID of the payment to approve.

Formatuuid

Response Body

application/json

application/json

application/json

application/json

curl -X POST "https://example.com/accounts/8f3a2c1e-5b7d-4e9a-9c21-7d4b6e0f1a23/blockchain_wallets/9a7b3c2d-1e4f-4a6b-8c9d-0e1f2a3b4c5d/blockchain_payments/0c4f8a2e-6b1d-4e7a-8f3c-9d5b2a1e7c60/approve"
{  "data": {    "id": "0c4f8a2e-6b1d-4e7a-8f3c-9d5b2a1e7c60",    "amount": "500.0",    "currency": "USDC",    "kind": "outgoing",    "status": "sent",    "created_at": 1772813114,    "approval_progress": "1/2",    "initiated_by": "maria@acme.example",    "approved_by": [      "jon@acme.example"    ],    "rejected_by": null  }}
POST/accounts/{account_id}/blockchain_wallets/{blockchain_wallet_id}/blockchain_payments/{id}/reject

Rejects an outgoing payment that's waiting for four-eyes approval. It becomes rejected immediately and won't be sent. Each user can review a payment once.

Authorization

BearerAuth
AuthorizationBearer <token>

Token from POST /sign_in, sent as Authorization: Bearer <token>.

In: header

Path Parameters

account_id*string

ID of the account.

Formatuuid
blockchain_wallet_id*string

ID of the blockchain wallet.

Formatuuid
id*string

ID of the payment to reject.

Formatuuid

Response Body

application/json

application/json

application/json

application/json

curl -X POST "https://example.com/accounts/8f3a2c1e-5b7d-4e9a-9c21-7d4b6e0f1a23/blockchain_wallets/9a7b3c2d-1e4f-4a6b-8c9d-0e1f2a3b4c5d/blockchain_payments/0c4f8a2e-6b1d-4e7a-8f3c-9d5b2a1e7c60/reject"
{  "data": {    "id": "0c4f8a2e-6b1d-4e7a-8f3c-9d5b2a1e7c60",    "amount": "500.0",    "currency": "USDC",    "kind": "outgoing",    "status": "sent",    "created_at": 1772813114,    "approval_progress": "1/2",    "initiated_by": "maria@acme.example",    "approved_by": [      "jon@acme.example"    ],    "rejected_by": null  }}
🍪 We do not track your behaviour or use any cookie on this site.