Skip to main content

I am consuming the MTN Open API and most of the endpoints worked except for some specific endpoints which I would enlist below;

Kindly note that the response I receive from these are all BAD REQUEST so kindly help me out in determining what is the issue;

  1. Request to Pay

    POST https://sandbox.momodeveloper.mtn.com/collection/v1_0/requesttopay
    Headers:

    X-Target-Environment
    X-Callback-Url       
    X-Reference-Id
    Ocp-Apim-Subscription-Key

    Authorization

 

Request Body: 

{

"amount": "2.0",

"currency": "GH",

"externalId": "7916d515-ab40-4bba-bb67-b68bfb13b94c",

"payer": {

"partyIdType": "MSISDN",

"partyId": "23354****414"

},

"payerMessage": "Kindly accept for payment of TEST",

"payeeNote": "Thanks for paying for Test"

}

 

 

  1. Disbursement / Transfer

      POST: https://sandbox.momodeveloper.mtn.com/disbursement/v1_0/transfer

       Headers:

   X-Target-Environment
   X-Callback-Url       
   X-Reference-Id
   Ocp-Apim-Subscription-Key

   Authorization

 

Request Body:

 {

"amount": "2.0",

"currency": "GH",

"externalId": "e4f75ad1-83c7-44b2-937f-6c0849a94a48",

"payer": {

"partyIdType": "MSISDN",

"partyId": "233547013414"

},

"payerMessage": "Refund Payer Message",

"payeeNote": "Payee Note"

}

 

Response: Bad Request

 

 

  1.  Pre-Approval

POST https://sandbox.momodeveloper.mtn.com/collection/v2_0/preapproval

Headers:

   X-Target-Environment
   X-Callback-Url       
   X-Reference-Id
   Ocp-Apim-Subscription-Key
   Authorization

Request Body:

{

"payer": {

"partyIdType": "MSISDN",

"partyId": "233547013414"

},

"payerCurrency": "GH",

"payerMessage": "Kindly approve",

"validityTime": "2"

}

               

Response: Bad request

Be the first to reply!

Reply