Create Invoice
POST {{base_url}}collection/v2_0/invoice
This endpoint allows you to create a new invoice by sending an HTTP POST request to https://sandbox.momodeveloper.mtn.com/collection/v2_0/invoice. The request should include a JSON payload in the raw request body type, containing the following parameters:
- externalId (string): The external identifier for the invoice.
- amount (string): The amount of the invoice.
- currency (string): The currency in which the invoice amount is specified.
- validityDuration (string): The duration for which the invoice is valid.
- intendedPayer (object): An object containing the party ID type and party ID of the intended payer.
- partyIdType (
MSSIDN/ALIAS
): The type of party ID for the intended payer. - partyId (MSISDN ID): The party ID of the intended payer.
- partyIdType (
- payee (object): An object containing the party ID type and party ID of the payee.
- partyIdType (MSSIDN): The type of party ID for the payee.
- partyId (string): The party ID of the payee.
The customer will receive an SMS with the Invoice ID.
The Payments can be made via MoMo USSD or MoMo APP
Example
{
"externalId": "12345",
"amount": "100.00",
"currency": "USD",
"validityDuration": "30 days",
"intendedPayer": {
"partyIdType": "MSSIDN",
"partyId": "56784939"
},
"payee": {
Response
The response for this request may include information about the created invoice, such as the invoice ID, status, or any error messages. However, based on the provided examples, the response is null.
Request Body
{"externalId"=>"005060", "amount"=>"5000", "currency"=>"EUR", "validityDuration"=>"360", "intendedPayer"=>{"partyIdType"=>"MSISDN", "partyId"=>"56784939"}, "payee"=>{"partyIdType"=>"MSISDN", "partyId"=>"46733123450"}, "description"=>"InVoice SandBox"}
HEADERS
Key | Datatype | Required | Description |
---|---|---|---|
X-Callback-Url | string | ||
X-Reference-Id | string | ||
X-Target-Environment | string | ||
Content-Type | string | ||
Ocp-Apim-Subscription-Key | string |