List invoices
Changed onThis API Endpoint allows integrators to retrieve a list of invoice depending on the filter criteria of their choice. The allowed filters are highlighted in the "QUERY PARAM" below.
By default a maximum of 10 invoice will be return if the limit is not specify. This invoices will be returned in sorted by creation date, with the most recently created invoices appearing at the top of the list.
All Invoice shown will only be invoices belonging to the merchant Id provided.
NOTE: If the filter provided is not found, the list provided will be the same as a list of invoice without any filter condition.
Request
- Base URLhttps://api-sandbox.ezypay.com/v2
- URLhttps://api-sandbox.ezypay.com/v2/billing/invoices
- AuthOAuth 2Client credentialsToken URL: https://identity-sandbox.ezypay.com/token
Query parameters
Filter by unique identifier of the customer.
Filter by unique identifier of the subscription.
Filter by unique identifier of the externalInvoiceId from integrator's system.
Filter by invoice status. Supported values are PAID, PENDING, PROCESSING, PAST_DUE,UNPAID, REFUNDED, PARTIALLY_REFUNDED and WRITTEN_OFF.
Start date for range of invoices to view. Filter by date defined in the invoice date.
Apply a limit to the number of objects to be returned. Supported limit range is 1 to 100. Defaults to 10.
To paginate a large result set, use the 'limit' argument to limit the number of results returned per page up to a maximum of 100 records. For example, limit = 10 shows results 1-10. The default returned result would be 100.
An cursor for use in pagination. Specify the number of objects to skip to fetch the next page of objects. For example, limit=10 and cursor=10 will show results for record 11 - 20.
Filter by unique identifier of a checkout session (not the same as the session hash).
Headers
Merchant ID
Response
200
Example response
{
"data": [
{
"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|",
"channel": "api",
"manualRetryPossible": true
}
],
"paging": {
"totalCount": 2
}
}Changes
- info
endpoint added
- info