Payments

Refund a payment

Refunds a payment if supported by the payment method.

For card payments, refund requests are processed asynchronously. You can use workflows to be notified if the refund is successful.

post/payments/{id}/refunds

Request

Path parameters

idstring required

The payment identifier

Headers

Cko-Idempotency-Keystring

An optional idempotency key for safely retrying payment requests

Request body

amountinteger

The amount to refund. If not specified, the full payment amount will be refunded.

referencestring

A reference you can later use to identify this refund request.<br>For Amex, the string limit is 30 characters. <br> For TWINT, the string limit is 50 characters.

capture_action_idstring

The Checkout.com action ID of the capture you want to refund. Only for PayPal and Riverty.

metadataobject

A set of key-value pairs to attach to the authorization request. You can use this to store additional information in a structured format.

The metadata object only supports primitive data types. Objects and arrays are not supported.

Example request

{
  "amount": 6540,
  "reference": "ORD-5023-4E89",
  "amount_allocations": [
    {
      "id": "ent_w4jelhppmfiufdnatam37wrfc4",
      "amount": 1000,
      "reference": "ORD-5023-4E89",
      "commission": {
        "amount": 1000,
        "percentage": 1.125
      }
    }
  ],
  "capture_action_id": "act_fd3h6evhpn3uxdoqbuu3lqnqbm",
  "items": [
    {
      "type": "digital",
      "sub_type": "stablecoin",
      "name": "Necklace",
      "quantity": 2,
      "unit_price": 50,
      "reference": "858818ac",
      "commodity_code": "DEF123",
      "unit_of_measure": "metres",
      "total_amount": 29000,
      "tax_rate": 2000,
      "tax_amount": 1000,
      "discount_amount": 1000,
      "wxpay_goods_id": "1001",
      "service_ends_on": "2025-01-01T00:00:00.0000000",
      "purchase_country": "GB",
      "foreign_retailer_amount": 200
    }
  ],
  "destination": {
    "account_type": "savings",
    "account_number": "13654567455",
    "bank_code": "123-456",
    "branch_code": "6443",
    "iban": "HU93116000060000000012345676",
    "bban": "3704 0044 0532 0130 00",
    "swift_bic": "37040044",
    "country": "GB",
    "account_holder": {
      "type": "individual",
      "first_name": "John",
      "last_name": "Smith",
      "company_name": "Test company",
      "tax_id": "123456",
      "date_of_birth": "1986-01-01T00:00:00.0000000",
      "country_of_birth": "GB",
      "residential_status": "resident",
      "billing_address": {
        "address_line1": "123 High St.",
        "address_line2": "Flat 456",
        "city": "London",
        "zip": "SW1A 1AA",
        "country": "GB"
      },
      "phone": {
        "country_code": "+1",
        "number": "415 555 2671"
      },
      "identification": {
        "type": "passport",
        "number": "09876",
        "issuing_country": "US"
      },
      "email": "test.user@checkout.com"
    },
    "bank": {
      "name": "Lloyds TSB",
      "branch": "Bournemouth",
      "address": {
        "address_line1": "123 High St.",
        "address_line2": "Flat 456",
        "city": "London",
        "zip": "SW1A 1AA",
        "country": "GB"
      }
    }
  },
  "metadata": {
    "coupon_code": "NY2018",
    "partner_id": 123989
  }
}

Response

Payment is already refunded

action_idstring required

The action identifier

Example response

{
  "action_id": "act_y3oqhf46pyzuxjbcn2giaqnb44"
}

Changes

No recorded changes to this operation across all 1 revision of this API.