curl --request POST \
--url https://api-sandbox.y.uno/v1/checkout/sessions \
--header 'Content-Type: application/json' \
--header 'private-secret-key: <api-key>' \
--header 'public-api-key: <api-key>' \
--data '
{
"account_id": "{{account_id}}",
"merchant_order_id": "1717681150",
"payment_description": "Test Cards",
"country": "CO",
"customer_id": "{{customer_id}}",
"callback_url": "https://www.example.com",
"amount": {
"currency": "COP",
"value": 8000
},
"alternative_amount": {
"currency": "USD",
"value": 2
},
"metadata": [
{
"key": "ID",
"value": "123456"
}
],
"recurring_payment": {
"description": "Monthly subscription",
"management_url": "https://example.com/manage",
"billing_agreement": "BA-123",
"regular_billing": {
"label": "Monthly",
"amount": "9.99",
"interval_unit": "month",
"interval_count": 1
},
"trial_billing": {
"label": "Free trial",
"amount": "0.00",
"interval_unit": "month",
"interval_count": 1
}
}
}
'{
"merchant_order_id": "1717681150",
"checkout_session": "d313047b-4f96-44ef-bbad-caf1d7ba4c2b",
"country": "US",
"payment_description": "Test Cards",
"customer_id": "a577ad8f-08f1-4590-9cf1-e7679b15ee84",
"callback_url": "https://www.example.com/callback",
"amount": {
"currency": "USD",
"value": 520
},
"created_at": "2024-06-06T13:39:10.932297Z",
"metadata": null,
"workflow": "SDK_CHECKOUT",
"installments": {
"plan_id": null,
"plan": null
}
}Create Checkout Session
curl --request POST \
--url https://api-sandbox.y.uno/v1/checkout/sessions \
--header 'Content-Type: application/json' \
--header 'private-secret-key: <api-key>' \
--header 'public-api-key: <api-key>' \
--data '
{
"account_id": "{{account_id}}",
"merchant_order_id": "1717681150",
"payment_description": "Test Cards",
"country": "CO",
"customer_id": "{{customer_id}}",
"callback_url": "https://www.example.com",
"amount": {
"currency": "COP",
"value": 8000
},
"alternative_amount": {
"currency": "USD",
"value": 2
},
"metadata": [
{
"key": "ID",
"value": "123456"
}
],
"recurring_payment": {
"description": "Monthly subscription",
"management_url": "https://example.com/manage",
"billing_agreement": "BA-123",
"regular_billing": {
"label": "Monthly",
"amount": "9.99",
"interval_unit": "month",
"interval_count": 1
},
"trial_billing": {
"label": "Free trial",
"amount": "0.00",
"interval_unit": "month",
"interval_count": 1
}
}
}
'{
"merchant_order_id": "1717681150",
"checkout_session": "d313047b-4f96-44ef-bbad-caf1d7ba4c2b",
"country": "US",
"payment_description": "Test Cards",
"customer_id": "a577ad8f-08f1-4590-9cf1-e7679b15ee84",
"callback_url": "https://www.example.com/callback",
"amount": {
"currency": "USD",
"value": 520
},
"created_at": "2024-06-06T13:39:10.932297Z",
"metadata": null,
"workflow": "SDK_CHECKOUT",
"installments": {
"plan_id": null,
"plan": null
}
}customer resource was created.
additional_data object, it can be sent as part of the checkout session.Authorizations
Body
The unique identifier of the customer's order (MAX 255; MIN 3).
The description of the payment (MAX 255; MIN 3).
The customer's country (MAX 2; MIN 2; ISO 3166-1 [blocked]).
AR, BO, BR, CL, CO, CR, EC, SV, GT, HN, MX, NI, PA, PY, PE, US, UY The unique identifier of the account. You find this information on the Yuno dashboard (UUID, 36 chars).
The unique identifier of the customer, created using the Create Customer endpoint (UUID, 36 chars).
The URL where we will redirect your customer after making the purchase. Required for alternative payment methods with redirection. (MAX 526; MIN 3)
Specifies the payment amount object, with the value and currency.
Show child attributes
Show child attributes
Alternative currency representation of the transaction amount.
Show child attributes
Show child attributes
Specifies a list of metadata objects. You can add up to 120 metadata objects.
Show child attributes
Show child attributes
Checkout workflow type.
SDK_CHECKOUT, CHECKOUT, SDK_SEAMLESS The object to send the installment plan created in Yuno to show your customers and let them choose from. This optional field is used in case a particular installments plan needs to be used in the session. if not sent, we will display the installment plan created for the account for each scenario, if any.
Show child attributes
Show child attributes
Optional object to enable and configure recurring payments (subscriptions).
Show child attributes
Show child attributes
Response
200
- Checkout Session (min. data)
- Checkout Session (full data)
"1717681150"
"d313047b-4f96-44ef-bbad-caf1d7ba4c2b"
"US"
"Test Cards"
"a577ad8f-08f1-4590-9cf1-e7679b15ee84"
"https://www.example.com/callback"
Show child attributes
Show child attributes
"2024-06-06T13:39:10.932297Z"
"SDK_CHECKOUT"
Show child attributes
Show child attributes
Was this page helpful?