Yoco Checkout API

Create and manage hosted checkout sessions.

Operations 2

POST /checkouts Create a checkout #
GET /checkouts/{checkoutId} Get a checkout #

Work with this as data

Every API here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for apis

7 MCP tools reach this
  • find_apisBrowse and filter every API in the catalog.
  • get_api_artifactsOne API's artifacts, grouped by type.
  • get_openapiThe primary OpenAPI for this API.
  • find_similar_apisAPIs that look like this one.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools →

Call it yourself

curl for this page
This API
curl "https://apis.io/api/v1/apis/yoco-checkout-api"
All apis
curl "https://apis.io/api/v1/apis?limit=25"

Discovery needs no key. Ratings and market analysis are Pro.

Get an API key

Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. See our Privacy Policy and Terms.

A second provider on the same verified email joins the account you already have.

OpenAPI Specification

yoco-checkout-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: Yoco Online Payments Checkout API
  version: '2026-07-12'
  description: Hand-authored OpenAPI for Yoco's online payments platform, grounded in the public Yoco developer hub (developer.yoco.com).
  contact:
    name: Yoco Developers
    url: https://developer.yoco.com
  x-provider: Yoco
  x-authored-by: API Evangelist
servers:
- url: https://payments.yoco.com/api
  description: Checkout API (secret-key Bearer auth)
tags:
- name: Checkout
  description: Create and manage hosted checkout sessions.
paths:
  /checkouts:
    post:
      operationId: createCheckout
      summary: Create a checkout
      description: Creates a hosted checkout session and returns a redirectUrl to send the customer to. Call this server-side to protect your secret key. Confirm the final outcome via the payment.succeeded webhook, not the successUrl.
      tags:
      - Checkout
      security:
      - secretKey: []
      parameters:
      - $ref: '#/components/parameters/IdempotencyKey'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CheckoutRequest'
      responses:
        '200':
          description: Checkout created.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Checkout'
        '400':
          $ref: '#/components/responses/Error'
        '401':
          $ref: '#/components/responses/Error'
  /checkouts/{checkoutId}:
    get:
      operationId: getCheckout
      summary: Get a checkout
      description: Retrieve a checkout session by its identifier.
      tags:
      - Checkout
      x-status: modeled
      security:
      - secretKey: []
      parameters:
      - $ref: '#/components/parameters/CheckoutId'
      responses:
        '200':
          description: Checkout found.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Checkout'
        '404':
          $ref: '#/components/responses/Error'
components:
  schemas:
    CheckoutRequest:
      type: object
      required:
      - amount
      - currency
      properties:
        amount:
          type: integer
          description: Amount to charge, in the currency's minor unit (cents).
        currency:
          type: string
          description: Three-letter ISO 4217 currency code (e.g. ZAR).
        cancelUrl:
          type: string
          format: uri
        successUrl:
          type: string
          format: uri
        failureUrl:
          type: string
          format: uri
        metadata:
          type: object
          additionalProperties: true
        totalTaxAmount:
          type: integer
          description: Display-only total tax, in cents.
        totalDiscount:
          type: integer
          description: Display-only total discount, in cents.
        lineItems:
          type: array
          description: Display-only line items.
          items:
            $ref: '#/components/schemas/LineItem'
    Error:
      type: object
      properties:
        errorType:
          type: string
        errorCode:
          type: string
        description:
          type: string
    LineItem:
      type: object
      properties:
        displayName:
          type: string
        quantity:
          type: integer
        pricingDetails:
          type: object
          additionalProperties: true
    Checkout:
      type: object
      properties:
        id:
          type: string
        status:
          type: string
          description: e.g. created, started, processing, completed.
        amount:
          type: integer
        currency:
          type: string
        redirectUrl:
          type: string
          format: uri
        paymentId:
          type: string
        successUrl:
          type: string
          format: uri
        cancelUrl:
          type: string
          format: uri
        failureUrl:
          type: string
          format: uri
        metadata:
          type: object
          additionalProperties: true
        merchantId:
          type: string
        totalDiscount:
          type: integer
        totalTaxAmount:
          type: integer
        subtotalAmount:
          type: integer
        processingMode:
          type: string
        externalId:
          type: string
  parameters:
    CheckoutId:
      name: checkoutId
      in: path
      required: true
      schema:
        type: string
    IdempotencyKey:
      name: Idempotency-Key
      in: header
      required: false
      description: Optional idempotency key to prevent duplicate creation.
      schema:
        type: string
  responses:
    Error:
      description: Error response.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
  securitySchemes:
    secretKey:
      type: http
      scheme: bearer
      description: 'Secret integration key passed as `Authorization: Bearer sk_live_...` (live) or `Authorization: Bearer sk_test_...` (test). Obtain keys in the Yoco app under Sales -> Payment Gateway. Use server-side only.'
    jwtBearer:
      type: http
      scheme: bearer
      bearerFormat: JWT
      description: JWT Bearer credential for the versioned Yoco API (api.yoco.com/v1), authorized with scopes such as business/orders:read.