Skip to main content

Create Payment

HTTP Request​

POST /v5/bybitpay/create_pay

E-Commerce Request​

Request Parameters​

ParameterRequiredTypeComments
merchantIdtruestringOnboarding merchant UID
merchantNamefalsestringIf not filled in, we will show users the name of your company doing KYB on the Bybit platform
clientIdfalsestringMerchant client ID
paymentTypetruestringPayment type
customerfalse<CustomerType>Customer info
merchantTradeNotruestringMerchant order number
quotationIdfalsestringReturn result quotationId to create order
goodstruearray<GoodType>Product description
orderAmounttruestringOrder amount
currencytruestringOrder currency (uppercase, e.g., EUR, USD, USDT)
currencyTypetruestringCurrency type (fiat or crypto)
successUrltruestringURL to return after successful payment (max 256 characters)
failedUrltruestringURL to return after failed payment (max 256 characters)
webhookUrltruestringAPI URL to call when order is successful or failed (max 256 characters)
orderExpireTimefalseint64Order expiration time in UTC timestamp (second precision), default is 1 hour, max is 1 hour
envtrue<EnvType>Transaction source
riskInfofalse<RiskInfoType>Risk info for order pay
remarkfalsestringPayment remark, max 50 characters
chainAddressfalsestringChain address
chainTypefalsestringThe receiver's chain type (BSC/TRX/ARBI/LTC/SOL/ETH/TON/APTOS)

Request Example​

POST /v5/bybitpay/create_pay HTTP/1.1
Host: api2.bybit.com
X-BAPI-SIGN: XXXXX
X-BAPI-API-KEY: xxxxxxxxxxxxxxxxxx
X-BAPI-TIMESTAMP: 1736233200000
X-BAPI-RECV-WINDOW: 5000
Content-Type: application/json

{
"merchantId": "305142568",
"merchantName": "Digital Store",
"clientId": "client_001",
"paymentType": "E_COMMERCE",
"merchantTradeNo": "af8c2d1-5b3e-4a9f-b6c7-8d2e1f3a4b5c",
"orderAmount": "100",
"currency": "USDT",
"currencyType": "crypto",
"successUrl": "https://www.merchant.com/success",
"failedUrl": "https://www.merchant.com/failed",
"webhookUrl": "https://www.merchant.com/webhook/bybitpay",
"orderExpireTime": 1736236800,
"remark": "Order for digital goods",
"customer": {
"externalUserId": "user123@merchant.com",
"userName": "John Doe",
"registerTime": 1704067200,
"kycCountry": "USA",
"remarks": "VIP customer"
},
"goods": [
{
"shoppingName": "Digital Store",
"mccCode": "5816",
"goodsName": "Premium Subscription",
"goodsDetail": "Monthly subscription for premium features"
}
],
"env": {
"terminalType": "WEB",
"device": "Mozilla/5.0 compatible browser",
"browserVersion": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/133.0.0.0 Safari/537.36",
"ip": "192.168.1.100"
},
"riskInfo": {
"terminalType": "WEB"
},
"chainAddress": "",
"chainType": ""
}

Auth Request​

Auth reuses the Payment Creation endpoint. Set paymentType to E_COMMERCE and use paymentMethod = AUTH to distinguish this scenario from the existing E-Commerce Payment flow. Fields not listed below follow the common Payment Creation definition above.

Field NameTypeRequiredDescription
paymentTypestringYesMust be E_COMMERCE.
paymentMethodstringYesMust be AUTH.
orderAmountstringYesMust be exactly 0. Auth does not initiate a payment or asset transfer.
goodsarray<Good Type>NoOptional for Auth. If provided, each item follows the existing validation rules.
envEnv TypeYesTransaction Source. The validation rules are the same as the existing E-Commerce Payment flow.
riskInfoRiskInfoNoRisk info for order pay
customerCustomer TypeNoCustomer info
quotationIdstringNoNot used in current use case
chainAddressstringNoNot used in current use case
chainTypestringNoNot used in current use case

orderExpireTime is the authorization confirmation deadline. It remains a UTC Unix timestamp in seconds, defaults to one hour, and cannot exceed one hour from order creation.

Request demo​

{
"merchantId": "305142568",
"merchantName": "Example Merchant",
"merchantTradeNo": "auth-20261005-000001",
"paymentType": "E_COMMERCE",
"paymentMethod": "AUTH",
"orderAmount": "0",
"currency": "USDT",
"currencyType": "crypto",
"successUrl": "https://merchant.example.com/auth/success",
"failedUrl": "https://merchant.example.com/auth/failed",
"webhookUrl": "https://merchant.example.com/webhook/bybitpay",
"orderExpireTime": 1791180000,
"env": {
"browserVersion": "Mozilla/5.0",
"device": "merchant-device-id",
"ip": "127.0.0.1",
"terminalType": "APP"
}
}

Common Response​

The response structure is shared by E-Commerce and Auth. For Auth, result.order.amount is 0 and result.order.authStatus is initially PENDING.

Response Parameters​

ParameterTypeComments
payIdstringPay-order ID created successfully
terminalTypestringTransaction source (APP, WEB, WAP, MINIAPP, OTHERS)
expireTimenumberOrder expiration time in UTC timestamp (second precision)
checkoutLinkstringUnified checkout link in Bybit, redirect for payment
qrContentstringQR code content (base64 Image, valid for 1 hour), developers generate QR image
order<PayOrderType>Bybit pay order detail
customer<CustomerType>Customer info

Response Example​

{
"retCode": 100000,
"retMsg": "success",
"result": {
"payId": "01JY2KM5QNPXR8S4HTJZT9BC12",
"terminalType": "WEB",
"expireTime": 1736236800,
"checkoutLink": "bybitapp://open/route?targetUrl=by-mini%3A%2F%2Fpay%2FscanResult%3ForderNo%3D01JY2KM5QNPXR8S4HTJZT9BC12",
"qrContent": "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAZAAAAGQCAIAAAAP3aGbAAC...",
"order": {
"merchantId": "305142568",
"clientId": "client_001",
"paymentType": "E_COMMERCE",
"merchantTradeNo": "af8c2d1-5b3e-4a9f-b6c7-8d2e1f3a4b5c",
"payId": "01JY2KM5QNPXR8S4HTJZT9BC12",
"status": "INIT",
"amount": "100",
"currency": "USDT",
"currencyType": "crypto",
"createTime": 1736233200,
"paymentTime": 0,
"finishTime": 0,
"refundOrders": [],
"remark": "Order for digital goods",
"chainAddress": "",
"chainType": ""
},
"customer": {
"uid": "104326789",
"externalUserId": "user123@merchant.com",
"userName": "John Doe",
"registerTime": 1704067200,
"kycCountry": "USA",
"remarks": "VIP customer"
}
}
}