跳至主要内容

Query Agreement API

HTTP Request​

GET /v5/pay/agreement/query

Query single agreement status and details.


Request Parameters​

ParameterTypeRequiredDescription
merchantIdstringYesMerchant ID
agreementNostringEitherPlatform agreement number
externalAgreementNostringEitherMerchant agreement number
信息

Either agreementNo or externalAgreementNo must be provided.


Response Parameters​

ParameterTypeDescription
retCodeintResponse code
retMsgstringResponse message
resultobjectResponse data
result.agreementNostringPlatform agreement number
result.externalAgreementNostringMerchant agreement number
result.userIdstringPlatform user ID
result.merchantUserIdstringMerchant-side user ID
result.statusstringStatus: INIT/PENDING/SIGNED/SUSPENDED/UNSIGNED/EXPIRED/REJECTED/FAILED/TIMEOUT
result.signTimestringSign time
result.validTimestringValidity period
result.singleLimitobjectSingle transaction limit
result.periodLimitsarrayPeriod limits list
result.usedQuotaobjectUsed quota

Request Example​

GET /v5/pay/agreement/query?merchantId=M123456789&agreementNo=AGR202601070001 HTTP/1.1
Host: api.bybit.com
X-Request-Id: 550e8400-e29b-41d4-a716-446655440000
X-Timestamp: 1736233200000
X-Signature: {signature}
Authorization: Bearer {access_token}

Response Example​

{
"retCode": 20000,
"retMsg": "Success",
"result": {
"agreementNo": "AGR202601070001",
"externalAgreementNo": "MERCHANT_AGR_001",
"userId": "U_123456789",
"merchantUserId": "merchant_user_123",
"status": "SIGNED",
"signTime": "2026-01-07T10:30:00Z",
"validTime": "2027-01-07T10:30:00Z",
"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"
}
],
"usedQuota": {
"dayUsed": "50000",
"monthUsed": "150000",
"currency": "USDT",
"currencyType": "CRYPTO"
}
}
}

Agreement Status​

StatusDescriptionDeduction Allowed
INITWaiting for user scanNo
PENDINGUser scanned, verification in progressNo
SIGNEDAgreement activeYes
SUSPENDEDTemporarily pausedNo
UNSIGNEDTerminatedNo
EXPIREDExpiredNo
REJECTEDUser actively canceled signingNo
FAILEDSign failedNo
TIMEOUTSign link expiredNo

Notes​

  • Use this API to check agreement status before deduction
  • usedQuota shows current period usage (resets based on period type)
  • All states support query operation