Convert Invoice

Endpoints: /v1/invoices/{invoice_id}/convert
HTTP Method: PATCH
Headers:

Production: https://api.midtrans.com/v1/invoices/{invoice_id}/convert

Sandbox: https://api.sandbox.midtrans.com/v1/invoices/{invoice_id}/convert

KeyDescription
AuthorizationBasic Base64Encode(merchantServerKey:)
📘

Eligibility

Only invoice documents with document_type = quotation can be converted.
Quotation must not be expired (current time must be before quotation_validity_date) and must not have been converted before (converted_at is null)

Client fields are optional and can be sent to override existing client values if needed during conversion. Only fields provided in the request will be updated.

Request Body

{
    "client": {
        "id": "Midtrans123",
        "name": "midtrans user",
        "email": "[email protected]",
        "phone": "628129912838"
    }
}

Request JSON Body Details

ParameterDescription
client
Optional
Client information associated with the invoice.
client.id
Optional
Number of the invoice
client.name
Optional
Client name.
client.email
Optional
Client email address.
client.phone
Optional
Client phone number.