Batch Refunds

Merchants can refund several transactions at once. Every transaction in a batch is refunded independently, so a transaction that cannot be refunded is reported back on its own without stopping the others.

Batch refunds are always for the full remaining amount of each transaction. To refund part of a transaction, refund it on its own - see Partial Refunds.

Refund from Dashboard

To refund several transactions from the dashboard:

  1. On the merchant dashboard, navigate to the Payments tab.
  2. Select the checkbox at the left of each transaction to refund. The checkbox in the header row selects every refundable transaction currently loaded.
  3. Select Refund transactions above the table. The button stays disabled until at least one transaction is selected.
  4. Enter the refund reason, which applies to every transaction in the batch, and confirm.

Transactions that are not in a refundable state have a disabled checkbox. Payment methods that need extra details supplied for each individual refund are also excluded, and must be refunded one at a time.

Progress is reported as a single notification while the refunds are processed, and each refund then appears on the Refunds tab like any other.

Refund API

Merchants can call Coinflow’s Batch Refund Payments endpoint with up to 100 payment ids per request. The response reports the outcome for each payment individually: jobId when the refund was queued, or error explaining why it was not.

A result marked skipped is one this endpoint can never process, whatever its state — refund it on its own rather than retrying the batch. Payments needing a destination supplied for each refund are always skipped, so they are counted separately from failed.

Request
$// Example of how to refund several payments in full with one request.
$
$
$curl --request PUT \
> --url https://api-sandbox.coinflow.cash/api/merchant/payments/refunds/batch \
> --header 'Authorization: YOUR_API_KEY' \
> --header 'accept: application/json' \
> --header 'content-type: application/json' \
> --data '
>{
> "paymentIds": [
> "10475192-95e4-4065-bafd-61e564468129",
> "2a9f4c31-7b18-4e02-9c55-1d3f8ab27e64",
> "7c1e5d80-3f42-4a96-8b21-6e90cf5713da"
> ],
> "refundReason": "failedFulfillment"
>}
>'
Response
1{
2 "queued": 1,
3 "failed": 1,
4 "skipped": 1,
5 "results": [
6 {
7 "paymentId": "10475192-95e4-4065-bafd-61e564468129",
8 "success": true,
9 "jobId": "RefundPipeline10475192-95e4-4065-bafd-61e564468129"
10 },
11 {
12 "paymentId": "2a9f4c31-7b18-4e02-9c55-1d3f8ab27e64",
13 "success": false,
14 "error": "Not in refundable state"
15 },
16 {
17 "paymentId": "7c1e5d80-3f42-4a96-8b21-6e90cf5713da",
18 "success": false,
19 "skipped": true,
20 "error": "Payments must be refunded individually when each refund needs its own destination"
21 }
22 ]
23}

To view the refund details for any payment in the batch, call the View Refund Information for Payment endpoint with that payment id.