Skip to main content
POST
/
refund-transaction
/
{transaction_id}
curl --request POST \
  --url http://localhost:5001/refund-transaction/{transaction_id} \
  --header 'X-blnk-key: <api-key>'
{
    "amount": 1250.34,
    "rate": 0,
    "precision": 100,
    "precise_amount": 125034,
    "transaction_id": "txn_c4e70eb8-e4d6-4e04-a2e2-92a43b969e0c",
    "parent_transaction": "txn_c4e70eb8-e4d6-4e04-a2e2-92a43b969e0c",
    "source": "bln_f344b673-e855-4bda-b769-3e94a02c1941",
    "destination": "@WorldUSD",
    "reference": "ref_2ye281ewiu-1e17-dh17-eh18728hd245",
    "currency": "USD",
    "description": "Card payment on Stripe",
    "status": "QUEUED",
    "hash": "0b9c25fb5b00d6c71cb4ca87026bf6dc316e63353d3330deb588bd0b3d74dcc0",
    "allow_overdraft": false,
    "inflight": false,
    "created_at": "2024-11-26T09:33:35.265582042Z",
    "scheduled_for": "0001-01-01T00:00:00Z",
    "inflight_expiry_date": "0001-01-01T00:00:00Z",
    "inflight_commit_date": "0001-01-01T00:00:00Z"
}

Documentation Index

Fetch the complete documentation index at: https://docs.blnkfinance.com/llms.txt

Use this file to discover all available pages before exploring further.

Authorization

If set, the API uses an API key for authentication. Include the following header in your requests: X-blnk-key: <api-key>. Replace <api-key> with your secret API key. Ensure the key is kept secure and not exposed in public repositories or client-side code. See also: Secure your Blnk server

Path

transaction_id
string
required
The unique id of the transaction to be refunded.

Body

skip_queue
boolean
default:"false"
When true, processes the refund synchronously instead of placing it on the transaction queue. Requests without a body keep the default queued behavior.

Response

Same JSON structure as Record a transaction
curl --request POST \
  --url http://localhost:5001/refund-transaction/{transaction_id} \
  --header 'X-blnk-key: <api-key>'
{
    "amount": 1250.34,
    "rate": 0,
    "precision": 100,
    "precise_amount": 125034,
    "transaction_id": "txn_c4e70eb8-e4d6-4e04-a2e2-92a43b969e0c",
    "parent_transaction": "txn_c4e70eb8-e4d6-4e04-a2e2-92a43b969e0c",
    "source": "bln_f344b673-e855-4bda-b769-3e94a02c1941",
    "destination": "@WorldUSD",
    "reference": "ref_2ye281ewiu-1e17-dh17-eh18728hd245",
    "currency": "USD",
    "description": "Card payment on Stripe",
    "status": "QUEUED",
    "hash": "0b9c25fb5b00d6c71cb4ca87026bf6dc316e63353d3330deb588bd0b3d74dcc0",
    "allow_overdraft": false,
    "inflight": false,
    "created_at": "2024-11-26T09:33:35.265582042Z",
    "scheduled_for": "0001-01-01T00:00:00Z",
    "inflight_expiry_date": "0001-01-01T00:00:00Z",
    "inflight_commit_date": "0001-01-01T00:00:00Z"
}

Need help?

We are very happy to help you make the most of Blnk, regardless of whether it is your first time or you are switching from another tool. To ask questions or discuss issues, please contact us or join our Discord community.