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 MethodDescription
CRYPTO_PAYMENTCollects 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.

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 collection.{{merchant_user_ref}}
txn_merchant_refYesUnique merchant-generated reference for the collection transaction.DUMMY_EUSD_001
amountYesAmount of EUSD to be collected.10
currencyYesCurrency identifier for the collection.EUSD
chainYesBlockchain network used for the collection, if required by the selected payment method.POL
payment_methodYesPayment method selected for the collection.CRYPTO_PAYMENT
pay_meta_dataNoAdditional payment information required for the selected payment method.{}
notification_urlYesWebhook 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

FieldDescription
statusIndicates whether the collection request was successfully initialized.
messageProvides information about the collection request.
data.payment_refUnique reference assigned to the collection by LedgerBlock.
data.txn_merchant_refMerchant-generated reference associated with the collection.
data.amountAmount requested for collection.
data.currencyCurrency identifier for the payment.
data.pay_dataContains the payment details required to complete the collection.
data.pay_data.addressDynamic wallet address to which the customer sends the payment.
data.pay_data.chainBlockchain network on which the payment must be made.

Payment Flow

  1. Submit the collection request with the user reference, amount, currency, and payment method.
  2. Retrieve the dynamic wallet address from data.pay_data.address.
  3. Have the customer complete the payment using the returned payment details.
  4. LedgerBlock sends a notification to the configured notification_url when the payment succeeds.

Did this page help you?