- Reverses a transaction
POST {{baseURL}}/pay-api/v1/transactions/return
This endpoint refunds or returns funds from an original transaction identifier.
This creates a refund transaction that is linked to a specific previous transaction.
See Also:
To create a transaction, see POST /pay-api/v1/transactions/sale.
To void a transaction, see POST /pay-api/v1/transactions/void.
To credit from a transaction without a reference, see POST /pay-api/v1/transactions/return/no-reference.
To retrieve a transaction by ID, see GET /pay-api/v1/transactions/{transactionId}.
Specifies the card data source.
Valid values are:
| Value | Name | Description |
|---|---|---|
| 1 | Internet | Virtual Terminal, ISV API |
| 2 | Swipe | Track1, Track2 |
| 3 | NFC | EMV Tags, Track2 |
| 4 | EMV | EMV Tags |
| 5 | EMVContactless | EMV Tags |
| 6 | FallbackSwipe | Track 2 |
| 7 | Manual | Card present keyed transaction |
Example: 2
Specifies the transaction identifier.
Example: 94c59697-3db4-4ef7-84f7-b1cc14f21d93
Information stored on the magnetic stripe of a credit or debit card, including the card number, expiration date, and cardholder's name.
Specifies the KSN for DUKPT PIN encryption.
Required only if the PIN is encrypted using DUKPT.
- Mock serverhttps://developer.flute.com/_mock/api-reference/pay-api/v1/transactions/return
- Sandbox environmenthttps://sandbox.api.flute.com/pay-api/v1/transactions/return
- Production environmenthttps://api.flute.com/pay-api/v1/transactions/return
Refunds the full amount of a settled credit card sale.
amount is null, so the full original amount is refunded.
No card data is needed for a credit card refund.
POST /pay-api/v1/transactions/return HTTP/1.1
Host: sandbox.api.flute.com
Authorization: Bearer <YOUR_JWT_HERE>
Accept: application/json
Content-Type: application/json
{
"transactionId": "8a4f1c27-6d93-4e05-b2a8-1f7c3e9d5b60",
"cardDataSource": 1
}OK
Indicates the transaction identifier.
Example: c7c15dd0-03e7-4e55-917c-54bedafba5e7
Indicates the date and time (in ISO 8601 UTC or timezone offset format) of the transaction.
Examples: 2026-08-24T08:45:22Z
The full $64.99 is refunded.
The refund is a new transaction with type Refund.
{ "transactionId": "a9d3e6f2-1b48-4c75-8e09-5f2c7b1d4a36", "transactionDateTime": "2026-10-21T09:15:44.6120387Z", "typeId": 5, "type": "Refund", "statusId": 2, "status": "Captured", "details": { "hostResponseCode": "00", "hostResponseMessage": "APPROVAL", "hostResponseDefinition": "Approved and completed", "code": "Approve", "message": "Success", "processorResponseCode": "00", "authCode": "R64990", "maskedPan": "411111******1111" }, "transactionReceipt": { "transactionId": "a9d3e6f2-1b48-4c75-8e09-5f2c7b1d4a36", "transactionDateTime": "2026-10-21T09:15:44.6120387Z", "amount": { "baseAmount": 64.99, "percentageOffAmount": 0, "percentageOffRate": 0, "cashDiscountAmount": 0, "cashDiscountRate": 0, "surchargeAmount": 0, "surchargeRate": 0, "tipAmount": 0, "tipRate": 0, "totalAmount": 64.99 }, "currencyId": 1, "currency": "USD", "processorId": "64aa4643-2c62-45fa-9554-3a69833114e9", "processor": "Primary card processor", "operationTypeId": 1, "operationType": "PayNow", "paymentMethodTypeId": 1, "paymentMethodType": "Card", "transactionTypeId": 5, "transactionType": "Refund", "customerId": null, "customerPan": "411111******1111", "cardTokenType": 1, "statusId": 2, "status": "Captured", "merchantName": "Peppared Street Cafe", "merchantAddress": "7429 Desert Mirage Lane, Suite 7, Phoenix, AZ 85099", "merchantPhoneNumber": "+14155558787", "merchantEmailAddress": "billing@pepparedstreetcafe.example.com", "merchantWebsite": "https://pepparedstreetcafe.example.com", "authCode": "R64990", "source": { "typeId": 2, "type": "ApiToken", "id": "3c1f7a92-5d4e-4b8a-9f06-2e7d1b4c8a53", "name": "Store checkout API" }, "cardholderAuthenticationMethodId": 0, "cardholderAuthenticationMethod": "NotAuthenticated", "cvmResultMsg": null, "cardDataSourceId": 1, "cardDataSource": "Internet", "responseCode": "00", "responseDescription": "Approved and completed", "cardProcessingDetails": { "authCode": "R64990", "mid": "887000003193", "tid": "75021674", "cardCreditDebitTypeId": 1, "cardCreditDebitType": "Credit", "processCreditDebitTypeId": 1, "processCreditDebitType": "Credit", "rrn": "629322501148", "cardTypeId": 1, "cardType": "Visa" }, "achProcessingDetails": null, "availableOperations": [ { "typeId": 4, "type": "Void", "availableAmount": 64.99, "suggestedTips": null } ], "avsResponse": null, "emvTags": null, "orderNumber": "ORD-20261020-2001" } }