Bulk Refunds

Use this request to refund multiple transaction lines in a single request.

You can use the Create a refund request to refund a single transaction line. Use the Bulk Refunds request to refund multiple transaction lines with a single request.

To refund multiple transaction lines in a single request, use the following URL and a POST method:

http://{service_uri}/api/v2/transactions/{transaction_key}/refunds/bulk?private_token={private_token}

where:

  • {service_uri}: The URI of the service. For example .
  • {transaction_key} The Transaction Key that identifies the transaction that is to be refunded.
  • {private_token}: The private token.

For example:

http://{service_uri}/api/v2/transactions/TneMABJPzlD3AqERmMFNl8ZrM5sY/refunds/bulk?private_token={private_token}

Details

TypeValue
Endpoint/api/v2/transactions/{transaction_key}/refunds/bulk
MethodPOST

Request Parameters

You can use any of the fields listed in the Refunds Schema.

US and Canadian refunds also contain additional information, see US and Canadian Refunds (Tax Components Schema)

You must specify either a line_key or a custom_id to identify the transaction line.

The following request parameters are available:

FieldDescription
{transaction_key}The key of the transaction that is to be refunded.
line_keyUse this to specify the transaction lines that you want to refund.
custom_idIf you specified a custom_id when you created the transaction, you can use this to identify the transaction lines that you want to refund.

Example Request

This example shows how you can use a Custom ID to specify the lines:

{         
    "refund-unique-id": "xyz",
    "refunds": [
        {
           "custom_id": "customID_1",
           "amount": 150,
           "refund_reason": "Faulty Goods"
        },
        {
            "custom_id": "customID_2",
            "amount": "20",
            "refund_reason": "Late Delivery"
        }
    ]
}