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
| Parameter | Type | Required | Description |
|---|---|---|---|
| merchantId | string | Yes | Merchant ID |
| userId | string | Yes | Platform user ID |
| agreementType | string | Yes | Sign type: CYCLE / NON_CYCLE / SINGLE |
| agreementNo | string | Either | Platform agreement number |
| externalAgreementNo | string | Either | Merchant agreement number |
| unsignType | string | No | Unsign type: USER / MERCHANT / SYSTEM |
| unsignReason | string | No | Unsign reason |
信息
Either agreementNo or externalAgreementNo must be provided.
Response Parameters
| Parameter | Type | Description |
|---|---|---|
| retCode | int | Response code |
| retMsg | string | Response message |
| result | object | Response data |
| result.agreementNo | string | Platform agreement number |
| result.status | string | Status: UNSIGNED |
| result.unsignTime | string | Unsign 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
| Type | Description |
|---|---|
USER | User initiated unsign |
MERCHANT | Merchant initiated unsign |
SYSTEM | System unsign (risk, account abnormal) |
Notes
- Final State: Unsigned is a final state; agreement cannot be reactivated
- Refund Allowed: Existing successful transactions can still be refunded after unsign
- Allowed States: Only
SIGNEDandSUSPENDEDagreements can be unsigned - Webhook Notification: Platform sends unsign notification to merchant after unsign