Collection (MOMO)
Collection with payment pages is for Mobile Money dominated countries (GHS, KHS). This is the Async method of creating collection order it is designed to provide speedy responses.
Last updated
//API response
OK
//Callback Response 1
{ "partner_order_id": "FUSPAY-Y-20251", "callbak_data": "OK" }
//Callback response 2
{"": "https://intrapay.fuspay.finance/b2b?partner_id=p60037¤cy=KHS&amount=1001&fee=0&order_id=593163277406920704&lang=eng-NG&country=kenya&tk=YN6ITFY-ECIEG2A-VCEAT2I-ARZKZEA7388"}
{ "status": "error", "message": "Public Key combination is not valid", "partner_order_id": "FUSPAY-Y-20251", "signature": "8cb88b058e32460560d707788c759f25201c5a353596c9d271922ba2b0f89541f779642c08a8993bc37ab96cd7cb97ff291a38b6d29ab6642e0979de9077a992" }
(
async () => {
const primary_key = "1"
const secret_key = ""
const partner_id = ""
const merchant_secret = ""
const request = require('request');
const options = {
method: 'POST',
url: 'https://prod-order-exchanger-api.fuspay.finance/api/v1/no-auth/PartnerP2P/CreateOrder',
headers: {
'Content-Type': 'application/json',
'x-merchant-secret': merchant_secret,
'x-partner-id': partner_id,
Authorization: Bearer ${primary_key}
},
body: {
"partner_order_id": "qorepay0001",
"amount_to_collect": "500",
"timestamp": 1694604837129,
"order_expiration": 1694605737129,
"currency": "KHS",
"partner_callback_url": "https://webhook.site/86e6e156-8250-417e-857c-7bfd3cab224d",
"partner_redirect_url": "https://webhook.site/86e6e156-8250-417e-857c-7bfd3cab224d",
"signature": "8da879e46e30cb50519a321677c14568f2a08e2ce35c046514a4523402a376d2659827516f59620023400396dd3652c6825a8cb221ffabf7d1007e0275f24d60"
},
json: true
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
}
)()
// CURL VERSION
curl --request POST \
--url https://prod-order-exchanger-api.fuspay.finance/api/v1/no-auth/PartnerP2P/CreateOrder \
--header 'Authorization: Bearer pk_partner_xxxxx' \
--header 'Content-Type: application/json' \
--header 'x-merchant-secret: xxxxxxxx' \
--header 'x-partner-id: pxxx' \
--data '{
"partner_order_id": "xxxxx",
"amount_to_collect": "500",
"timestamp": 1694604837129,
"order_expiration": 1694605737129,
"currency": "KHS",
"partner_callback_url": "https://webhook.site/xxxxd",
"partner_redirect_url": "https://webhook.site/xxxxxx",
"signature": "xxxxxxx"
}'