Invoice Item Refund
This document provide guidance for how an Integrator can do an invoice item refund.
Refund Invoice Item using the Refund API
[PUT] https://api-sandbox.ezypay.com/v2/billing/invoices/{{Ezypay_Invoice_Id}}/refund
API Endpoint Documentation: https://developer.ezypay.com/reference#refund
{
"items":[{"id":"{{Invoice_Item_UUID}}"}]
}
{
"id": "{{Ezypay_Invoice_Id}}",
"documentNumber": "IN0000000000002944",
"date": "2020-12-11",
"dueDate": "2020-12-11",
"scheduledPaymentDate": null,
"status": "PROCESSING",
"memo": null,
"items": [
{
"description": "Transaction Fee",
"amount": {
"currency": "AUD",
"value": 0.65,
"type": null
},
"tax": {
"rate": 10.00
},
"id": "2a47d4d0-0a63-4863-88a9-c8a69609039f",
"type": "transaction_fee",
"discounted": {
"currency": "AUD",
"value": 0.00,
"type": null
},
"accountingCode": "GYM_1123"
},
{
"description": "Extra 20 minutes",
"amount": {
"currency": "AUD",
"value": 20.00,
"type": null
},
"tax": {
"rate": 10.00
},
"id": "035c015b-9ab4-48f9-baf9-badd0679be96",
"type": "addon_payment",
"discounted": {
"currency": "AUD",
"value": 0.00,
"type": null
},
"accountingCode": "GYM_1123"
},
{
"description": "1.5 ml Coke",
"amount": {
"currency": "AUD",
"value": 2.00,
"type": null
},
"tax": {
"rate": 10.00
},
"id": "28ba21da-7eff-466f-b65b-5cab70024509",
"type": "addon_payment",
"discounted": {
"currency": "AUD",
"value": 0.00,
"type": null
},
"accountingCode": "GYM_1123"
},
{
"description": "Gym Towel",
"amount": {
"currency": "AUD",
"value": 4.00,
"type": null
},
"tax": {
"rate": 10.00
},
"id": "08193719-9fe5-4a88-a0f7-e0b430f85535",
"type": "on_demand_payment",
"discounted": {
"currency": "AUD",
"value": 0.00,
"type": null
},
"accountingCode": "GYM_1123"
}
],
"amount": {
"currency": "AUD",
"value": 26.65,
"type": null
},
"amountWithoutDiscount": {
"currency": "AUD",
"value": 26.65,
"type": null
},
"totalDiscounted": {
"currency": "AUD",
"value": 0.00,
"type": null
},
"totalRefunded": {
"currency": "AUD",
"value": 0.00,
"type": null
},
"totalTax": {
"currency": "AUD",
"value": 2.42,
"type": null
},
"customerId": "{{Ezypay_CustomerID}}",
"subscriptionId": null,
"checkoutId": null,
"subscriptionName": null,
"paymentMethodToken": "{{PaymentMethodToken}}",
"autoPayment": true,
"processingModel": "RECURRING",
"createdOn": "2020-12-11T07:11:18.572",
"payNowUrl": null,
"channel": "api"
}
Retrieve the invoice using the [GET] Invoice API
Important Note:
Once the invoice item has been refunded, the Invoice status will be changed from "PAID" to "PARTIALLY_REFUNDED".
Depending on the payment method type, this refunds will be processing time will be different. Credit cards refunds normally occur within a few minutes, where else, a bank transaction refund will take not more than 3 days.
Once an invoice item has been refunded, the invoice will have the refunded amount added to the "totalRefunded" item.
[GET] https://api-sandbox.ezypay.com/v2/billing/invoices/{{Ezypay_InvoiceID}}
API Endpoint Documentation: https://developer.ezypay.com/reference#retrieve-an-invoice
{
"id": "{{Ezypay_Invoice_Id}}",
"documentNumber": "IN0000000000002944",
"date": "2020-12-11",
"dueDate": "2020-12-11",
"scheduledPaymentDate": null,
"status": "PARTIALLY_REFUNDED",
"memo": null,
"items": [
{
"description": "Transaction Fee",
"amount": {
"currency": "AUD",
"value": 0.65,
"type": null
},
"tax": {
"rate": 10.00
},
"id": "2a47d4d0-0a63-4863-88a9-c8a69609039f",
"type": "transaction_fee",
"discounted": {
"currency": "AUD",
"value": 0.00,
"type": null
},
"accountingCode": "GYM_1123"
},
{
"description": "Extra 20 minutes",
"amount": {
"currency": "AUD",
"value": 20.00,
"type": null
},
"tax": {
"rate": 10.00
},
"id": "035c015b-9ab4-48f9-baf9-badd0679be96",
"type": "addon_payment",
"discounted": {
"currency": "AUD",
"value": 0.00,
"type": null
},
"accountingCode": "GYM_1123"
},
{
"description": "1.5 ml Coke",
"amount": {
"currency": "AUD",
"value": 2.00,
"type": null
},
"tax": {
"rate": 10.00
},
"id": "28ba21da-7eff-466f-b65b-5cab70024509",
"type": "addon_payment",
"discounted": {
"currency": "AUD",
"value": 0.00,
"type": null
},
"accountingCode": "GYM_1123"
},
{
"description": "Gym Towel",
"amount": {
"currency": "AUD",
"value": 4.00,
"type": null
},
"tax": {
"rate": 10.00
},
"id": "08193719-9fe5-4a88-a0f7-e0b430f85535",
"type": "on_demand_payment",
"discounted": {
"currency": "AUD",
"value": 0.00,
"type": null
},
"accountingCode": "GYM_1123"
}
],
"amount": {
"currency": "AUD",
"value": 26.65,
"type": null
},
"amountWithoutDiscount": {
"currency": "AUD",
"value": 26.65,
"type": null
},
"totalDiscounted": {
"currency": "AUD",
"value": 0.00,
"type": null
},
"totalRefunded": {
"currency": "AUD",
"value": 2.00,
"type": null
},
"totalTax": {
"currency": "AUD",
"value": 2.42,
"type": null
},
"customerId": "{{Ezypay_CustomerID}}",
"subscriptionId": null,
"checkoutId": null,
"subscriptionName": null,
"paymentMethodToken": "{{PaymentMethodToken}}",
"autoPayment": true,
"processingModel": null,
"createdOn": "2020-12-11T07:11:18.572",
"payNowUrl": null,
"channel": "api",
"paymentMethodInvalid": false,
"manualRetryPossible": true
}
Updated about 3 years ago