Skip to main content

Get invoice

Flowchart
Endpoint
Endpoint Method
Authentication
/invoice/detail GET yes
Authentication
Type
Token source
Server
Bearer {{USAPI}}/auth USAPI
Param request
Properties
Required Description
invoice yes invoice ID generated by USAPI
waybill_number
yes Waybill Number generated by OSAS

Notes: Choose one of param request

demousapi.onindonesia.id/invoice/detail?invoice=OD0001N12D0000b

or

demousapi.onindonesia.id/invoice/detail?waybill_number=OND132456A123

Result example

200 OK

{
    "id": "21",
    "username": "usernew1",
    "type": "ONMARKET CHECKOUT",
    "amount": 10000,
    "xendit_invoice": "658bee8b8013d711637b9a7b",
    "invoice": "OM0001N0CR0000f",
    "status": "PAID",
    "src": "XENDIT",
    "xendit_url": "https://checkout-staging.xendit.co/web/658bee8b8013d711637b9a7b",
    "expired_at": "2023-12-27T11:29:47.812Z",
    "createdAt": "2023-12-27T09:29:48.025Z",
    "updatedAt": "2023-12-27T09:30:00.052Z"
}
Error example

400 Bad request

{
    "message": "Invoice not found"
}

401 Unauthorized

{
    "message": "Auth Error"
}

500 Internal server error

{
    "message": "Internal Error"
}