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": "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 :

ParameterMandatoryDescription
gatewayYesThe payment method you wish to use
transaction_idYesThe unique identifier that identifies the transaction in your system, example SDK-4587295
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": "pu-111-2020",
		"transaction_id": "xxxxxxx",
		"payment_status": "PENDING",
		"amount": 10,
		"provider_transaction_id": "xxxxxxxxxxxxxxxxxxxxxxx"
	}
}

Make payment with Card

Note here that we only accept 3D secured cards.

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 XXXXXXXXXXXXcGF5d9xxxxxxxxxxh' \
--data '{
    "gateway": "WORLD_VISA",
    "amount": 2000,
    "transaction_id": "jLDD8xxxxx",
    "return_url": "https://xxxxxxxxxxxx.xxx",
    "currency": "XAF",
    "notify_url":"https://xxxxxxxxxxxx.xxx",
    "card_number":"4556052xxxxxxx",
    "cvv":"899",
    "expiry_month":"09",
    "expiry_year":"32",
    "card_country": "CM",
    "card_state": "Littoral",
    "card_city": "Douala",
    "card_address": "BonamouXXXXXX",
    "card_zipcode": "4785"
}'

Request Body :

ParameterMandatoryDescription
gatewayYesThe payment method you wish to use
transaction_idYesThe unique identifier that identifies the transaction in your system, example SDK-4587295
amountYesConfirmation of the initiated amount desired to be collected
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 or XOF, USD
card_numberYesThe number of the card with which you wish to make the payment
cvvYesThe cvv of the card with which you wish to make the payment
expiry_monthYesThe month of expiration of the card with which you wish to make the payment. Ex : 02
expiry_yearYesThe year of expiration of the card with which you wish to make the payment. Ex : 26
card_countryYesThe country where your card was issued. Ex : CM
card_stateYesThe province or region where your card was issued. Ex: If is a region: Alabama, If is a province: Coastal
card_cityYesThe city where your card was issued. Ex : Douala
card_addressYesThe address when you create your card.
card_zipcodeYesLe code postal lors de la création de votre carte.

Response body :

{
	"status": "SUCCESS",
	"statusCode": 200,
	"message": "xxxxxxxxxxxxxxxxxxxxxxxx ",
	"data": {
		"id": "pu-111-2020",
		"transaction_id": "xxxxxxx",
		"payment_status": "PENDING",
		"amount": 1000
	}
}
Last updated on April 27, 2023