Skip to content

Reverses a transaction

Request

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 refund without a transaction identifier, see POST /pay-api/v1/transactions/return/no-reference
To settle a transaction, see POST /pay-api/v1/transactions/settle

Security
Bearer
Bodyapplication/json
cardDataSourceinteger, (int32)required

Specifies the card data source.

Possible values:

ValueNameDescription
1InternetVirtual Terminal, ISV API
2SwipeTrack1, Track2
3NFCEMV Tags, Track2
4EMVEMV Tags
5EMVContactlessEMV Tags
6FallbackSwipeTrack 2
7ManualCard present keyed transaction

Example: 2

Example:2
transactionIdstring, (uuid)required

Specifies the transaction identifier.

Example: 94c59697-3db4-4ef7-84f7-b1cc14f21d93

Example:"94c59697-3db4-4ef7-84f7-b1cc14f21d93"
track1string or null

The card data from track 1 of the magnetic stripe.

track2string or null

Information stored on the magnetic stripe of a credit or debit card, including the card number, expiration date, and cardholder's name.

emvTagsArray of strings or null

Each tag corresponds to a particular piece of data stored on the card.

emvPaymentAppVersionstring or null

The version number of the payment application in use.

pinstring or null
pinKsnstring or null
amountnumber or null, (double)

Amount

curl -i -X POST \
  https://developer.flute.com/_mock/api-reference/pay-api/v1/transactions/return \
  -H 'Authorization: Bearer <YOUR_JWT_HERE>' \
  -H 'Content-Type: application/json' \
  -d '{
    "track1": null,
    "track2": null,
    "emvTags": null,
    "emvPaymentAppVersion": null,
    "cardDataSource": 1,
    "pin": null,
    "pinKsn": null,
    "transactionId": "debb3098-3ca0-4b8b-b28d-d3a1c3e50e66",
    "amount": null
  }'

Responses

OK

Bodyapplication/json
transactionIdstring, (uuid)

Indicates the transaction identifier.

Example: c7c15dd0-03e7-4e55-917c-54bedafba5e7

Example:"c7c15dd0-03e7-4e55-917c-54bedafba5e7"
transactionDateTimestring, (date-time)

Indicates the date and time (in ISO 8601 UTC or timezone offset format) of the transaction.

Examples: 2026-08-24T08:45:22Z

Example:"2026-08-24T08:45:22Z"
typeIdinteger, (int32)

Type id of transaction.

typestring or null

Type name of transaction

statusIdinteger, (int32)

Status id of transaction.

statusstring or null

Status name of transaction

detailsobject
transactionReceiptobject or null


Indicates an object describing the transaction receipt. The transaction receipt will be null or empty before the transaction is completed. After the completed transaction, it be filled out.

Response
{ "transactionId": "c7c15dd0-03e7-4e55-917c-54bedafba5e7", "transactionDateTime": "2026-08-24T08:45:22Z", "typeId": 0, "type": "string", "statusId": 0, "status": "string", "details": { "hostResponseCode": "string", "hostResponseMessage": "string", "hostResponseDefinition": "string", "code": "string", "message": "string", "processorResponseCode": "string", "authCode": "string", "maskedPan": "********3743" }, "transactionReceipt": { "transactionId": "c7c15dd0-03e7-4e55-917c-54bedafba5e7", "transactionDateTime": "2026-02-19T20:24:52.934Z", "amount": { "baseAmount": 129.99, "percentageOffAmount": 12.5, "percentageOffRate": 3.5, "cashDiscountAmount": 10.55, "cashDiscountRate": 1.5, "surchargeAmount": 6.45, "surchargeRate": 1.5, "tipAmount": 14.5, "tipRate": 15, "totalAmount": 3219.45 }, "currencyId": 1, "currency": "USD", "processorId": "ef08c4d5-6e7f-4a8b-9c0d-1e2f3a4b5c81", "processor": "TSYS", "operationTypeId": 1, "operationType": "PayNow", "paymentMethodTypeId": 2, "paymentMethodType": "Card", "transactionTypeId": 5, "transactionType": "Refund", "customerId": "fd9198a4-eb6f-4620-9603-4f4638289de5", "customerPan": "************4512", "cardTokenType": 2, "statusId": 0, "status": "string", "merchantName": "string", "merchantAddress": "string", "merchantPhoneNumber": "+14155552309", "merchantEmailAddress": "string", "merchantWebsite": "string", "authCode": "string", "source": { "typeId": 0, "type": "string", "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08", "name": "string" }, "cardholderAuthenticationMethodId": 0, "cardholderAuthenticationMethod": "string", "cvmResultMsg": "string", "cardDataSourceId": 2, "cardDataSource": "string", "responseCode": "string", "responseDescription": "string", "cardProcessingDetails": { "authCode": "string", "mid": "43252511", "tid": "8820432549239101", "cardCreditDebitTypeId": 0, "cardCreditDebitType": "string", "processCreditDebitTypeId": 0, "processCreditDebitType": "string", "rrn": "10628361287F", "cardTypeId": 0, "cardType": "string" }, "achProcessingDetails": { "customerAccountNumber": "string", "customerRoutingNumber": "string", "accountHolderType": "string", "accountHolderTypeId": 0, "accountType": "string", "accountTypeId": 0, "taxId": "98-7654321" }, "availableOperations": [ { "typeId": 0, "type": "string", "availableAmount": 0.1, "suggestedTips": [ { "tipAmount": 14.5, "tipPercent": 15 } ] } ], "avsResponse": { "actionId": 1, "action": "string", "responseCode": "string", "groupId": 5, "group": "string", "resultId": 1, "result": "string", "codeDescription": "string" }, "emvTags": { "ac": "string", "tvr": "string", "tsi": "string", "aid": "string", "applicationLabel": "string", "rawTags": [ { "key": "string", "value": "string" } ] }, "orderNumber": "string" } }