Skip to main content
POST
/
payment-links
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"
}
The PaymentLinks 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

purchaseReference
string
required
Reference of the Purchase on your system (e.g., EM_TEST_1006)
description
string
The additional description text that appears under the title in the payment checkout page. (e.g., Text displayed for the description)
amount
number
required
The payment amount (e.g., 500)
currency
string
required
The payment currency. (e.g., XOF)
country
string
required
Country where the customers should pay (e.g., CI)
type
string
required
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)
customerPhoneNumber
number
The number of the customer associated with the purchaseReference. (e.g., 0707070707)
expirationDate
string
Expiration date of the payment links (ISO 8601 format). Default value is 15mins (e.g., 2025-11-01T00:00:00.000Z)

Response

id
number
The unique Payment Links ID
URL
string
The unique Payment Links URL
status
string
The current status of the Payment Links. Possible values: active, completed, closed, expired
purchaseReference
string
Reference of the Purchase associated with the payment links
amount
number
The payment amount
currency
string
The currency of the payment (e.g., XOF, XAF)
reason
string
The reason for the refund
maximumPayments
number
Maximum payments allowed for a payment links.
maximumAttempts
number
Maximum payments attempts allowed for a payment links.
createdAt
string
The date and time when the payment links was created
updatedAt
string
The date and time when the payment links was last updated
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"
}