Skip to main content
POST
Refund Payment (two cards)
This request refunds one card of a payment created with Create Payment (two cards). Refund is per card: send the id of that card’s PURCHASE or CAPTURE transaction from payment_method.payment_methods[].transactions. If you omit amount, the card is refunded in full. A refund on a card is capped at that card’s amount minus what was already refunded on it. After one card is refunded, the payment is SUCCEEDED / PARTIALLY_REFUNDED; after both, it is REFUNDED / REFUNDED. The response is 201 with the payment in the v2 shape.
While a card has an open chargeback, refunds are rejected with INVALID_STATUS.
This request requires an X-Idempotency-Key. See Authentication for details.

Authorizations

public-api-key
string
header
default:<Your public-api-key>
required
private-secret-key
string
header
default:<Your private-secret-key>
required

Headers

X-Idempotency-Key
string<uuid>
required

Unique key for this request. Required on every v2 payment request. Retry an unclear outcome with the same key. Without it the request is rejected with 400 INVALID_PARAMETERS: "The header 'x-idempotency-key' is required."

Path Parameters

payment_id
string<uuid>
required

The id of the payment returned by POST /v2/payments.

transaction_id
string<uuid>
required

The id of the card transaction to operate on, from payment_method.payment_methods[].transactions[].

Body

application/json
merchant_reference
string
required

Identification of the payment transaction defined by the merchant (MAX 255; MIN 3).

description
string

Description of the refund. (MAX 255; MIN 3).

reason
enum<string>

Reason for the operation. Possible values are DUPLICATE, FRAUDULENT and REQUESTED_BY_CUSTOMER.

Available options:
DUPLICATE,
FRAUDULENT,
REQUESTED_BY_CUSTOMER
amount
object

Optional. Amount to refund on this card. If you omit it, the card is refunded in full.

customer_payer
object

Specifies customer object for payments.

payment_method
object

Specifies payment method object for payments.

Response

The payment after the operation, in the v2 shape

A payment funded by two cards.

id
string<uuid>
account_id
string<uuid>
description
string
country
string
status
string

Aggregated status of the payment. See Pay with two cards.

sub_status
string

Aggregated sub status, for example APPROVED, AUTHORIZED, PARTIALLY_CAPTURED, PARTIALLY_REFUNDED, REFUND_RETRY_IN_PROCESS or CANCEL_RETRY_IN_PROCESS.

merchant_order_id
string
merchant_reference
string
created_at
string<date-time>
updated_at
string<date-time>
split_payment_methods
boolean

true for a payment funded by two cards.

payment_methods_count
integer

Number of cards that fund the payment: 2.

sdk_action_required
boolean

true when the SDK must continue the payment, for example to run a 3DS challenge.

amount
object

Total of the payment.

checkout
object
payment_method
object
customer_payer
object

The payer, as sent in the request.

additional_data
object | null
callback_url
string
workflow
enum<string>
Available options:
DIRECT,
REDIRECT,
SDK_CHECKOUT
metadata
object[]