Integration GuideAPI Reference
Integration Guide

"ByBit" Payment Method

Payment Method Definition

📓

displayedPaymentMethods

Set paymentIntent.formDetails.displayedPaymentMethods to ["BYBIT_PAY"] to offer Bybit Pay on the Carusell Hosted Checkout form. Bybit Pay must be enabled for Hosted Checkout on your settlement account.

When Bybit Pay is the only available method in the session, the payer proceeds directly to its payment flow. If multiple methods are available, the payer can choose a method on the form.

Use the exact Checkout method code BYBIT_PAY in this array.

Payment Method Features

FeatureDescription
Payment methodBybit Pay
IntegrationHosted Checkout
Checkout method codeBYBIT_PAY
PaymentsQR payment confirmed by the payer in Bybit.
RefundsRefunds of successfully captured payments through the platform Refund API.
Payment confirmationPlatform payment status received through a webhook or retrieved through the API.
Currencies and limitsUse the currencies and transaction limits enabled for your integration.

Workflow

  1. Create an Intent with useCheckoutForm: true and include BYBIT_PAY in paymentIntent.formDetails.displayedPaymentMethods.
  2. Receive the Hosted Checkout URL in paymentIntent.additionalData.url and redirect the payer to it.
  3. The checkout form starts a Bybit Pay payment within the Intent. The platform creates the Bybit order and the form displays its QR code.
  4. The payer scans the QR with Bybit, reviews the transaction details, and confirms the payment.
  5. The platform updates the payment status and sends a webhook to the configured URL. The checkout form displays the result.
  6. Fulfil the order only when the platform payment status is CAPTURED.
📘

The initial Intent response provides access to the Hosted Checkout session. The payment and its QR are created later, within the checkout flow.

Redirect the payer to the exact value of paymentIntent.additionalData.url. The checkout form displays the QR and handles the payment screen.


The diagram shows the successful and expired-payment paths. Other unsuccessful outcomes are described under Payment Statuses.

Create Intent Request

Request specifics

  • Endpoint: POST /processing/api/v1/intents.
  • Set useCheckoutForm to true.
  • Provide order details and checkout configuration in paymentIntent.
  • Include BYBIT_PAY in paymentIntent.formDetails.displayedPaymentMethods.
  • For this flow, omit the H2H payments array and its paymentInstrument.incomingDetails. The checkout form handles the creation of the payment.
  • Use paymentIntent.formDetails.backToStoreRedirectUrl for the payer's return destination.
  • Configure payment notifications through paymentIntent.webhookUrl or the settlement account's default webhook URL.

Use the standard platform authentication and settlement-account-id header described in the API reference. The examples below show JSON request and response bodies.

Intent, Payment, and PaymentIntent

TermMeaning
IntentThe top-level container for the order and its transactions. Use its ID to correlate the overall checkout flow.
PaymentIntentThe order details and Hosted Checkout configuration supplied when creating the Intent. It creates a checkout session.
PaymentAn individual payment attempt. Hosted Checkout creates it within the existing Intent when the payer starts the payment flow. Each attempt has its own payment ID and status.

Request/Response Description

Request Template

Replace CURRENCY_CODE with a currency enabled for your integration. The amount is illustrative; use the precision and limits agreed for that currency.

{
  "clientReferenceId": "order-bybit-checkout-1001",
  "useCheckoutForm": true,
  "paymentIntent": {
    "formDetails": {
      "displayedPaymentMethods": ["BYBIT_PAY"],
      "backToStoreRedirectUrl": "https://merchant.example.com/orders/order-bybit-checkout-1001"
    },
    "submittedAmount": {
      "value": 100.50,
      "currency": "CURRENCY_CODE"
    },
    "description": "Order bybit-checkout-1001",
    "webhookUrl": "https://merchant.example.com/webhooks/payments"
  }
}
Top-Level Request Parameters
ParameterTypeRequiredDescription
clientReferenceIdStringRequiredYour reference for this Intent, unique within the same admin account and settlement account. Use a new reference for each new Intent, including a new checkout session for an existing order. Store it together with the returned platform intentId.
useCheckoutFormBooleanRequired for this flowSet to true to create a Hosted Checkout session.
paymentIntentObjectRequired for this flowOrder details and checkout configuration.
paymentIntent
ParameterTypeRequiredDescription
formDetailsObjectRequiredConfiguration for Carusell Hosted Checkout.
submittedAmountObjectRequired for the illustrated flowOrder amount and currency.
authorizationAmountObjectOptionalExplicit authorisation amount and currency. Use only when this is part of an agreed integration flow.
descriptionStringRequiredOrder title or payment reason. Maximum 10,000 characters.
webhookUrlStringOptionalURL for payment status notifications. Overrides the settlement account's default webhook URL for payments created within this session. If omitted, the account default is used. Configure either URL to receive notifications.
formDetails
ParameterTypeRequiredDescription
templateStringOptionalCheckout template configured for the settlement account. If omitted, the default template is used.
displayedPaymentMethodsArray of StringsRequired for the illustrated flowSet to ["BYBIT_PAY"] for a Bybit-only session. Additional enabled methods may be included. If omitted, the platform uses the methods available for Hosted Checkout under the account configuration.
backToStoreRedirectUrlStringOptionalYour return-to-store URL. Return controls and redirects depend on the checkout template. Provide this field to define the payer's return destination.
submittedAmount
ParameterTypeRequiredDescription
valueNumberRequiredSubmitted order amount as a JSON number, for example 100.50.
currencyStringRequiredCurrency code enabled for your integration.
authorizationAmount — when used
ParameterTypeRequiredDescription
valueNumberRequired when the object is suppliedExplicit authorisation amount as a JSON number.
currencyStringRequired when the object is suppliedAuthorisation currency enabled for the agreed flow.

The tables describe the fields relevant to this flow. See the Create Intent reference for the complete shared request schema.

Bybit Pay Checkout Experience

The Hosted Checkout form creates the Bybit payment and displays the QR. The payer scans it with Bybit and confirms the transaction there.

After the platform records the result, the checkout form displays a success or failure screen. The payer can return to your store using the destination configured in paymentIntent.formDetails.backToStoreRedirectUrl, subject to the checkout template's behaviour.

If a payment expires, the form displays the failed attempt and offers the next actions available for that session. A retry creates a new payment attempt when the checkout session permits it.

📘

Confirm the order using the platform payment status. A browser redirect to your store is part of the payer experience and does not confirm that funds were captured.

Payment Statuses

StatusMeaningMerchant action
ACCEPTEDThe platform has created the payment and accepted it for processing.Wait for further updates.
AUTHORIZATION_REQUESTEDThe Bybit payment has been created and is waiting for the payer to complete it.Wait for the result.
CAPTUREDThe payment completed successfully.Fulfil the order once.
DECLINEDThe payment was rejected.Keep the order unpaid for this attempt. In a webhook, use declineCode and declineMessage, when present, for diagnostics.
CANCELLEDThe payment was cancelled or the QR expired before completion.Keep the order unpaid for this attempt. A new attempt may be available within the active checkout session.
ERRORA processing error prevented completion.In a webhook, inspect errorCode and errorMessage, when present. Reconcile the payment state before retrying.
📘

Checkout session and payment lifetimes are separate. paymentIntent.additionalData.expirationDateTime describes the checkout session. A payment created within it has its own status and QR expiration.

intentStatus describes the containing Intent. An Intent can reach FINALIZED after a successful or unsuccessful payment attempt. Use the individual payment's status to determine whether the order was paid.

Retrieve Payment Status

If a webhook is delayed or missed, use the saved intentId to recover the payment attempts created by Checkout:

  1. Call GET /processing/api/v1/intents/{id} with the intentId returned when you created Checkout.
  2. Inspect payments[]. Each payment has its own id and status. Save these IDs and evaluate each attempt separately.
  3. To retrieve an individual payment, call GET /processing/api/v1/payments/{id} with that payment's ID. If you already received transactionId in a payment webhook, you can use it directly for this call.

Before Checkout creates a payment, the Intent may contain no payment attempts. An empty list does not establish a payment outcome. If multiple attempts exist, use each attempt's status; a failed attempt does not override a separate successful payment for the order.

📓

Diagnostic field names depend on the response:

  • Payment webhook: declineCode / declineMessage for a decline; errorCode / errorMessage for a processing error.
  • Get Payment: declineCode / declineCodeMessage for a decline; errorCode for a processing error. An errorMessage field is not part of this response.
  • Get Intent, inside payments[]: declineCode / declineCodeMessage, and processingStatusCode / statusMessage when returned.

Refunds

Bybit Pay payments completed through Hosted Checkout use the platform's standard refund flow.

  • Request a refund only after the original payment reaches CAPTURED.
  • Use the platform payment ID: transactionId in a payment webhook (transactionType: "PAYMENT"), payments[].id in the Get Intent response, or id in the Get Payment response.
  • Submit POST /processing/api/v1/refunds with that value in paymentId. The refund request expects an int64 JSON integer; preserve the exact identifier when converting the response string.
  • For a full refund, omit paymentSubmittedAmount and paymentAuthAmount, and omit partial or set it to false. This requests the original payment amounts and must pass the available-amount checks, including any earlier refunds.
  • Refund processing is asynchronous. A successful creation response accepts the request for processing; treat the refund as completed only when its status is REFUNDED.
  • Configure the refund's webhookUrl or the settlement account default for refund status updates. The refund does not inherit the payment's request-specific webhook URL.
  • Retrieve the current refund state through GET /processing/api/v1/refunds/{id} if needed.

Webhooks

Payment status notifications use paymentIntent.webhookUrl when supplied, otherwise the settlement account's default webhook URL. Configure one of these destinations to receive notifications.

FieldHow to use it
transactionTypeUse PAYMENT notifications for payment outcomes and REFUND notifications for refund outcomes.
transactionIdPlatform identifier of the individual transaction. Track each payment attempt or refund separately.
intentIdCorrelates payment attempts with the Intent returned when you created Checkout.
statusCurrent transaction status. Payment success is CAPTURED; refund success is REFUNDED.
  • Status notifications can include intermediate states. Fulfil the order only after confirming CAPTURED.
  • Process duplicate notifications idempotently so that repeated delivery cannot fulfil the same order twice.
  • Correlate each attempt by its payment ID and the overall order by its Intent ID. A failed attempt does not override a separate successful payment for the order.
  • If a notification is delayed or missed, retrieve the Intent by its saved ID and inspect payments[]. Once the payment ID is known, you can retrieve that payment directly. See Retrieve Payment Status above.

See Webhooks: Overview and Webhooks: Example for the shared notification contract.


Did this page help you?