Skip to content

Checkout API

The Pyng Checkout API is designed to provide a reliable platform for online and retail financial transactions.

Overview

This section currently contains two checkout models:

  • the QR code payment flow
  • the draft Checkout Session API for Pay with Pyng

QR Code Payment Flow

The Checkout API supports QR code payment flows. In this model, the partner presents a QR code to the customer and later checks or receives the final transaction status.

Flow

sequenceDiagram
    autonumber
    participant P as Partner
    participant C as Customer
    participant A as Pyng App
    participant API as Pyng Checkout API

    P->>API: Create payment intent
    API-->>P: Payment intent + QR payload
    P-->>C: Display QR code
    C->>A: Scan QR code
    A->>API: Validate and process payment
    A-->>C: Show payment result
    P->>API: Pull transaction status or receive webhook
    API-->>P: Final transaction status

Draft Checkout Session API

The draft Checkout Session API is designed for the proposed Pay with Pyng flow. In this model, the partner creates a Checkout Session and opens a Pyng Launch URL. Pyng then manages the customer journey through Hosted Checkout, including agreement handling, payment, and return to the partner.

Warning

The Checkout Session documentation is draft only and may change before public release.

Draft Flow

sequenceDiagram
    autonumber
    participant P as Partner Backend
    participant W as Partner Website
    participant C as Customer
    participant H as Pyng Hosted Checkout
    participant B as Customer Bank App
    participant API as Pyng Checkout API

    P->>API: Create Checkout Session
    API-->>P: checkoutSessionId + launchUrl
    P-->>W: launchUrl
    C->>W: Click "Pay with Pyng"
    W->>H: Open launchUrl

    alt Agreement is already active
        H->>API: Start payment
        API-->>H: Payment completed
    else Agreement must be created or approved
        H-->>C: Show agreement instructions
        C->>B: Approve agreement in bank app
        H->>API: Poll agreement status
        API-->>H: Agreement active
        H->>API: Start payment
        API-->>H: Payment completed
    end

    H-->>C: Show result
    H-->>W: Return to partner
    P->>API: Poll session status or receive webhook
    API-->>P: Final checkout status

URLs

Sandbox - https://sample.pyng.com.au

Production - https://app.pyng.com.au