Hosted checkout — business rules

The constraints, field-level rules, and operational details specific to Bluebox hosted checkout.

These rules apply specifically to the Bluebox hosted checkout flow. For the general rules that apply to every Merchant / PSP integration, see QR Code Payments business rules — most of those apply here too.


Request rules

RuleDetail
EndpointPOST /bluebox/secure/createTx (different from the general code-create endpoint)
AuthBasic Auth or JWT Bearer with EXTERNAL role. See Authentication.
Content-Typeapplication/json
HTTPS onlyPlain HTTP is rejected
reference is requiredUnique per merchant. The platform rejects duplicate references — see Idempotency.
callbackUrl is requiredThe page on your site that receives CB1 (browser redirect). Up to 400 characters.
amount is requiredIn your merchant's configured currency. Two decimal places.

Callback rules

Bluebox sends two callbacks per transaction:

CallbackWhereWhenWhat
CB1 — browser redirectThe callbackUrl you supplied on createTxAfter the customer finishes (success, cancel, or failure)A 302 redirect with ?transactionId={id}&status={value} query params. Unencrypted.
CB2 — encrypted webhookYour merchant notification URL (configured in the Portal)After the transaction reaches a terminal stateThe full encrypted TransactionNotificationV3 payload. See Webhooks.

CB1 and CB2 can arrive in either order. Build your handlers to be order-independent. Match them by transactionId.


Trust model

What you can trustWhat you cannot trust
CB2 (decrypted) — payload decrypts only with your notification key, so if decryption succeeds, the message is authenticCB1 query parameters alone — a browser redirect can be forged by an attacker
transactionId matched across CB1 and CB2Reading status=SUCCESS from CB1 query string without CB2 verification

Don't release goods on CB1 alone. Wait for the encrypted CB2 to confirm.


Reversal-on-failure safety net

The reversal mechanism that applies to all webhook deliveries also applies to CB2:

  • Scan to Pay schedules a reversal job before sending CB2
  • If CB2 receives a non-200 response (or no response within 45 seconds), the reversal fires
  • The original transaction is reversed and the customer is not charged

This means a broken CB2 handler in production will reverse your customers' payments — silently, from their perspective. Monitor CB2 acknowledgement rates carefully on go-live.

See Webhooks > How it works for full detail.


Optional fields

These are documented on the hosted checkout page; recapping the business rules here.

FieldConstraint
description5–45 characters. Shown to the customer at checkout.
requestShippingIf true, Bluebox asks the customer for a shipping address. The address is included on the CB2 payload.
terminalIdUp to 40 characters. Overrides the default terminal ID for this transaction.
subMerchantNameFor super merchants. Shows on the consumer's bank statement (if supported by the acquirer).
mcc4-digit numeric. Overrides the merchant category code.
rrn212 characters, left-padded with zeros. Secondary RRN passed through to the bank message.
cartItemsArray of basket items for airtime limit checking. See QR Code Payments — business rules.
notificationUrlPer-transaction override of the merchant notification URL. Most integrators don't need this.

Currency, amount, and limits

  • Currency is fixed per merchant, set at onboarding. Always the merchant's configured currency (typically ZAR for South African merchants).
  • Amount must be greater than zero. Variable-amount Bluebox transactions are not supported — the customer can't change the amount on the hosted page.
  • Limit baskets (airtime / data bundles) apply if cartItems includes AIRTIME or AIRTIME_BUNDLE. Same daily and monthly thresholds as QR — see qr-payments-business-rules.

What's next