Skip to main content
POST
/
payments
/
{payment_id}
/
transactions
/
{transaction_id}
/
capture
curl --request POST \ --url https://api-sandbox.y.uno/v1/payments/{payment_id}/transactions/{transaction_id}/capture \ --header 'Content-Type: application/json' \ --header 'X-Idempotency-Key: <api-key>' \ --header 'private-secret-key: <api-key>' \ --header 'public-api-key: <api-key>' \ --data ' { "amount": { "currency": "USD", "value": 30000 }, "description": "Confirmed", "reason": "PRODUCT_CONFIRMED", "merchant_reference": "AAB01-432245" } '
{ "id": "89fd7fd0-951d-4335-ad1b-ef899a79630d", "type": "CAPTURE", "status": "SUCCEEDED", "category": "CARD", "amount": { "captured": 0, "currency": "USD", "refunded": 0, "value": 30000 }, "merchant_reference": "AAB01-432245", "created_at": "2024-06-06T14:26:41.535489Z", "updated_at": "2024-06-06T14:26:41.615608Z", "provider_data": { "id": "YUNO_TEST_PAYMENT_GW", "transaction_id": "1173513e-2422-4ba0-ba40-fd568a4904f9", "account_id": "493e9374-510a-4201-9e09-de669d75f256", "status": "SUCCEEDED", "status_detail": "", "response_message": "Transaction successful", "response_code": "", "iso8583_response_code": "00", "iso8583_response_message": "Approved or completed successfully", "raw_response": null, "third_party_transaction_id": null, "third_party_account_id": null }, "response_code": "SUCCEEDED", "response_message": "Transaction successful", "payment": { "id": "af170f9d-e8c1-47e4-a988-25535e0f88a1", "account_id": "", "description": "Test", "country": "US", "status": "SUCCEEDED", "sub_status": "CAPTURED", "merchant_order_id": "0000023", "created_at": "2024-06-06T14:26:22.933194Z", "updated_at": "2024-06-06T14:26:41.655119Z", "amount": { "captured": 30000, "currency": "USD", "refunded": 0, "value": 30000 }, "additional_data": { "airline": null, "order": null, "seller_details": null } } }
Do not execute a capture while another is in progress. Wait for the current operation to complete before starting a new one.
This request captures a payment that was previously authorized. This action is required to finalize a payment when an authorization was created with the capture option set false. Depending on the payment provider, the capture could be partial (including multiple captures) or total. Note that this request requires an X-Idempotency-Key. Check the Authentication page for more information.

Authorizations

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

Path Parameters

payment_id
string
required

The unique identifier of the payment (UUID, 36 chars).

transaction_id
string
required

The unique identifier of the transaction (UUID, 36 chars)

Body

application/json
merchant_reference
string
required

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

amount
object
required

Specifies the amount object for capturing.

reason
string
required

Indicating the reason for the capture. For example: PRODUCT_CONFIRMED and REQUESTED_BY_CUSTOMER.

additional_data
object

Additional data to complement the payment capture

simplified_mode
boolean

Determines whether Yuno should automatically attempt to capture a payment after an initial error or decline. When set to true, Yuno will retry the process if the first attempt fails. By default, this is set to false. Access Transaction Retries for more details.

Response

200

id
string
Example:

"89fd7fd0-951d-4335-ad1b-ef899a79630d"

type
string
Example:

"CAPTURE"

status
string
Example:

"SUCCEEDED"

category
string
Example:

"CARD"

amount
object
merchant_reference
string
Example:

"AAB01-432245"

created_at
string
Example:

"2024-06-06T14:26:41.535489Z"

updated_at
string
Example:

"2024-06-06T14:26:41.615608Z"

provider_data
object
response_code
string
Example:

"SUCCEEDED"

response_message
string
Example:

"Transaction successful"

payment
object