跳至主要内容

Unsign API

HTTP Request​

POST /v5/pay/agreement/unsign

Terminate an active agreement. After unsign, no further deductions can be made. Existing successful transactions can still be refunded.


Request Parameters​

ParameterTypeRequiredDescription
merchantIdstringYesMerchant ID
userIdstringYesPlatform user ID
agreementTypestringYesSign type: CYCLE / NON_CYCLE / SINGLE
agreementNostringEitherPlatform agreement number
externalAgreementNostringEitherMerchant agreement number
unsignTypestringNoUnsign type: USER / MERCHANT / SYSTEM
unsignReasonstringNoUnsign reason
信息

Either agreementNo or externalAgreementNo must be provided.


Response Parameters​

ParameterTypeDescription
retCodeintResponse code
retMsgstringResponse message
resultobjectResponse data
result.agreementNostringPlatform agreement number
result.statusstringStatus: UNSIGNED
result.unsignTimestringUnsign time

Request Example​

Unsign by Agreement Number​

POST /v5/pay/agreement/unsign 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",
"userId": "U_123456789",
"agreementType": "CYCLE",
"agreementNo": "AGR202601070001",
"unsignType": "USER",
"unsignReason": "User cancelled subscription"
}

Unsign by External Agreement Number​

POST /v5/pay/agreement/unsign 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",
"userId": "U_123456789",
"agreementType": "CYCLE",
"externalAgreementNo": "MERCHANT_AGR_001",
"unsignType": "MERCHANT",
"unsignReason": "Service terminated"
}

Response Examples​

Success Response​

{
"retCode": 20000,
"retMsg": "Success",
"result": {
"agreementNo": "AGR202601070001",
"status": "UNSIGNED",
"unsignTime": "2026-01-07T15:30:00Z"
}
}

Agreement Not Exist​

{
"retCode": 40003,
"retMsg": "Agreement does not exist",
"result": null
}

Agreement Already Unsigned​

{
"retCode": 40004,
"retMsg": "Agreement already unsigned, no need to repeat",
"result": null
}

Unsign Types​

TypeDescription
USERUser initiated unsign
MERCHANTMerchant initiated unsign
SYSTEMSystem unsign (risk, account abnormal)

Notes​

  1. Final State: Unsigned is a final state; agreement cannot be reactivated
  2. Refund Allowed: Existing successful transactions can still be refunded after unsign
  3. Allowed States: Only SIGNED and SUSPENDED agreements can be unsigned
  4. Webhook Notification: Platform sends unsign notification to merchant after unsign