Skip to main content

Guide

Business Scenarios

Bybit Pay provides two main payment integration methods for merchants:

ScenarioDescriptionUse Case
QR PaymentQR code based payment where users scan to payE-commerce checkout, retail POS, one-time payments
Recurring PaymentsPre-authorized automatic deduction paymentSubscriptions, ride-hailing, recurring payments, utility bills

QR Payment Flow

User scans merchant's QR code and completes payment through Bybit App.

┌──────────────┐     ┌──────────────┐     ┌──────────────┐     ┌──────────────┐
│ Merchant │ │ Bybit │ │ Bybit App │ │ User │
│ Server │ │ Platform │ │ │ │ │
└──────┬───────┘ └──────┬───────┘ └──────┬───────┘ └──────┬───────┘
│ │ │ │
│ 1. Create Payment │ │ │
│ ─────────────────→ │ │ │
│ │ │ │
│ 2. Return QR Code │ │ │
│ ←───────────────── │ │ │
│ │ │ │
│ Display QR │ │ 3. Scan QR │
│ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─│─ ─ ─ ─ ─ ─ ─ ─ ─ →│← ─ ─ ─ ─ ─ ─ ─ ─ │
│ │ │ │
│ │ │ 4. Confirm Payment │
│ │ │ ←─────────────────→│
│ │ │ │
│ │ 5. Deduct │ │
│ │ ←──────────────────│ │
│ │ │ │
│ 6. Webhook Notify │ │ │
│ ←───────────────── │ │ │
│ │ │ │
▼ ▼ ▼ ▼

Key Features:

  • One-time payment authorization
  • Real-time payment result notification
  • Support for crypto and fiat currencies
  • Refund capability

Recurring Payments Flow

User pre-authorizes merchant for automatic deductions without manual confirmation each time.

Sign Flow (One-time Setup)

┌──────────────┐     ┌──────────────┐     ┌──────────────┐     ┌──────────────┐
│ Merchant │ │ Bybit │ │ Bybit App │ │ User │
│ Server │ │ Platform │ │ │ │ │
└──────┬───────┘ └──────┬───────┘ └──────┬───────┘ └──────┬───────┘
│ │ │ │
│ 1. Sign Request │ │ │
│ ─────────────────→ │ │ │
│ │ │ │
│ 2. Return Sign URL │ │ │
│ ←───────────────── │ │ │
│ │ │ │
│ Display QR │ │ 3. Scan QR │
│ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─│─ ─ ─ ─ ─ ─ ─ ─ ─ →│← ─ ─ ─ ─ ─ ─ ─ ─ │
│ │ │ │
│ │ │ 4. Identity Verify │
│ │ │ ←─────────────────→│
│ │ │ │
│ │ │ 5. Confirm Sign │
│ │ │ ←─────────────────→│
│ │ │ │
│ 6. Sign Webhook │ │ │
│ (agreement_no) │ │ │
│ ←───────────────── │ │ │
│ │ │ │
▼ ▼ ▼ ▼

Deduction Flow (Automatic Payment)

┌──────────────┐     ┌──────────────┐     ┌──────────────┐
│ Merchant │ │ Bybit │ │ User │
│ Server │ │ Platform │ │ (Passive) │
└──────┬───────┘ └──────┬───────┘ └──────┬───────┘
│ │ │
│ 1. Deduction │ │
│ (agreement_no) │ │
│ ─────────────────→ │ │
│ │ │
│ │ 2. Verify: │
│ │ - Agreement valid │
│ │ - Limit check │
│ │ - Risk check │
│ │ - Balance check │
│ │ │
│ │ 3. Auto Deduct │
│ │ ──────────────────→│
│ │ │
│ 4. Result + Webhook│ │
│ ←───────────────── │ │
│ │ │
│ │ 5. Notification │
│ │ ──────────────────→│
│ │ │
▼ ▼ ▼

Key Features:

  • Pre-authorized automatic payments
  • No user confirmation required per transaction
  • Single and period limit controls
  • Support for subscriptions, ride-hailing, utilities
  • Agreement lifecycle management (sign, suspend, resume, unsign)

Base URL

EnvironmentBase URL
Testnet (Sandbox)https://api2-testnet.bybit.com
Mainnet (Production)https://api2.bybit.com

Common Response Structure

{
"retCode": 100000,
"retMsg": "success",
"result": {
// Response data
}
}
FieldTypeDescription
retCodenumberReturn code. 100000 indicates success
retMsgstringReturn message
resultobjectBusiness data

Getting Started

Choose the integration method based on your business needs: