View Categories

Create Invoice

1 min read

Use this POST request to create an invoice. The request must include an API key (provided by RichattPay in your partner space) in the header.

{{base_url}}/api-services/v1/invoice

Headers

Parameter NameValueMendatoryDescription
apikeyStringYesyour API key (provided by RichattPay)

Body

{
"refrence_invoice":"123456711",
"reference_client":"987526",
"amount": 500,
"invoice_date":"31/07/2024",
"ivoice_limit_date":"31/08/2024",
"contact_by_email":1,
"contact_by_sms":1,
"contact_by_whatsapp":1,
"accept_partial_payement":0,
"client_adresse":"rue de la victoire",
"client_name":"Mohamed abdel kerim",
"client_mail":"elarbu@richatt.com",
"client_tel":"47000125",
"codeService":"INVOICE_PAYOUT",
"type":"TEMP"
}

Variables

Example of successful response

{
    "code": 200,
    "msg": "Invoice created successfully without error.",
    "error": null,
    "data": {
        "amount": "500",
        "invoiceid": "24102415243344710020001000",
        "externalinvoiceid": "1002123456711",
        "status": "UPLADED",
        "codepaiment": "10023132",
        "referenceclient": "100287931441"
    }
}

Examples of error response

Status(533)

{
    "code": 533,
    "msg": "Invoice type incorrect it must be TEMP or REGULAR ",
    "error": "Invoice_type_incorrect",
    "data": null
}