Make payment
Confirm the initiated payment request
End point: {BASE_URL}/api/gateway/makepayment
Request method: POST
curl --location --request POST '{{base_url}}/api/gateway/makepayment' \
--header 'x-api-key: live_F1izxxxxxxxx' \
--header 'mode: live' \
--header 'Content-Type: application/json' \
--header 'Authorization: Basic cGF5dW5pdF9xxxxxxxxxxh' \
--data-raw '{
"gateway": "CM_ORANGE",
"amount": 10000,
"transaction_id": "pu-xxxxx-xxxxxxxx",
"return_url": "https://my.website.com/payunit/return",
"phone_number": "67xxxxxxx",
"currency": "XAF",
"paymentType": "button",
"notify_url":"https://webhook.site/d457b2f3-dd71-4f04-9af5-e2fcf3be8f34"
}'
Request Body :
Parameter | Mandatory | Description |
---|---|---|
gateway | Yes | The payment method you wish to use |
transaction_id | Yes | The unique identifier that identifies the transaction in your system, example SDK-4587295 |
phone_number | Yes | Your customer's phone number must be compatible with the payment method used |
return_url | Yes | The url or the endpoint or the customer will be redirected at the end of the payment. if you use hostedpage |
notify_url | No | Notification webhook of the payment result to your server by payunit |
currency | Yes | The currency you want to use: XAF |
amount | Yes | Confirmation of the initiated amount desired to be collected |
paymentType | Yes | paymentType Value button |
Response body :
{
"status": "SUCCESS",
"statusCode": 200,
"message": "xxxxxxxxxxxxxxxxxxxxxxxx ",
"data": {
"id": "pu-111-2020",
"transaction_id": "xxxxxxx",
"payment_status": "PENDING",
"amount": 10,
"provider_transaction_id": "xxxxxxxxxxxxxxxxxxxxxxx"
}
}
Last updated on January 9, 2023