Rest API
Make payment

Make payment

Confirm the initiated payment request. You can choose to make the payment by Mobile Money or by credit card. Credit card payments are not available in sandbox.

End point: {BASE_URL}/api/gateway/makepayment

Make payment with Mobile Money

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": "puXXXXXX",
   "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"
}'
⚠️

All URLs must utilize HTTPS protocol { return_url, notify_url }; otherwise, the requests will not be successful.

Request Body :

ParameterMandatoryDescription
gatewayYesThe payment method you wish to use
transaction_idYesThe unique identifier that identifies the transaction in your system, example SDK4587295
phone_numberYesYour customer's phone number must be compatible with the payment method used
return_urlYesThe url or the endpoint or the customer will be redirected at the end of the payment. if you use hostedpage
notify_urlNoNotification webhook of the payment result to your server by payunit
currencyYesThe currency you want to use: XAF
amountYesConfirmation of the initiated amount desired to be collected
paymentTypeYespaymentType Value button

Response body :

{
	"status": "SUCCESS",
	"statusCode": 200,
	"message": "xxxxxxxxxxxxxxxxxxxxxxxx ",
	"data": {
		"id": "pu1112020",
		"transaction_id": "xxxxxxx",
		"payment_status": "PENDING",
		"amount": 10,
		"provider_transaction_id": "xxxxxxxxxxxxxxxxxxxxxxx"
	}
}
Last updated on December 1, 2024