Refund a billing cycle
You can perform a full or partial refund of a successful billing cycle by sending a POST
request to the /refunds
endpoint with the following required fields.
Field name | Description | Required (R) or Optional (O) |
---|---|---|
recurringProgramId |
A system generated identifier that connects a consumer record to products/services offered by merchant. It describes what the customer has signed up for and how often they're charged for it. | R |
billingCycleStartDate |
Identifies the year, month and day when the first demand for payment (bill) is generated for the associated schedule. | O |
refundAmount |
Specifies the monetary value of the returned/cancelled goods and/or services. | R |
currencyCode |
Represents a unique identifier for currencies, as assigned by the ISO 4217 specification. Alternatively, a currency code may also be a custom firm assigned value created where an ISO code does not exist. | R |
transactionReferenceNumber |
Identifies a transaction as assigned by the payment network or the firm. Can be used instead of billingCycleStartDate. | O |
HTTP method: POST
Endpoint: /refunds
Scenario: Refund partial amount.
Json
{
"recurringProgramId": "hgLk84z1s7",
"billingCycleStartDate": "2024-04-29T00:00:00.000Z",
"refundAmount": 1000,
"currencyCode": "USD"
}
Response:
Json
{
"recurringProgramId": "hgLk84z1s7",
"merchantId": "998152096533",
"requestId": "3d4fb53e-8e9d-406a-abd8-3a9144b53586",
"billingCycleStartDate": "2024-04-29",
"billingCycleEndDate": "2024-05-28",
"refundAmount": "1000",
"currencyCode": "USD",
"billingScheduleAmount": 1100,
"creditAmount": 0,
"totalRefundAmount": 1100,
"remainingRefundableAmount": 0,
"paymentMethodType": {
"card": {
"cardType": "VI",
"cardTypeName": "VISA",
"maskedAccountNumber": "477777XXXXXX2223"
}
},
"paymentMethodId": "0d63e3fb-1a9f-4a85-8696-03734dbc3451",
"transactionDetails": {
"transactionId": "b763803b-f9c2-460b-a031-8e4adbb85b30",
"transactionReferenceNumber": "71eb287c-3655-4ffa-b8f0-c00738a64b2c",
"transactionDate": "2024-04-29T17:22:30.652Z",
"transactionAmount": 1100,
"transactionCurrencyCode": "USD",
"approvalCode": "tst126",
"hostMessage": "Approved"
}
}