Unsign API
HTTP Request
POST /v5/bybitpay/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 |
|---|---|---|---|
| merchant_id | string | Yes | Merchant ID |
| user_id | string | Yes | Platform user ID |
| agreement_type | string | Yes | Sign type: CYCLE / NON_CYCLE / SINGLE |
| agreement_no | string | Either | Platform agreement number |
| external_agreement_no | string | Either | Merchant agreement number |
| unsign_type | string | No | Unsign type: USER / MERCHANT / SYSTEM |
| unsign_reason | string | No | Unsign reason |
info
Either agreement_no or external_agreement_no must be provided.
Response Parameters
| Parameter | Type | Description |
|---|---|---|
| retCode | int | Response code |
| retMsg | string | Response message |
| result | object | Response data |
| result.agreement_no | string | Platform agreement number |
| result.status | string | Status: UNSIGNED |
| result.unsign_time | string | Unsign time |
Request Example
Unsign by Agreement Number
POST /v5/bybitpay/agreement/unsign HTTP/1.1
Host: api2.bybit.com
Content-Type: application/json
X-BAPI-API-KEY: xxxxxxxxxxxxxxxxxx
X-BAPI-TIMESTAMP: 1736233200000
X-BAPI-SIGN: {signature}
X-BAPI-RECV-WINDOW: 5000
{
"merchant_id": "M123456789",
"user_id": "U_123456789",
"agreement_type": "CYCLE",
"agreement_no": "AGR202601070001",
"unsign_type": "USER",
"unsign_reason": "User cancelled subscription"
}
Unsign by External Agreement Number
POST /v5/bybitpay/agreement/unsign HTTP/1.1
Host: api2.bybit.com
Content-Type: application/json
X-BAPI-API-KEY: xxxxxxxxxxxxxxxxxx
X-BAPI-TIMESTAMP: 1736233200000
X-BAPI-SIGN: {signature}
X-BAPI-RECV-WINDOW: 5000
{
"merchant_id": "M123456789",
"user_id": "U_123456789",
"agreement_type": "CYCLE",
"external_agreement_no": "MERCHANT_AGR_001",
"unsign_type": "MERCHANT",
"unsign_reason": "Service terminated"
}
Response Examples
Success Response
{
"retCode": 20000,
"retMsg": "Success",
"result": {
"agreement_no": "AGR202601070001",
"status": "UNSIGNED",
"unsign_time": "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