Configure Checkout Widget

Set the global configuration for your hosted checkout widget — branding, allowed payment channels, currencies, and redirect URLs.

Request

curl --request POST \
  --url $baseUrl/organization/checkout/configure \
  --header 'x-api-key: YOUR_API_KEY' \
  --header 'Content-Type: application/json' \
  --data '{
    "name": "Web Checkout Widget",
    "settlementAccountId": "wallet-uuid",
    "checkoutType": "CUSTOM",
    "allowedDomains": ["https://yourapp.com"],
    "branding": {},
    "returnUrl": "https://example.com/checkout/return",
    "successUrl": "https://example.com/checkout/success",
    "enabledFiatCurrencies": ["USD", "NGN"],
    "enabledCryptoCurrencies": ["USDC", "SOL"],
    "enabledPaymentMethods": ["crypto", "bank_transfer"]
  }'
FieldRequiredDescription
nameYesConfiguration name
settlementAccountIdYesWallet where funds settle
checkoutTypeYesPRODUCT or CUSTOM
productIdsIf checkoutType is PRODUCTProducts this checkout sells
allowedDomainsNoDomains permitted to embed this checkout — validated against the Origin header
brandingNoLogo, colors, etc.
returnUrl / successUrlNoWhere to send the customer after payment
enabledFiatCurrenciesNoe.g. ["USD", "NGN"]
enabledCryptoCurrenciesNoe.g. ["USDC", "SOL"]
enabledPaymentMethodsNoAny of crypto, nadapay_wallet, card, bank_transfer

Response

{
  "success": true,
  "statusCode": 200,
  "message": "Checkout configured successfully",
  "data": {
    "id": "chk_01hw3x7k2r4p5q6m8n9v",
    "brandColor": "#7C3AED",
    "logoUrl": "https://cdn.example.com/logo.png",
    "redirectUrl": "https://app.example.com/payment/success",
    "allowedChannels": ["card", "bank_transfer"],
    "environment": "live",
    "updatedAt": "2024-07-01T10:00:00.000Z"
  }
}

Frontend integration notes

  • Read enabledPaymentMethods from this configuration at render time — don't hardcode payment options in your UI
  • Send a valid Origin header on any browser-facing request against this config so allowedDomains validation succeeds

Call this next



Did this page help you?