API Reference

Overview

Complete reference for Super Qi Mini Program APIs, flows, and integration guides.

Overview

This section contains the complete API reference documentation for building Super Qi Mini Programs. Here you'll find detailed guides on authentication flows, payment integration, backend APIs, and client-side JavaScript APIs.

Documentation Sections

The API Reference is organized into three main sections to help you quickly find what you need:

Flows

End-to-end integration guides that walk you through complete user journeys and workflows.

What it contains:

  • Step-by-step flow diagrams
  • Complete authentication and payment workflows
  • Request/response examples
  • Integration best practices

When to use:

  • Understanding how different APIs work together
  • Implementing user authentication
  • Setting up payment flows (cashier or agreement)
  • Learning the complete integration process

Available Flows Examples:


Open APIs

Backend-to-backend HTTP APIs called from your merchant server to the Super Qi backend.

What it contains:

  • REST API endpoints
  • Request/response structures
  • Authentication and signature requirements
  • Error codes and handling

When to use:

  • Exchanging authorization codes for tokens
  • Creating payment orders
  • Querying payment status
  • Processing refunds
  • Any server-side operations

Key Characteristics:

  • Called from merchant backend
  • Requires digital signature authentication
  • Uses POST method with JSON payloads
  • Backend-to-backend communication

Available Categories:


JSAPIs

Client-side JavaScript APIs called from your Mini Program to access platform features.

What it contains:

  • JavaScript function references
  • SDK integration guide
  • Callback and promise patterns

When to use:

  • Requesting user authorization in the Mini Program
  • Launching the payment cashier
  • Signing agreement contracts
  • Accessing device features
  • Making HTTP requests from the client
  • Displaying UI elements (alerts, toasts)

Key Characteristics:

  • Called from Mini Program client (front-end)
  • Uses JavaScript with callbacks/promises
  • Requires JSBridge SDK integration
  • Direct user interaction

Available Categories:

  • Essential APIs - Authentication and payment APIs
  • UI, Network, Storage, Device, Location, and Media APIs

Quick Decision Guide

Need to authenticate a user?

  1. Start with the Authentication Flow
  2. Use my.getAuthCode JSAPI in your Mini Program
  3. Call applyToken Open API from your backend

Need to process a payment?

  1. Start with the Cashier Payment Flow
  2. Call pay Open API from your backend
  3. Use my.tradePay JSAPI to launch the cashier

Need recurring payments?

  1. Start with the Agreement Payment Flow
  2. Use prepare and qicardSignContract
  3. Call pay with agreement parameters