Capture transaction

Capture a previously authorized transaction

SecurityBearer Authentication
Request
path Parameters
ratepay_transaction_id
required
string

ID of transaction to capture. Get an overview of key identifiers used in payment API.

header Parameters
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 return=representation if you prefer that the response to a request includes the current state of the resource.

Value: "return=representation"
Request Body schema: application/json
required
gross_amount
required
number decimal places <= 2 > 0

Amount to capture given in currency of original transaction.

Array of objects (ItemDto)

List of captured items.

partner_invoice_id
string [ 0 .. 50 ] characters

Arbitrary invoice ID generated by partner.

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.

partner_transaction_id
string [ 1 .. 50 ] characters

The transaction ID generated by the partner. 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 used in payment API.

shop_transaction_id
string [ 1 .. 127 ] characters

The transaction ID generated by the shop. 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.

Array of objects (SpecialItemDto)

List of captured special items, e.g. shipping costs or discounts.

Array of objects (VatDto)

List of value-added tax (VAT) amounts.

Responses
201

Capture created

400

Bad request

404

Transaction not found

422

Capture declined

451

Legally not allowed

500

Technical problem

post/v2/transactions/{ratepay_transaction_id}/captures
Request samples
application/json
{
  • "gross_amount": 67.6,
  • "items": [
    ],
  • "partner_invoice_id": "partner-invoice-id-1234",
  • "partner_operation_id": "capture-id-1234",
  • "partner_shop_id": "partner-shop-id-1",
  • "partner_transaction_id": "partner-transaction-id-1234",
  • "shop_transaction_id": "shop-transaction-id-1234",
  • "special_items": [
    ],
  • "vats": [
    ]
}
Response samples
application/hal+json
{}