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
| Key | Description |
|---|---|
| Authorization | Basic Base64Encode(merchantServerKey:) |
EligibilityOnly invoice documents with document_type =
quotationcan be converted.
Quotation must not be expired (current time must be beforequotation_validity_date) and must not have been converted before (converted_atis 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
| Parameter | Description |
|---|---|
| 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. |