Wallet Transfer to Phone
Transfers funds from a LedgerBlock wallet to a wallet associated with a recipient's phone number.
Unlike a wallet-to-wallet transfer, this payout uses the recipient's phone number as the destination instead of a destination wallet ID.
The transfer requires a source wallet and target phone number. Once the transfer is successfully initiated, LedgerBlock provides an auth token that is used for the subsequent confirmation step.
Request
POST {{base_url}}/api/v1/user/wallet/transfer
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 initiating the transfer. | USR_784521 |
source_wallet_id | string | Yes | ID of the wallet from which funds will be transferred. | WAL_NGN_001 |
txn_ref | string | Yes | Unique reference for the transfer transaction. | LGB_TXN_001246 |
amount | number | Yes | Amount to transfer. | 2500 |
currency | string | Yes | Currency of the transfer. | NGN |
target_phone | string | Yes | Phone number associated with the recipient's wallet. | 2348012345678 |
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",
"txn_ref": "LGB_TXN_001246",
"amount": 2500,
"currency": "NGN",
"target_phone": "2348012345678",
"notification_url": "https://example.com/webhook"
}Example Response
{
"status": "success",
"message": "Transfer initialized. Confirm with your wallet PIN to complete it",
"data": {
"auth_token": "b82d6e51f9a47c30e8159b26c742d8e4a1f63b90",
"expires_in_seconds": 600
}
}Response
| Field | Type | Description |
|---|---|---|
status | string | Indicates whether the transfer was successfully initialized. |
message | string | Provides the result of the transfer initialization. |
data | object | Contains the authorization details required to confirm the transfer. |
data.auth_token | string | Temporary authorization token used to confirm the wallet transfer. |
data.expires_in_seconds | integer | Time in seconds before the authorization token expires. |
Next Step: Use the returned
auth_tokento confirm the transfer with the user's wallet PIN.
Updated 20 days ago
Did this page help you?
