Payment Links
Create Payment Link
Changed onCreate a new payment link
post/payment-links
Request
- The document declares no server URL.
- Authnone declared. Required headers: ApiKey, MerchantId, Environment
Headers
ApiKeystring required
Your api key. To create a key, please get into our dashboard. If you don't have access to it, please reach the Support team.
MerchantIdstring required
Your merchant ID. This information is available in our dashboard. If you don't have access to it, please reach the Support team.
Environment'live' | 'sandbox' required
Allow you to choose between the sandbox mode to perform some tests or the live mode for real world transactions.
Request body
Example request
{
"amount": 1000,
"minAmount": 500,
"maxAmount": 100000,
"currency": "XOF",
"purchaseReference": "ORDER-12345",
"type": "multi_use",
"maximumPayments": 50,
"providers": [
"orange",
"mtn"
],
"paymentMethods": [
"mobile_money"
],
"country": "CI",
"expirationDate": "2025-10-15T14:30:00.000Z",
"successUrl": "https://merchant.com/success",
"failureUrl": "https://merchant.com/failure",
"customerPhoneNumber": "12345678",
"description": "Payment for order 1234567890",
"customerFields": [
{
"fieldName": "national_id",
"fieldLabel": "National ID"
}
]
}Response
Payment link created successfully
Example response
{
"id": "pl_z1urYtVFgEebtcj8fxp4v",
"url": "https://pay.hub2.com/pl_z1urYtVFgEebtcj8fxp4v",
"status": "active",
"purchaseReference": "ORDER-12345",
"minAmount": 500,
"maxAmount": 100000,
"currency": "XOF",
"maximumPayments": 50,
"maximumAttempts": 3,
"createdAt": "2024-01-15T12:00:00.000Z",
"updatedAt": "2024-01-15T12:30:00.000Z",
"expirationDate": "2024-01-15T14:30:00.000Z",
"customerPhoneNumber": "123456789",
"type": "single_use",
"providers": [
"orange",
"mtn"
],
"customerFields": [
{
"fieldName": "national_id",
"fieldLabel": "National ID"
}
]
}Changes
- info
endpoint added
- info