Skip to main content

Refunds

POST Retrieve Refund Eligibility

The POST Retrieve Refund Eligibility method allows you to check if a specific transaction is eligible for a refund.

Versions
The POST Retrieve Refund Eligibility method is supported identically in AndDone API versions 2.1, 2.2, and 2.3.

Refund eligibility is determined by the following criteria:

  • The transaction must be successfully processed and settled at least two days prior to the refund request.
  • The transaction must be of type SALE.
  • The transaction status must not be Authorized, Chargeback, Declined or Failed.
  • The transaction must not be part of a batch that is yet to be processed.
  • The transaction must not be in the MPIPD/MPIPI payment category.
  • The transaction must not be processed with Commerce Bank.
  • The transaction is not eligible if the transaction status is refunded and the total refund amount is equal to the Total capture amount of the transaction.
  • The transaction is not eligible if the transaction status is refunded and there is a refund event on the transaction in the previous 24 hours.
API Endpoint
https://api.uat.anddone.com/secure/refunds/eligibility
API Data Details
URI secure/refunds/eligibility
Method POST
Authorization API Key Authorization
Authorization
x-api-key API key {env_merchantAccessKey}
Request Headers
x-app-key Merchant ID or App Key {env_merchantId}
x-version API version (e.g., 2.3). If no version is specified, the call will default to version 2.0 of the API.
Origin URL or IP address provided to AndDone as an allowed origin.
Content-Type application/json

Request Parameters

Field Name Data Type Mandatory Field Length Description
invoiceNumber String false NA The invoice number associated with the refund.
pONumber String false NA The purchase order number associated with the refund.
refundAmount Number false NA The dollar amount to be refunded. Supports up to two decimal places.
transactionId String true NA The unique ID of the payment transaction to be refunded.
remarks String false NA Use this field to enter any notes or remarks related to the refund.
splits Array false NA This array comprises the virtual accounts included in a split refund and defines how the refund amount is to be divided among them.
- virtualAccount String false NA The name of the virtual account.
- amount Number false NA The amount (USD) to be paid from the virtual account. Supports up to two decimal places. Example: A payment for ten dollars and fifty cents is represented as 10.50.
- reference String false NA A merchant-provided reference string that can be used to identify the portion of the split refund to be paid from this virtual account.
- accountType String false NA The type of the bank account represented by the virtual account (e.g., Checking, Savings).
- chargeIndicator Boolean false NA If commission was applied to the original payment transaction, this value is set to true on the virtual account to which the commission was to be paid. Only one virtual account can have ChargeIndicator set to true.

Body Request Example (JSON)

{
              "invoiceNumber": "AD24070100276",
              "refundAmount": "578.00",
              "transactionId": "a2c459ff-a2af-4c9c-938b-d9edd1434c52",
              "remarks": "Refund for duplicate transaction."
          }

Response

Body Response Example - Transaction Eligible for Refund

{"refundEligible":true,"message":null}