The Payment Links API allows you to accept payments from customers using a payment link URL. The payment link URL takes your shopper to an Hub2 hosted secure checkout page where they can make the payment with their preferred payment method.
Request
Reference of the Purchase on your system (e.g., EM_TEST_1006)
The additional description text that appears under the title in the payment checkout page. (e.g., Text displayed for the description)
The payment amount (e.g., 500).
Minimum amount for payment links is 500 XOF.
The payment currency. (e.g., XOF)
Country where the customers should pay (e.g., CI)
Specifies whether the payment link can be used once or multiple times. Default value is “single_use” for the current version of the API. (e.g., CI)
The number of the customer associated with the purchaseReference. (e.g., 0707070707)
Expiration date of the payment links (ISO 8601 format). Default value is 15mins (e.g., 2025-11-01T00:00:00.000Z)
Response
The unique Payment Links ID
The unique Payment Links URL
The current status of the Payment Links. Possible values: active, completed, closed, expired
Reference of the Purchase associated with the payment links
The currency of the payment (e.g., XOF, XAF)
Maximum payments allowed for a payment links.
Maximum payments attempts allowed for a payment links.
The date and time when the payment links was created
The date and time when the payment links was last updated
The date and time when the payment links will expire
The list of payment methods allowed for the payment link created
The URL to which the user is redirected upon a successful payment
The URL to which the user is redirected if the payment fails
The customer PhoneNumber set for the payment.
curl --location 'https://api.hub2.io/payment-links' \
--header 'ApiKey: [REDACTED]' \
--header 'MerchantId: [REDACTED]' \
--header 'Environment: live' \
--header 'Content-Type: application/json' \
--data '{
"purchaseReference": "EM_TEST_0016",
"description":"Payment Links are the fastest way to start accepting payments from your customers",
"amount": 100,
"currency": "XOF",
"type":"single_use",
"expirationDate": "2025-10-27T18:30:00",
"paymentMethods": [
"mobile_money"
],
"country": "CI",
"providers": [
"Orange",
"Moov",
"MTN"
]
}'
{
"id": "pl_PX0YZsb3iFg23vX7hWbcC",
"url": "https://pay.preprod.hub2.io/pl_PX0YZsb3iFg23vX7hWbcC",
"status": "active",
"purchaseReference": "EM_TEST_0016",
"amount": 100,
"currency": "XOF",
"maximumPayments": 1,
"maximumAttempts": 3,
"createdAt": "2025-10-27T09:17:52.927Z",
"updatedAt": "2025-10-27T09:17:52.927Z",
"expirationDate": "2025-10-27T18:30:00.000Z",
"operators": {
"mobile_money": [
"Orange",
"MTN",
"Moov"
]
},
"merchantId": "16",
"description": "Payment Links are the fastest way to start accepting payments from your customers. Simply input your currency and the amount you would like to charge your customer and a link will be generated. Links can be personalised.271025-09.13",
"successUrl": "https://hub2.io",
"failureUrl": "https://hub2.io",
"customerPhoneNumber": null,
"type": "single_use"
}