How it works
Accept online payments on your website or app. The Yeti ECOM API works hand-in-hand with Adyen's Drop-in and Components -- you use Adyen's frontend libraries to show a payment form to your customers, and your server talks to Yeti to make the payment happen.
If you've used Adyen before, you'll feel right at home. The request and response shapes are the same ones you already know.
How it fits together
┌──────────────────┐ ┌──────────────────┐ ┌──────────────────┐
│ Your customer's │ │ Your server │ │ Yeti ECOM API │
│ browser │ │ │ │ │
│ │ │ │ │ │
│ Adyen Drop-in / │◄─────►│ Your backend │◄─────►│ api.yeti.host │
│ Components │ │ code │ │ /v1/ecom/... │
└──────────────────┘ └──────────────────┘ └──────────────────┘
Your server talks to Yeti using a Bearer token. On the frontend, Adyen's client-side libraries handle the payment form and any extra steps like 3D Secure. Yeti takes care of merchant routing, payment splits, and configuration behind the scenes -- you don't need to worry about any of that.
Base URLs
| Environment | URL |
|---|---|
| Production | https://api.yeti.host/v1/ecom |
| Test | https://test.yeti.host/v1/ecom |
How to accept a payment
There are two ways to integrate, plus a handful of things you can do after a payment goes through.
Sessions (the easiest way)
This is what we'd recommend for most people. Your server creates a checkout session, hands it to the Adyen Drop-in, and the Drop-in takes it from there -- it shows the payment form, handles 3D Secure, and deals with redirects. You don't need to get involved.
Your server Yeti API
│ │
│── GET /v1/ecom/config ────────────►│
│◄── { clientToken } ───────────────│
│ │
│── POST /v1/ecom/{siteId}/sessions ►│
│◄── session (id, sessionData) ──────│
│ │
▼ │
Pass clientToken + session │
to Adyen Drop-in on your page │
│
The Drop-in handles the payment, │
3DS, and any redirects for you │
│
│◄── Webhook (async) ───────────────│
You'll use: GET /config and POST /sessions
Advanced (more control)
If you need to manage each step yourself -- choosing which payment methods to show, handling form submissions, dealing with 3D Secure -- this flow gives you that control. You use Adyen Components instead of the Drop-in and call the Yeti API at each stage.
Your server Yeti API
│ │
│── GET /v1/ecom/config ────────────►│
│◄── { clientToken } ───────────────│
│ │
│── POST /v1/ecom/{siteId}/ │
│ payment-methods ────────────────►│
│◄── available methods ──────────────│
│ │
▼ │
Show Adyen Components on your page │
│
Customer fills in their details │
│ │
│─ ─ POST /v1/ecom/{siteId}/payments ►│
│◄── PaymentResponse ───────────────│
│ │
│ (if 3DS is needed) │
│── POST /v1/ecom/{siteId}/ │
│ payments/details ───────────────►│
│◄── Final result ──────────────────│
│ │
│◄── Webhook (async) ───────────────│
You'll use: GET /config, POST /payment-methods, POST /payments, and POST /payments/details
After the payment
Once a payment's been authorised, you might need to capture it, reverse it, or change the amount. Here's what's available:
| What you want to do | Endpoint | When you'd use it |
|---|---|---|
| Capture | POST /{siteId}/payments/{pspReference}/captures | You're using manual capture and want to take the money now (like when an order ships) |
| Reverse | POST /{siteId}/payments/{pspReference}/reversals | You need to cancel or refund -- the API works out which one for you |
| Update amount | POST /{siteId}/payments/{pspReference}/amount-updates | The final amount has changed (like a hotel booking or order edit) |
Getting started
Here's what you need to do:
- Get an API key from Basecamp. More on this in Authentication.
- Grab your client token by calling
GET /v1/ecom/configfrom your server. - Set up Adyen Drop-in on your frontend using that client token. Adyen's guide will walk you through this.
- Create a session with
POST /v1/ecom/{siteId}/sessionsand pass the result to the Drop-in. - Listen for webhooks to know when payments are finalised. See Webhooks.
- Use Adyen test cards to exercise your flows end-to-end. See Test Cards for commonly used card numbers and scenarios.
All the endpoints
| Method | Endpoint | What it does |
|---|---|---|
| GET | /v1/ecom/config | Gets the client token for your frontend |
| POST | /v1/ecom/{siteId}/sessions | Creates a checkout session |
| POST | /v1/ecom/{siteId}/payment-methods | Gets available payment methods for a site |
| POST | /v1/ecom/{siteId}/payments | Starts a payment |
| POST | /v1/ecom/{siteId}/payments/details | Sends extra details (like 3DS results) |
| POST | /v1/ecom/{siteId}/payments/{pspReference}/captures | Captures an authorised payment |
| POST | /v1/ecom/{siteId}/payments/{pspReference}/reversals | Refunds or cancels a payment |
| POST | /v1/ecom/{siteId}/payments/{pspReference}/amount-updates | Changes the authorised amount |
Adyen resources
Since you'll be using Adyen's frontend libraries, you'll probably find these handy:
- Adyen Web Drop-in -- the recommended way to add a payment form
- Adyen Web Components -- for when you want more control
- Adyen test cards -- card numbers you can use in the test environment