Skip to main content
POST
/
payments
curl --request POST \ --url https://api-sandbox.y.uno/v1/payments \ --header 'Content-Type: application/json' \ --header 'X-Idempotency-Key: <api-key>' \ --header 'private-secret-key: <api-key>' \ --header 'public-api-key: <api-key>' \ --data ' { "description": "Test", "account_id": "<Your account_id>", "merchant_order_id": "0000022", "country": "US", "amount": { "currency": "USD", "value": 52000 }, "customer_payer": { "customer_id": "cfae0941-7234-427a-a739-ef4fce966c79" }, "checkout": { "session": "<checkout session>" }, "payment_method": { "token": "2cd31999-e44e-4de3-bbe4-179981ff4295" } } '
{ "id": "ebc54248-5bc7-4ab0-a74b-5567d09d8222", "account_id": "493e9374-510a-4201-9e09-de669d75f256", "description": "Test Cards", "country": "US", "status": "PENDING", "sub_status": "AUTHORIZED", "merchant_order_id": "0000022", "created_at": "2024-06-06T20:46:31.000981Z", "updated_at": "2024-06-06T20:46:31.475595Z", "amount": { "captured": 0, "currency": "USD", "refunded": 0, "value": 100 }, "checkout": { "session": "0322013e-660f-463d-98ca-b5c9267d00b3", "sdk_action_required": false }, "payment_method": { "vaulted_token": "", "type": "CARD", "vault_on_success": false, "token": "2daa4632-c26e-4e28-a0ad-ea31f75057b9", "payment_method_detail": { "card": { "verify": false, "capture": false, "installments": 1, "installments_plan_id": null, "first_installment_deferral": 0, "installments_type": "", "installment_amount": null, "soft_descriptor": "", "authorization_code": "5305c582-a192-41ff-ad98-3636d2758ed5", "retrieval_reference_number": "", "voucher": null, "card_data": { "holder_name": "John Doe", "iin": "41961111", "lfd": "0010", "number_length": 16, "security_code_length": 3, "brand": "VISA", "issuer_name": "METABANK", "issuer_code": null, "category": "PREPAID RELOADABLE", "type": "DEBIT", "three_d_secure": { "version": null, "electronic_commerce_indicator": null, "cryptogram": null, "transaction_id": null, "directory_server_transaction_id": null, "pares_status": null, "acs_id": null } }, "stored_credentials": { "reason": null, "usage": null } } } }, "customer_payer": { "id": "a577ad8f-08f1-4590-9cf1-e7679b15ee84", "merchant_customer_id": "1717677815", "first_name": "John", "last_name": "Doe", "gender": "M", "date_of_birth": "1990-02-28", "email": "john.doe@example.com", "nationality": "US", "ip_address": "186.18.25.23", "device_fingerprint": null, "browser_info": { "user_agent": "", "accept_header": "", "accept_content": null, "accept_browser": null, "color_depth": "", "screen_height": "", "screen_width": "", "javascript_enabled": null, "java_enabled": null, "browser_time_difference": null, "language": "" }, "document": { "document_type": "SSN", "document_number": "123-45-6789" }, "phone": { "number": "3132450765", "country_code": "1" }, "billing_address": { "address_line_1": "123 Main St", "address_line_2": "Apt 4B", "country": "US", "state": "NY", "city": "New York", "zip_code": "10001", "neighborhood": null }, "shipping_address": { "address_line_1": "123 Main St", "address_line_2": "Apt 4B", "country": "US", "state": "NY", "city": "New York", "zip_code": "10001", "neighborhood": null }, "merchant_customer_created_at": null }, "additional_data": null, "taxes": null, "transactions": { "id": "69b9f2e7-e32d-4c3d-a033-d38ccb4a1386", "type": "AUTHORIZE", "status": "SUCCEEDED", "category": "CARD", "amount": 100, "provider_id": "YUNO_TEST_PAYMENT_GW", "payment_method": { "vaulted_token": "", "type": "CARD", "vault_on_success": false, "token": "2daa4632-c26e-4e28-a0ad-ea31f75057b9", "detail": { "card": { "verify": false, "capture": false, "installments": 1, "installments_plan_id": null, "first_installment_deferral": 0, "installments_type": "", "installment_amount": null, "soft_descriptor": "", "authorization_code": "5305c582-a192-41ff-ad98-3636d2758ed5", "retrieval_reference_number": "", "voucher": null, "card_data": { "holder_name": "John Doe", "iin": "41961111", "lfd": "0010", "number_length": 16, "security_code_length": 3, "brand": "VISA", "issuer_name": "METABANK", "issuer_code": null, "category": "PREPAID RELOADABLE", "type": "DEBIT", "three_d_secure": { "version": null, "electronic_commerce_indicator": null, "cryptogram": null, "transaction_id": null, "directory_server_transaction_id": null, "pares_status": null, "acs_id": null } }, "stored_credentials": { "reason": null, "usage": null } } } }, "response_code": "SUCCEEDED", "response_message": "Transaction successful", "reason": null, "description": "Test Cards", "merchant_reference": "Pago de test 001", "provider_data": { "id": "YUNO_TEST_PAYMENT_GW", "transaction_id": "359ac6a3-7772-47be-8983-012123f96985", "account_id": "", "status": "SUCCEEDED", "status_detail": "", "response_message": "", "response_code": "", "iso8583_response_code": "00", "iso8583_response_message": "Approved or completed successfully", "raw_response": { "amount": { "currency": "USD", "value": 2100 }, "merchantAccount": "YunoPaymentsECOM", "paymentPspReference": "ZKHXKZGXMLBX8N82", "pspReference": "VKJTCWZ9575ZGN82", "reference": "34343434", "status": "received" }, "third_party_transaction_id": "", "third_party_account_id": "" }, "created_at": "2024-06-06T20:46:31.231755Z", "updated_at": "2024-06-06T20:46:31.349405Z" }, "transactions_history": { "id": "69b9f2e7-e32d-4c3d-a033-d38ccb4a1386", "type": "AUTHORIZE", "status": "SUCCEEDED", "category": "CARD", "amount": 100, "provider_id": "YUNO_TEST_PAYMENT_GW", "payment_method": { "vaulted_token": "", "type": "CARD", "vault_on_success": false, "token": "2daa4632-c26e-4e28-a0ad-ea31f75057b9", "detail": { "card": { "verify": null, "capture": false, "installments": 1, "installments_plan_id": null, "first_installment_deferral": 0, "installments_type": "", "installment_amount": null, "soft_descriptor": "", "authorization_code": "5305c582-a192-41ff-ad98-3636d2758ed5", "retrieval_reference_number": "", "voucher": null, "card_data": { "holder_name": "John Doe", "iin": "41961111", "lfd": "0010", "number_length": 16, "security_code_length": 3, "brand": "VISA", "issuer_name": "METABANK", "issuer_code": null, "category": "PREPAID RELOADABLE", "type": "DEBIT", "three_d_secure": { "version": null, "electronic_commerce_indicator": null, "cryptogram": null, "transaction_id": null, "directory_server_transaction_id": null, "pares_status": null, "acs_id": null } }, "stored_credentials": { "reason": null, "usage": null } } } }, "response_code": "SUCCEEDED", "response_message": "Transaction successful", "reason": null, "description": "Test Cards", "merchant_reference": "Pago de test 001", "provider_data": { "id": "YUNO_TEST_PAYMENT_GW", "transaction_id": "359ac6a3-7772-47be-8983-012123f96985", "account_id": "", "status": "SUCCEEDED", "sub_status": "", "status_detail": "", "response_message": "", "response_code": "", "raw_response": { "amount": { "currency": "USD", "value": 2100 }, "merchantAccount": "YunoPaymentsECOM", "paymentPspReference": "ZKHXKZGXMLBX8N82", "pspReference": "VKJTCWZ9575ZGN82", "reference": "34343434", "status": "received" }, "third_party_transaction_id": "", "third_party_account_id": "" }, "created_at": "2024-06-06T20:46:31.231755Z", "updated_at": "2024-06-06T20:46:31.349405Z" }, "split": [], "workflow": "SDK_CHECKOUT", "metadata": [], "fraud_screening": null, "payment_link_id": "", "subscription_code": null, "routing_rules": { "condition": { "id": 76152, "name": null, "description": null } } }
This request allows you to authorize a payment after you created a checkout session. It just authorizes the amount on the credit_card (the client is not charged). If you want to make an authorization for a payment, you will need to send the capture as “false” within the card object, which is located inside the payment_method object.

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

Body

application/json
account_id
string
required

The unique identifier of the account. You find this information on Yuno's Dashboard (MAX 64; MIN 36).

description
string
required

The description of the payment (MAX 255; MIN 3).

country
enum<string>
required

The customer's country code (MAX 2; MIN 2; ISO 3166-1).

Available options:
AR,
BO,
BR,
CL,
CO,
CR,
EC,
SV,
GT,
HN,
MX,
NI,
PA,
PY,
PE,
US,
UY
merchant_order_id
string
required

The unique identifier of the customer's order (MAX 255; MIN 3).

customer_payer
object
required

Specifies customer object for payments.

checkout
object
required

Specifies the checkout object. This object is not mandatory for back to back payments. Required when workflow is defined as CHECKOUT or is not sent. not required for DIRECT payments.

additional_data
object

Specifies the additional_data object. This object is not mandatory. However, if you send this information, the payment experience will be enhanced for your user.

merchant_reference
string

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

amount
object

Specifies the payment amount object, with the value and currency.

workflow
enum<string>
default:DIRECT

The payment workflow. Indicates whether the integration will use Yuno´s SDK or will be a back to back connection. CHECKOUT=Use Yuno SDK. DIRECT= Back to back integration with provider info for custom payment experience, REDIRECT= Back to back integration with provider redirection.

Available options:
SDK_CHECKOUT,
DIRECT,
REDIRECT
taxes
object

Specifies the order's tax object.

payment_method
object

The payment method object.

metadata
object[]

Specifies a list of metadata objects. You can add up to 50 metadata objects.

callback_url
string

The URL where to redirect the customer after the payment. Only required for DIRECT integrations that have a redirection (MAX 526; MIN 3).

Response

201

id
string
Example:

"ebc54248-5bc7-4ab0-a74b-5567d09d8222"

account_id
string
Example:

"493e9374-510a-4201-9e09-de669d75f256"

description
string
Example:

"Test Cards"

country
string
Example:

"US"

status
string
Example:

"PENDING"

sub_status
string
Example:

"AUTHORIZED"

merchant_order_id
string
Example:

"0000022"

created_at
string
Example:

"2024-06-06T20:46:31.000981Z"

updated_at
string
Example:

"2024-06-06T20:46:31.475595Z"

amount
object
checkout
object
payment_method
object
customer_payer
object
additional_data
any
taxes
any
transactions
object
transactions_history
object
split
array
workflow
string
Example:

"SDK_CHECKOUT"

metadata
array
fraud_screening
any
Example:

""

subscription_code
any
routing_rules
object