API Reference

Bridge Server

Endpoints your bridge server must implement to participate in the two-phase commit protocol — the ledger calls these to prepare and commit debits and credits on external bank accounts.

Prepare debit

POST
/debits

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

curl -X POST "https://your-bridge-server.example.com/debits" \  -H "Content-Type: application/json" \  -d '{    "data": {      "handle": "deb_01u9RGCevt4rEkRMV",      "luid": "$deb.7788",      "schema": "debit",      "amount": 18500000,      "symbol": {        "handle": "cop"      },      "source": {        "handle": "svgs:10000001@bancorojo.com.co",        "custom": {          "name": "Juan Carlos Perez Gomez",          "scheme": "cc",          "number": "1023456789"        }      },      "target": {        "handle": "svgs:99999999@bancoamarillo.com.co",        "custom": {          "name": "Hub Aggregate Account",          "scheme": "nit",          "number": "900100001"        }      },      "inputs": [        0      ],      "intent": {        "data": {          "handle": "pay-breb-20260608-001"        },        "hash": "d6e8f2a4b5c7...",        "luid": "$int.7788"      }    },    "hash": "j2e4f5g6...",    "meta": {      "proofs": []    }  }'
Empty

Commit debit

POST
/debits/{handle}/commit

Path Parameters

handle*string

Debit entry handle

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

body*BridgeCommitRequest

Response Body

curl -X POST "https://your-bridge-server.example.com/debits/deb_01u9RGCevt4rEkRMV/commit"
Empty

Abort debit

POST
/debits/{handle}/abort

Path Parameters

handle*string

Debit entry handle

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

body*BridgeAbortRequest

Response Body

curl -X POST "https://your-bridge-server.example.com/debits/deb_01u9RGCevt4rEkRMV/abort"
Empty

Prepare credit

POST
/credits

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

curl -X POST "https://your-bridge-server.example.com/credits" \  -H "Content-Type: application/json" \  -d '{    "data": {      "handle": "cre_baC0LUTVW9lzYA284",      "luid": "$cre.7789",      "schema": "credit",      "amount": 18500000,      "symbol": {        "handle": "cop"      },      "source": {        "handle": "svgs:10000001@bancorojo.com.co"      },      "target": {        "handle": "svgs:99999999@bancoamarillo.com.co",        "custom": {          "name": "Hub Aggregate Account",          "scheme": "nit",          "number": "900100001"        }      },      "inputs": [        0      ],      "intent": {        "data": {          "handle": "pay-breb-20260608-001"        },        "hash": "d6e8f2a4b5c7...",        "luid": "$int.7788"      }    },    "hash": "k3f5g6h7...",    "meta": {      "proofs": []    }  }'
Empty

Commit credit

POST
/credits/{handle}/commit

Path Parameters

handle*string

Credit entry handle

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

body*BridgeCommitRequest

Response Body

curl -X POST "https://your-bridge-server.example.com/credits/cre_baC0LUTVW9lzYA284/commit"
Empty

Abort credit

POST
/credits/{handle}/abort

Path Parameters

handle*string

Credit entry handle

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

body*BridgeAbortRequest

Response Body

curl -X POST "https://your-bridge-server.example.com/credits/cre_baC0LUTVW9lzYA284/abort"
Empty

On this page

No Headings