400 Bad Request error - requesttopay

I am getting "400 Bad Request" response yet I have filled everything correctly even the Bearer authorization, please validate for me what the issue might be. Below is the request I am sending: POST https://sandbox.momodeveloper.mtn.com/collection/v1_0/requesttopay HTTP/1.1 Host: sandbox.momodeveloper.mtn.com Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJSMjU2In0.eyJjbGllbnRJZCI6ImEyZDBjODVkLWI4MzQtNGI3NC1hY2U1LWRiNjY5MTI1MTc3NyIsImV4cGlyZXMiOiIyMDIwLTA2LTE2VDA3OjA3OjAxLjA1NSIsInNlc3Npb25JZCI6IjYwMThhZjc5LTMwMDAtNGUwOC1iNjVkLTgzY2ZjNDVkZDBiNCJ9.DUqskHhUebDWy8DmVH4iiEsIpwtsB6KyhTBY-nk_QBLmGtQIqfAcJ-EcgtZ_2LtUHWaArHd2BulLXSatkLvT3O-Up348T8kTsLFYHHc5qo8_6XE-i33w9iCBgOpj4ynEoqlS0FRh7B27s4TCD72QNXyHT_C9N3Z-WsY4qjnOVYa75OOrkNUMNdd3vz99W2z4u3CwmpjGnYNogoKR8x1SIPHCFQBBgibIlODDGHrisD7jEIGMdehtGkwCdEPb3QSgG0zSzM3skrFd0H17wE7niL99xtT3qXcIdjnDSQEzp21PaM1G7X6ahW5DUy4xncD2a8sYR4-eAGxnLCjTvtJ-pg X-Callback-Url: http://*******.******.com/index.php?callback_action=1 X-Reference-Id: 045ffaca-5a9b-4298-a456-cb4cf355bb49 X-Target-Environment: sandbox Content-Type: application/json Ocp-Apim-Subscription-Key: •••••••••••••••••••••••••••••••• { "amount": "10", "currency": "EUR", "externalId": "124467", "payer": { "partyIdType": "MSISDN", "partyId": "46733123453" }, "payerMessage": "Test", "payeeNote": "Test" }

Comments

  •  
    Did u find a solution to this?
    Posted by Hidden Fri, 10 Jul 2020 06:40:44 GMT
  •  
    Yes, remove the X-Callback-Url header when sending the request
    Posted by Hidden Sat, 11 Jul 2020 09:40:55 GMT
  •  
    please i have the response accepted but the payer phone does not receive a payment validation message and when i get the ResquestTopay it has the status "successful".How can i simulate the task : payer receiving payment notification , then can validate it !
    Posted by Hidden Wed, 29 Jul 2020 07:52:56 GMT
  •  
    If you trying with sandbox so remove the X-Callback-Url then would be work fine, X-Callback-Url would be use with production not in a sandbox mode.
    Posted by Hidden Fri, 10 Dec 2021 13:49:45 GMT
  •  
    I'm still getting "400 Bad request" despite the X-Callback-Url header is removed
    Posted by Hidden Mon, 21 Feb 2022 12:12:08 GMT


You're not signed in. Please sign-in to report an issue or post a comment.