Skip to main content

Sign Request API

HTTP Request​

POST /v5/pay/agreement/sign

Create a sign request to initiate the agreement signing process. Returns a QR code and URL for the user to scan and complete authorization.


Request Parameters​

ParameterTypeRequiredDescription
merchantIdstringYesMerchant ID
agreementTypestringYesSign type: CYCLE (periodic deduction) / NON_CYCLE (non-periodic deduction) / SINGLE (single authorization)
sceneCodestringYesScene code - Supports 17 scenarios including TAXI, PARKING, SUBSCRIPTION, FOOD, ENTERTAINMENT, EDUCATION, etc.
productCodestringYesProduct code (assigned by platform)
externalAgreementNostringYesMerchant agreement number (unique)
notifyUrlstringYesSign result webhook URL
merchantUserIdstringNoMerchant-side user ID (optional, used for merchant internal user association. If not provided, agreement will only be bound to platform userId)
signValidTimestringNoSign validity period (ISO8601 format, must be at least 24 hours after current time)
singleLimitobjectNoSingle transaction limit
singleLimit.amountstringConditionalLimit amount (required if singleLimit provided)
singleLimit.currencystringConditionalCurrency code
singleLimit.currencyTypestringConditionalFIAT or CRYPTO
singleLimit.chainstringNoChain network (for crypto, e.g., BSC, TRX, ARBI, LTC, SOL, ETH, TON, APTOS)
singleLimit.chainAddressstringNoChain address (required in dynamic chain settlement mode)
periodLimitsarrayNoPeriod limit configuration list
periodLimits[].periodTypestringConditionalDAY / WEEK / MONTH / YEAR
periodLimits[].amountstringConditionalPeriod limit amount
periodLimits[].currencystringConditionalCurrency code
periodLimits[].currencyTypestringConditionalFIAT or CRYPTO
periodLimits[].chainstringNoChain network (e.g., BSC, TRX, ARBI, LTC, SOL, ETH, TON, APTOS)
periodLimits[].chainAddressstringNoChain address (required in dynamic chain settlement mode)
returnUrlstringNoRedirect URL after sign completion
signExpireMinutesintNoSign link validity (minutes), default 30, max 1440
extraParamsstringNoExtension parameters (JSON string, passed through)

Response Parameters​

ParameterTypeDescription
retCodeintResponse code
retMsgstringResponse message
resultobjectResponse data
result.signOrderIdstringPlatform sign order number
result.signUrlstringSign page URL (for H5 redirect)
result.qrCodestringSign QR code content (for App scan)
result.qrCodeUrlstringSign QR code image URL
result.expireTimestringSign link expiration time

Request Example​

Basic Sign Request​

POST /v5/pay/agreement/sign HTTP/1.1
Host: api.bybit.com
Content-Type: application/json
X-Request-Id: 550e8400-e29b-41d4-a716-446655440000
X-Timestamp: 1736233200000
X-Signature: {signature}
Authorization: Bearer {access_token}

{
"merchantId": "M123456789",
"agreementType": "CYCLE",
"merchantUserId": "merchant_user_123",
"sceneCode": "SUBSCRIPTION",
"externalAgreementNo": "MERCHANT_AGR_001",
"notifyUrl": "https://merchant.com/notify/sign"
}

Sign Request with Limits​

POST /v5/pay/agreement/sign HTTP/1.1
Host: api.bybit.com
Content-Type: application/json
X-Request-Id: 550e8400-e29b-41d4-a716-446655440000
X-Timestamp: 1736233200000
X-Signature: {signature}
Authorization: Bearer {access_token}

{
"merchantId": "M123456789",
"agreementType": "CYCLE",
"merchantUserId": "merchant_user_123",
"sceneCode": "SUBSCRIPTION",
"productCode": "PROD_001",
"externalAgreementNo": "MERCHANT_AGR_002",
"signValidTime": "2027-12-31T23:59:59Z",
"singleLimit": {
"amount": "100000",
"currency": "USDT",
"currencyType": "CRYPTO",
"chain": "TRC20"
},
"periodLimits": [
{
"periodType": "DAY",
"amount": "500000",
"currency": "USDT",
"currencyType": "CRYPTO",
"chain": "TRC20"
},
{
"periodType": "MONTH",
"amount": "5000000",
"currency": "USDT",
"currencyType": "CRYPTO",
"chain": "TRC20"
}
],
"notifyUrl": "https://merchant.com/notify/sign",
"returnUrl": "https://merchant.com/return",
"signExpireMinutes": 60
}

Response Example​

Success Response​

{
"retCode": 20000,
"retMsg": "Success",
"result": {
"signOrderId": "AGR202601070001",
"signUrl": "https://pay.bybit.com/sign?token=xxx",
"qrCode": "https://pay.bybit.com/sign?token=xxx",
"qrCodeUrl": "https://pay.bybit.com/qr/AGR202601070001.png",
"expireTime": "2026-01-07T11:30:00Z"
}
}

Failure Response​

{
"retCode": 40001,
"retMsg": "Parameter error: externalAgreementNo already exists",
"result": null
}

Sign Types​

TypeDescriptionUse Case
CYCLEPeriodic deductionSubscriptions, recurring payments
NON_CYCLENon-periodic deductionOn-demand payments (e.g., ride-hailing, parking)
SINGLESingle authorizationOne-time pre-authorization

Notes​

  1. User Identity Mapping: merchantUserId is optional and can be used to establish mapping between merchant's user system and Bybit platform. If not provided, agreement will only be bound to platform userId
  2. Limit Configuration: If not provided, platform default limits apply
  3. Sign Expiration: Default 30 minutes, can be extended up to 24 hours
  4. Idempotency: Same externalAgreementNo returns existing sign request result