Yuno is the AI operating system for payments, and a payment is the first thing you run on it. You send your first sandbox payment in about 10 minutes once you have sandbox credentials.
Before you start
You need these facts for every call on this page.Get your sandbox credentials
- Account code, shown as
account_idin the dashboard public-api-keyprivate-secret-key
sandbox_. Production keys are different and start with prod_.
https://api-sandbox.y.uno/v1.id. Save it as YUNO_CUSTOMER_ID, the payment steps use it.POST /v1/customers answers 201.401means the key pair is wrong. Copy both sandbox keys again from Developers.404with an empty body means/v1is missing from the base URL.
Connect the Yuno Test Payment Gateway and publish a route
- Open Connections, search for Yuno Test Payment Gateway, click Connect, name the connection, and click Save.
- Open Routing, open the Not published tab, find Card, and click Set Up.
- Click + Create new route, name it, and click Save.
- Click the arrow, choose Add step, select Yuno Test Payment Gateway, and click Publish.
- Open Checkout builder, turn on Card, and publish the settings.
CARD. Create a session as in step 4 and save its checkout_session as YUNO_CHECKOUT_SESSION. Then call GET /v1/checkout/sessions/{checkout_session}/payment-methods and look for "type": "CARD" in the list.If CARD is missing, check the three settings: the Test Payment Gateway is connected, the Card route is under Published, and Card is on in the Checkout builder.Choose how the payment is created
workflow field tells Yuno who creates the payment. Pick one, then use the matching tab in step 4.INTERNAL_ERROR. See Get started with the Yuno SDK and Direct flow for each path in full.SDK_SEAMLESS, SDK_CHECKOUT or DIRECT. The checkout session (SDK paths) or the payment (DIRECT) carries it in the workflow field.Send the payment
- DIRECT
- SDK_SEAMLESS
- SDK_CHECKOUT
DIRECT workflow is a back-to-back payment where your server sends the card data. Use the customer id you saved as YUNO_CUSTOMER_ID in step 1.Create the payment with a test card. Send a new X-Idempotency-Key with each payment.status is SUCCEEDED with the test card 4507 9900 0000 0002 (11/28, CVV 123, John Doe).See the result
- Check
statusandsub_statusin the response.SUCCEEDEDwithAPPROVEDmeans the gateway approved the payment. - Open Payments in the dashboard, find your payment, and open it to see its details.
- To receive the result on your server, configure a webhook and verify its signature (HMAC).
SUCCEEDED in the dashboard Payments list and in the status field of your response.Next
Go live
Troubleshooting
The API returns 401
The API returns 401
public-api-key or private-secret-key header is missing or wrong. Sandbox and production use different keys, so check that you copied the sandbox keys from the dashboard in Test Mode. See Authentication.The payment ends in INTERNAL_ERROR
The payment ends in INTERNAL_ERROR
workflow does not match your integration. Use DIRECT when your server sends the card, and SDK_SEAMLESS on the checkout session when the Web SDK creates the payment.No provider processes the payment
No provider processes the payment
The card is declined
The card is declined
Stuck on a term? See the Glossary. For URLs, keys, and specs see Developers.