Initiate Request Debit Payout
Request Debit Payout
The Request Debit endpoint initiates a debit request from a source wallet to a target wallet. The request returns an authorization token that must be used to confirm the transaction with the source wallet's PIN.
Request
POST {{base_url}}/api/v1/user/wallet/debit
Authentication
LedgerBlock uses Bearer Token authentication. Include your API key in the Authorization header.
| Parameter | Value | Type |
|---|---|---|
| Authorization | {{api_key}} | Bearer Token |
Headers
| Header | Required | Description | Example |
|---|---|---|---|
Content-Type | Yes | Specifies that the request body is JSON. | application/json |
x-merchant-ref | Yes | Unique reference identifying the merchant. | {{vault:x-merchant-ref}} |
Request Body
| Parameter | Required | Description | Example |
|---|---|---|---|
user_ref | Yes | Unique reference identifying the user initiating the debit request. | {{merchant_user_ref}} |
source_wallet_id | Yes | ID of the wallet from which funds will be debited. | WALLET_SOURCE_001 |
target_wallet_id | Yes | ID of the wallet receiving the funds. | WALLET_TARGET_001 |
txn_ref | Yes | Unique merchant-generated reference for the transaction. | DUMMY_DEBIT_001 |
amount | Yes | Amount to transfer. | 10 |
currency | Yes | Currency of the transaction. | NGN |
notification_url | Yes | URL that receives transaction status notifications. | https://example.com/webhooks/debit |
Example Request
{
"user_ref": "DUMMY_USER_REF_001",
"source_wallet_id": "WALLET_SOURCE_001",
"target_wallet_id": "WALLET_TARGET_001",
"txn_ref": "DUMMY_DEBIT_001",
"amount": 10,
"currency": "NGN",
"notification_url": "https://example.com/webhooks/debit"
}Example Response
{
"status": "success",
"message": "Debit request initialized. Confirm with your wallet PIN to complete it",
"data": {
"auth_token": "{{auth_token}}",
"expires_in_seconds": 600
}
}Response Parameters
| Field | Description |
|---|---|
status | Indicates whether the debit request was initialized successfully. |
message | Describes the result of the request and the next action required. |
data.auth_token | Temporary authorization token required to confirm the debit request. |
data.expires_in_seconds | Time in seconds before the authorization token expires. |
Next Step
Use the returned auth_token and the source wallet's PIN to confirm the debit request through the corresponding confirmation endpoint. The debit request is not complete until it is confirmed.
Updated 18 days ago
Did this page help you?
