Get Invoice

Endpoints: /v1/invoices/{invoice_id}
HTTP Method: GET
Headers:

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

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

KeyDescription
AuthorizationBasic Base64Encode(merchantServerKey:)



Response


{
    "order_id": "7950c36a-d267-4f25-bb03-7a82b00z168t",
    "invoice_number": "7128c81b-cde5-4c33-8777-4d1d0fcd6377",
    "published_date": "2024-03-06 10:54:14 +0700",
    "due_date": "2025-08-06 20:03:04 +0700",
    "invoice_date": "2025-01-06 20:03:04 +0700",
    "reference": "reference",
    "customer_details": {
        "id": "customer_id",
        "name": "merchant A",
        "email": "[email protected]",
        "phone": "82313123123"
    },
    "item_details": [
        {
            "item_id": "SKU1111",
            "description": "midtrans pillow",
            "quantity": 1,
            "price": 2000
        }
    ],
    "id": "65e7e8e657389830d04836fc",
    "status": "pending",
    "gross_amount": 13324,
    "pdf_url": "https://assets.midtrans.com/invoices/pdf/5a76417e-be8e-437a-8e16-38c916aea614",
    "payment_type": "payment_link",
    "virtual_accounts": [],
    "payment_link_url": "https://app.midtrans.com/payment-links/b1000b26-a311-42d4-9dc7-51a00ec8c681"
}

{
   "error_messages": [
       "Not Found"
   ]
}

{
   "error_messages": [
       "Internal server error"
   ]
}


FieldDescription
order_id
String
Id for the order
id
String
invoice id
invoice_number
String
Number of the invoice
published_date
String
Date of invoice is published/created in ISO 8601 format. Default time zone: GMT+7.
due_date
String
Due date of transaction in ISO 8601 format. Default time zone: GMT+7.
invoice_date
String
Date of Invoice and will be used in email and pdf created in ISO 8601 format. Default time zone: GMT+7.
customer_details
Object
Refer to Customer Details object section.
item_details
Array<item_detail>
Refer to Item Detail object section
payment_type
String
Either payment_link or virtual_account
payment_link_url
String
URL for payment link and only filled when payment_type is payment_link
virtual_accounts
array <virtual_account>
Invoice virtual account and only filled when payment_type is virtual_account. Refer to Virtual Account object section.
pdf_url
String
pdf_url of the invoice
gross_amount
Integer
Total amount in invoice
status
String
Status of the invoice, can be draft,
pending, expired, overdue, paid, or voided