EUSD
Creates a dynamic sub-wallet collection address for receiving EUSD payments. Once the customer completes the payment successfully, LedgerBlock sends a notification to the configured notification_url.
Request
POST {{base_url}}/api/v1/collection/subwallet
Supported Payment Methods
| Payment Method | Description |
|---|---|
CRYPTO_PAYMENT | Collects payment using cryptocurrency. |
Additional information required to complete a payment can be passed through pay_meta_data, depending on the selected payment method.
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 collection. | {{merchant_user_ref}} |
txn_merchant_ref | Yes | Unique merchant-generated reference for the collection transaction. | DUMMY_EUSD_001 |
amount | Yes | Amount of EUSD to be collected. | 10 |
currency | Yes | Currency identifier for the collection. | EUSD |
chain | Yes | Blockchain network used for the collection, if required by the selected payment method. | POL |
payment_method | Yes | Payment method selected for the collection. | CRYPTO_PAYMENT |
pay_meta_data | No | Additional payment information required for the selected payment method. | {} |
notification_url | Yes | Webhook URL that receives payment notifications. | https://example.com/webhooks/collection |
Example Request
{
"user_ref": "{{merchant_user_ref}}",
"txn_merchant_ref": "DUMMY_EUSD_001",
"amount": 10,
"currency": "EUSD",
"chain": "MOB",
"payment_method": "CRYPTO_PAYMENT",
"pay_meta_data": {},
"notification_url": "https://example.com/webhooks/collection"
}Example Response
{
"status": "success",
"message": "Please complete payment",
"data": {
"payment_ref": "dummy-payment-ref-001",
"txn_merchant_ref": "DUMMY_EUSD_001",
"amount": 10,
"currency": "EUSD",
"pay_data": {
"address": "0x0000000000000000000000000000000000000000",
"chain": "POL"
}
}
}Response
| Field | Description |
|---|---|
status | Indicates whether the collection request was successfully initialized. |
message | Provides information about the collection request. |
data.payment_ref | Unique reference assigned to the collection by LedgerBlock. |
data.txn_merchant_ref | Merchant-generated reference associated with the collection. |
data.amount | Amount requested for collection. |
data.currency | Currency identifier for the payment. |
data.pay_data | Contains the payment details required to complete the collection. |
data.pay_data.address | Dynamic wallet address to which the customer sends the payment. |
data.pay_data.chain | Blockchain network on which the payment must be made. |
Payment Flow
- Submit the collection request with the user reference, amount, currency, and payment method.
- Retrieve the dynamic wallet address from
data.pay_data.address. - Have the customer complete the payment using the returned payment details.
- LedgerBlock sends a notification to the configured
notification_urlwhen the payment succeeds.
Updated about 1 month ago
Did this page help you?
