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.

ParameterValueType
Authorization{{api_key}}Bearer Token

Headers

HeaderRequiredDescriptionExample
Content-TypeYesSpecifies that the request body is JSON.application/json
x-merchant-refYesUnique reference identifying the merchant.{{vault:x-merchant-ref}}

Request Body

ParameterRequiredDescriptionExample
user_refYesUnique reference identifying the user initiating the debit request.{{merchant_user_ref}}
source_wallet_idYesID of the wallet from which funds will be debited.WALLET_SOURCE_001
target_wallet_idYesID of the wallet receiving the funds.WALLET_TARGET_001
txn_refYesUnique merchant-generated reference for the transaction.DUMMY_DEBIT_001
amountYesAmount to transfer.10
currencyYesCurrency of the transaction.NGN
notification_urlYesURL 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

FieldDescription
statusIndicates whether the debit request was initialized successfully.
messageDescribes the result of the request and the next action required.
data.auth_tokenTemporary authorization token required to confirm the debit request.
data.expires_in_secondsTime 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.


Did this page help you?