Wallet Request Debit
Allows a merchant to initiate a debit request from a user's source wallet to a destination wallet.
The request requires both a source wallet and a destination wallet. Once the debit request is successfully initialized, LedgerBlock provides an auth token. This token is used in the confirmation step with the user's wallet PIN to complete the debit.
Request
POST {{base_url}}/api/v1/user/wallet/debit
Authentication & 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 | Type | Required | Description | Example |
|---|---|---|---|---|
user_ref | string | Yes | Reference of the user whose wallet will be debited. | USR_784521 |
source_wallet_id | string | Yes | ID of the wallet to be debited. | WAL_NGN_001 |
target_wallet_id | string | Yes | ID of the wallet receiving the funds. | WAL_NGN_002 |
txn_ref | string | Yes | Unique reference for the debit transaction. | LGB_DEBIT_001245 |
amount | number | Yes | Amount to debit from the source wallet. | 2500 |
currency | string | Yes | Currency of the debit. | NGN |
notification_url | string | No | URL to receive transaction notifications. | https://example.com/webhook |
Example Request
{
"user_ref": "USR_784521",
"source_wallet_id": "WAL_NGN_001",
"target_wallet_id": "WAL_NGN_002",
"txn_ref": "LGB_DEBIT_001245",
"amount": 2500,
"currency": "NGN",
"notification_url": "https://example.com/webhook"
}Example Response
{
"status": "success",
"message": "Debit request initialized. Confirm with your wallet PIN to complete it",
"data": {
"auth_token": "c71f8a42d6e903b52a194f87e625d3c9",
"expires_in_seconds": 600
}
}Response
| Field | Type | Description |
|---|---|---|
status | string | Indicates whether the debit request was successfully initialized. |
message | string | Provides the result of the debit initialization. |
data | object | Contains the authorization details required to confirm the debit. |
data.auth_token | string | Temporary authorization token used to confirm the debit request. |
data.expires_in_seconds | integer | Time in seconds before the authorization token expires. |
Next Step: Use the returned
auth_tokento confirm the debit with the user's wallet PIN.
Updated 20 days ago
Did this page help you?
