Cancel a previously authorized transaction
ratepay_transaction_id required | string ID of transaction to cancel. Get an overview of key identifiers used in payment API. |
Idempotency-Key | string <= 64 characters ID generated by client to uniquely identify the request. It is highly recommended to use a UUID version 4. Do not reuse an idempotency key for different calls. See Idempotency for further details. |
Prefer | string According to RFC 7240: Provide |
gross_amount required | number decimal places <= 2 > 0 Amount to cancel given in currency of original transaction. |
Array of objects (ItemDto) List of cancelled items | |
partner_operation_id | string [ 0 .. 255 ] characters Arbitrary ID of partner for the operation. This ID can be displayed in settlement reports. Get an overview of key identifiers used in payment API. |
partner_shop_id | string [ 1 .. 255 ] characters The shop ID generated by the partner or provided upfront by Ratepay. Get an overview of key identifiers used in payment API. This field is required in case of marketplace transaction. |
Array of objects (SpecialItemDto) List of cancelled special items, e.g. shipping costs or discounts. | |
Array of objects (VatDto) List of value-added tax (VAT) amounts. |
Cancellation created
Bad request
Transaction not found
Cancellation declined
Legally not allowed
Technical problem
{- "gross_amount": 67.6,
- "items": [
- {
- "article_number": "kitchen-utils-1",
- "category": "household",
- "description": "fruit knife with curved blade, 8 cm",
- "gross_total_price": 33.8,
- "gross_unit_discount": -1.55,
- "gross_unit_price": 18.45,
- "name": "fruit knife",
- "net_total_price": 28.4,
- "net_unit_discount": -1.3,
- "net_unit_price": 15.5,
- "quantity": 2,
- "tax_rate": 19,
- "unit": "piece"
}
], - "partner_operation_id": "cancel-id-1234",
- "partner_shop_id": "partner-shop-id-1",
- "special_items": [
- {
- "article_number": "kitchen-utils-1",
- "category": "household",
- "description": "fruit knife with curved blade, 8 cm",
- "gross_total_price": 33.8,
- "gross_unit_discount": -1.55,
- "gross_unit_price": 18.45,
- "name": "fruit knife",
- "net_total_price": 28.4,
- "net_unit_discount": -1.3,
- "net_unit_price": 15.5,
- "quantity": 2,
- "tax_rate": 19,
- "type": "RETURN_FEE",
- "unit": "piece"
}
], - "vats": [
- {
- "net_amount": 56.81,
- "tax_amount": 10.79,
- "tax_rate": 19
}
]
}
{- "_links": {
}, - "created": "2019-08-24T14:15:22Z",
- "ratepay_cancellation_id": "aa7rth5-__GG44rdsasf"
}