error 400

Good day guys! I always Got 400 Bad Request. Dont know whats the specific error. Note: I use MOMO requesttopay-POST console to run sanbox test. Any Idea? Parameter Below.... POST https://ericssonbasicapi2.azure-api.net/collection/v1_0/requesttopay HTTP/1.1 Host: ericssonbasicapi2.azure-api.net X-Reference-Id: c72025f5-5cd1-4630-99e4-8ba4722fad57 X-Target-Environment: sandbox Content-Type: application/json Ocp-Apim-Subscription-Key: •••••••••••••••••••••••••••••••• { "amount": "100", "currency": "EUR", "externalId": "21212122", "payer": { "partyIdType": "MSISDN", "partyId": "46733123453" }, "payerMessage": "payerMessage", "payeeNote": "payeeNote" }

Comments

  •  
    Hello, You must include the Authorization header in your request. It is actually mandatory. It is in the form "Beare {token}". You may need to read through the sandbox user provisioning on how to get the API user ID and API token whhich you will be using later in the collection API to request a token from the wallet. A proper request looks like this: POST /collection/v1_0/requesttopay HTTP/1.1 Host: ericssonbasicapi2.azure-api.net type: POST Accept: */* Content-type: application/json Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJSMjU2In0.eyJjbGllbnRJZCI6IjJkYjg4NWVkLTYzMWYtNGMzYS1hNjJmLTU5N2EyMzA2MGY4YiIsImV4cGlyZXMiOiIyMDE5LTAzLTEzVDIxOjU4OjQwLjQwMSIsInNlc3Npb25JZCI6IjFkMmMyOGEyLWRiZTctNDI4Mi04ZmYzLWI0ZTdiY2NlNjNhYSJ9.BjtsKqwVaXf1-qPBXHFOEYeJqOBwO9ds_ZiV-hIz5hLVMqCb78V-Ui305kpXC32Sc5kWtd7MrpscPcpjVc8_ciZN90VIvV15uANTCidz2DNutrnhL-20hmrexsTcuP4VHPPU3ZPuUzcl50fCz1gbbGmTOBpx17sXefxEb9YNcip5JmoUr2xEsxOAhultF0lYsNSskJjOuOSPK9M5mHYgdp1d2PqzuivOJ_QiJ1u9myXvJhtGVagWbBvU-JHvEjkPIYXiD1Q0BMY995PQ0ADTnexiHhsRNyG_y40-lx8p9D8Jk41957VUaLusl7W92ZfiSRgbNZCcHojVdz69J06nXQ X-Reference-Id: 4cd78413-9cc8-43cb-b177-6d30fee56aae X-Target-Environment: sandbox Ocp-Apim-Subscription-Key: *********************************** Content-Length: 151 {"amount":1000,"currency":"EUR","externalId":3,"payer":{"partyIdType":"MSISDN","partyId":"256XXXXXXXXX"},"payerMessage":"Medical Pro","payeeNote":1001}
    Posted by Hidden Fri, 15 Mar 2019 17:58:59 GMT
  •  
    Hello, I've done what described here but I'm still getting error 400. Any idea why? POST https://ericssonbasicapi2.azure-api.net/collection/v1_0/requesttopay HTTP/1.1 Host: ericssonbasicapi2.azure-api.net Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJSMjU2In0.eyJjbGllbnRJZCI6IjM0OGMyMmRjLWJkZGMtNDQ3Mi1hNDdmLWMzMjQ1NGY3N2ZjZSIsImV4cGlyZXMiOiIyMDE5LTA0LTI2VDA1OjIwOjI2LjI4NyIsInNlc3Npb25JZCI6IjYzMjViMjExLTZmYmQtNDJhYy04NGNiLTRlOTI2MjQ4ZDRiNiJ9.Z9KU_2gFS8LkDzl4csYW_JhNg8wlOlqt7vly1W2A2jfmHXGJqV1bJi6EGJbRnKrNcC2y_yt0EO6pa-RQb0-EQ_fHNVsBxXV-83LVrcEJsDSoEfXP-iM1jAykXtWsqqvuFlDZD7MLy9sGbpF8bVDx7-wgRkDylHdIKvnRjSsxlafI_8JGs-D-RLqQTryYetABtJhtaJ7d_Q1bU8vh-lKxBhiWcTPgazX3kYqGL0_Rc_fC-kPFShm8w1-odnoPSxFwfpGH0Qzl17UHgwHIGvi9A7mOaygQrhw5Pma9r7JgUuL-SOcXVJ5P8cJPg9aQYgAmrft8JSm9xKyGZXuhLgPPig X-Reference-Id: 348c22dc-bddc-4472-a47f-c32454f77fce X-Target-Environment: sandbox Content-Type: application/json Ocp-Apim-Subscription-Key: •••••••••••••••••••••••••••••••• { "amount": 20, "currency": "EUR", "externalId": 345, "payer": { "partyIdType": "MSISDN", "partyId": "256786735629" }, "payerMessage": "FDA", "payeeNote": "Cart" }
    Posted by Hidden Fri, 26 Apr 2019 04:51:36 GMT


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