This API allows you to generate a payment link, capture a payment (in full or in part), cancel a link, and read the current state of a checkout. You create a link for an order, redirect your customer to Yavin's secure checkout to pay by bank card (including American Express, with 3-D Secure and co-badge selection handled for you) or by meal voucher (Conecs, Swile, Edenred), and you are notified of the result by webhook.
<aside> 💡
Field naming is flexible on input: the API accepts both camelCase and snake_case keys (checkoutExternalId and checkout_external_id both work). Responses use snake_case, with one exception: the query parameters appended to your return_url_success and return_url_cancelled URLs stay camelCase (cartId, status) to avoid breaking existing integrations.
</aside>
<aside> 🆕
This documentation covers v5, the current version. New integrations should use checkout_external_id (the deprecated cart_id is kept only as a backwards-compatible alias) and send order_number.
</aside>
Payment Link lifetime
<aside>
💡 If a payment is still required after a link has been canceled, a new payment link must be generated through the /generate_link/ endpoint.
</aside>
Checkout Status
There is no notion of a 'failed' status. Here's a breakdown of the possible statuses:
pending: Awaiting payment.ok: Successfully paid and captured.authorised: Paid but contains one or more authorised transactions that require capturing.ko: The checkout has been cancelled.Amount
amount on a checkout is 100 (€1.00).Checkout Representation
checkout is used, it is referring to a payment request initiated by the /generate_link/ endpoint.