Retrieve an invoice
Changed onThis API Endpoint is mostly used when an Ezypay Invoice UUID is provided. The result return by this API will focus only on the specific invoice requested.
There will be a validation to ensure that the invoice UUID provided belongs to the Merchant provided in the API Header.
get/billing/invoices/{invoiceId}
Request
- Base URLhttps://api-sandbox.ezypay.com/v2
- URLhttps://api-sandbox.ezypay.com/v2/billing/invoices/{invoiceId}
- AuthOAuth 2Client credentialsToken URL: https://identity-sandbox.ezypay.com/token
Path parameters
invoiceIdstring required
Auto-generated identifier of the invoice.
Headers
merchantstring required
Merchant ID
Response
200
Example response
{
"id": "1de7f15e-56d6-42fc-a649-2802127c6d32",
"documentNumber": "IN0000000000000002",
"date": "2020-02-19",
"dueDate": "2020-02-19",
"status": "PAST_DUE",
"items": [
{
"description": "Failed Payment Fee",
"amount": {
"currency": "AUD",
"value": 8.5
},
"tax": {
"rate": 0.1
},
"id": "9b62822e-3518-4a6b-a3a1-80586af4ef0b",
"type": "failed_payment_fee",
"discounted": {
"currency": "AUD"
},
"accountingCode": "customer_plan"
}
],
"amount": {
"currency": "AUD",
"value": 211.74
},
"amountWithoutDiscount": {
"currency": "AUD",
"value": 211.74
},
"totalDiscounted": {
"currency": "AUD"
},
"totalRefunded": {
"currency": "AUD"
},
"totalTax": {
"currency": "AUD",
"value": 0.01
},
"customerId": "a1fe243c-cdd9-4dfa-9a74-2270f9a589c8",
"subscriptionId": "a8e61655-85b3-4567-9e89-e45284716fd8",
"subscriptionName": "high_st_monthly_plan",
"paymentMethodToken": "19ab7482-ed9e-4865-9996-26faef840130",
"createdOn": "2020-02-18T20:16:18.076",
"failedPaymentReason": {
"code": "insufficient_funds",
"description": "Payment method has insufficient funds at the time of the transaction."
},
"paymentProviderResponse": {
"code": "Refused",
"description": "51: Insufficient funds/over credit limit / Not sufficient funds"
},
"payNowUrl": "https://paynow-staging.ezypay.com?token=ddf26cc0-6f58-45ee-a6a8-e1972e43934d|1de7f15e-56d6-42fc-a649-2802127c6d32|a1fe243c-cdd9-4dfa-9a74-2270f9a589c8|",
"manualRetryPossible": true
}Changes
- info
endpoint added
- info