Skip to main content
Create and configure a new payment widget for a business.
POST /api/v1/businesses/:businessId/widgets/create-widget A widget is an embeddable crypto payment gateway. Each business can have up to 10 widgets, each independently configured.

Parameters

Path

NameTypeRequiredDescription
businessIdstringYesThe business ID

Body

NameTypeRequiredDescription
namestringYesWidget display name, 1–128 characters
modeenumYesFIXED_AMOUNT or CUSTOMER_AMOUNT
minAmountstring or nullNoMinimum deposit amount as a decimal string
maxAmountstring or nullNoMaximum deposit amount as a decimal string
allowedNetworksarrayNoAccepted blockchain networks
allowedCurrenciesarrayNoAccepted currency symbols
allowedDepositAddressesarrayNoAllowed destination addresses
allowedDomainsarrayNoDomain restriction list
allowedMethodsarrayNoAccepted payment methods (max 3)
successUrlstring or nullNoRedirect URL on success, 1–2,048 characters
cancelUrlstring or nullNoRedirect URL on cancel
defaultCurrencystring or nullNoDefault currency, 2–8 uppercase
defaultCurrencyAddressstring or nullNoDefault currency contract address
defaultNetworkstring or nullNoDefault blockchain network, 4–32 characters
defaultDepositAddressstring or nullNoDefault deposit destination
metadataSchemaobject or nullNoJSON schema for custom metadata, 1–2,048 bytes
renderModeenumNoWidget render mode: IFRAME or POPUP
iconUrlstring or nullNoWidget icon URL, 1–2,048 characters
colorstring or nullNoAccent color with alpha (e.g. "#FF5733CC"), 8 characters
emojistring or nullNoWidget emoji, 1–8 characters

Request example

curl --request POST 'https://payments.bleepay.com/api/v1/businesses/biz_abc123/widgets/create-widget' \
  --header 'Authorization: Bearer <business_token>' \
  --header 'Content-Type: application/json' \
  --data '{
    "name": "Checkout Widget",
    "mode": "CUSTOMER_AMOUNT",
    "minAmount": "1",
    "maxAmount": "1000",
    "allowedNetworks": ["polygon", "ethereum"],
    "allowedCurrencies": ["USDC", "EURC"],
    "allowedDepositAddresses": ["0xMerchantWalletAddress"],
    "allowedDomains": ["shop.example.com"],
    "successUrl": "https://shop.example.com/order/success",
    "cancelUrl": "https://shop.example.com/order/cancel",
    "defaultCurrency": "USDC",
    "defaultNetwork": "polygon",
    "renderMode": "IFRAME"
  }'

Response

Response schema

FieldTypeDescription
widgetobjectThe created widget object
clientSecretstringClient secret for embedding the widget — shown only once
Widget object:
FieldTypeDescription
idstringWidget identifier
namestringWidget name
modestringFIXED_AMOUNT or CUSTOMER_AMOUNT
enabledbooleanWhether the widget is active
createdAtstringISO 8601 timestamp

Example response

{
  "widget": {
    "id": "wdgt_abc",
    "name": "Checkout Widget",
    "mode": "CUSTOMER_AMOUNT",
    "enabled": true,
    "createdAt": "2026-06-09T12:00:00.000Z"
  },
  "clientSecret": "wdgt_secret_abc123..."
}
Warning: The clientSecret is shown only once at creation time. Store it securely — you’ll need it to authenticate public widget endpoints.