---
title: "Capture transaction"
method: POST
path: "/v2/transactions/{ratepay_transaction_id}/captures"
tags: ["Capture"]
---

# Capture transaction

`POST /v2/transactions/{ratepay_transaction_id}/captures`

Capture a previously authorized transaction

## Path parameters

- `ratepay_transaction_id` string, required

## Headers

- `Idempotency-Key` string
- `Prefer` 'return=representation'
- `X-Partner` string

## Request body

- CaptureRequestDto
  - `gross_amount` number, required — Amount to capture given in currency of original transaction.
  - `items` ItemDto[] — List of captured items.
    - `article_number` string — The article number of the item, e.g. SKU. Not allowed to contain only whitespaces.
    - `category` string — Category for the item.
    - `description` string — Description of the item.
    - `gross_total_price` number — Gross value including discount of these items after taxes. gross_total_price = (gross_unit_price + gross_unit_discount) * quantity
    - `gross_unit_discount` number — Gross discount on one item after taxes. Needs to be a negative value.
    - `gross_unit_price` number, required — Gross value of one item before taxes. For the RETURN_FEE type, applicable only to the REFUND operation, the value must be negative.
    - `name` string, required — Name of the item.
    - `net_total_price` number — Net value including discount of these items before taxes. net_total_price = (net_unit_price + net_unit_discount) * quantity
    - `net_unit_discount` number — Net discount on one item before taxes. Needs to be a negative value.
    - `net_unit_price` number — Net value of one item before taxes.
    - `quantity` number, required — Ordered quantity of the item.
    - `tax_rate` number, required — Tax rate applicable for the item given in percent.
    - `unit` string — Arbitrary measurement unit of the item, e.g. kg, litre, pieces.
  - `partner_invoice_id` string — Arbitrary invoice ID generated by partner.
  - `partner_operation_id` string — The unique ID generated by the partner or shop to identify an API operation. This ID can be displayed in settlement reports to allow relating settlement report items to API operations. Get an [overview of key identifiers](/docs/developer/api_integration/payment_2.0/key_identifiers/) used in payment API.
  - `partner_shop_id` string — The shop ID provided upfront by Ratepay or generated by the partner in PSP (payment service providers) scenarios. Get an [overview of key identifiers](/docs/developer/api_integration/payment_2.0/key_identifiers/) used in payment API. This field is required in case of marketplace transaction.
  - `partner_transaction_id` string, required — The transaction ID generated by the partner (i.e. Partner Order ID). Use the same value as shop_transaction_id unless the shop and integration partner manage separate transaction IDs, such as in PSP (payment service provider) integrations. **This field must be included in at least one of the following requests: authorization or capture.** This ID can be displayed in settlement reports. Get an [overview of key identifiers](/docs/developer/api_integration/payment_2.0/key_identifiers/) used in payment API.
  - `shop_transaction_id` string, required — The transaction ID generated by the shop (i.e. Shop Order ID). Differs from partner_transaction_id only in PSP (payment service provider) scenarios. **This field must be included in at least one of the following requests: authorization or capture.** This ID must be known to the buyer and is used for buyer communication, e.g. correspondences and buyer support.
  - `special_items` SpecialItemDto[] — List of captured special items, e.g. shipping costs or discounts.
    - `article_number` string — The article number of the item, e.g. SKU. Not allowed to contain only whitespaces.
    - `category` string — Category for the item.
    - `description` string — Description of the item.
    - `gross_total_price` number — Gross value including discount of these items after taxes. gross_total_price = (gross_unit_price + gross_unit_discount) * quantity
    - `gross_unit_discount` number — Gross discount on one item after taxes. Needs to be a negative value.
    - `gross_unit_price` number, required — Gross value of one item before taxes. For the RETURN_FEE type, applicable only to the REFUND operation, the value must be negative.
    - `name` string, required — Name of the item.
    - `net_total_price` number — Net value including discount of these items before taxes. net_total_price = (net_unit_price + net_unit_discount) * quantity
    - `net_unit_discount` number — Net discount on one item before taxes. Needs to be a negative value.
    - `net_unit_price` number — Net value of one item before taxes.
    - `quantity` number, required — Ordered quantity of the item.
    - `tax_rate` number, required — Tax rate applicable for the item given in percent.
    - `type` 'RETURN_FEE' — The special item type the buyer selected. RETURN_FEE type is applicable only for the REFUND operation. Click [here](/docs/developer/api_integration/payment_2.0/example_requests/for_merchants/#With-items-and-buyer-return-fee) for example about usage for merchants or [here](/docs/developer/api_integration/payment_2.0/example_requests/for_marketplaces/#With-items-and-buyer-return-fee) for marketplaces.
    - `unit` string — Arbitrary measurement unit of the item, e.g. kg, litre, pieces.
  - `vats` VatDto[] — List of value-added tax (VAT) amounts.
    - `net_amount` number — The net amount before taxes for the given tax rate.
    - `tax_amount` number — The tax amount for the given tax rate.
    - `tax_rate` number — Tax rate given as percentage on the net amount.

## Response `201`

Capture created

## Other responses

- `400` — Bad request
- `404` — Transaction not found
- `422` — Capture declined
- `451` — Legally not allowed
- `500` — Technical problem

---

[API](https://skmtc.net/ratepay/apis/payment-openapi-specification.md) · [All operations](https://skmtc.net/ratepay/apis/payment-openapi-specification/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/ratepay/payment-openapi-specification/revisions/1c957020939e/schema)
