Cycle Logo

Hosted Payment Page Reference

A detailed reference for all input parameters and postMessage events for the CYCLE Hosted Payment Page.

Input Parameters Reference

All available parameters for constructing the Hosted Payment Page JSON payload.

Authorization Parameters

ParameterRequiredDescription
merchantAccountYesYour merchant account name provided by CYCLE.
timestampYesUnix timestamp. Valid for 30 minutes to avoid replay attacks.

Charge Parameters

ParameterRequiredDescription
chargeIdNoUnique transaction ID (recommended). If not set, CYCLE will generate one.
priceYesAmount to charge the customer (e.g. 5.00).
currencyYesISO 4217 currency code (e.g. ZAR, USD).
descriptionYesDescription of the item purchased (displayed to customer).
memoNoA string recorded with the charge, useful for internal reference or reconciliation.
chargePropertiesNoOptional JSON object of key-value pairs. No = or spaces in keys. Max size: 3500 characters.

Customer Parameters

ParameterRequiredDescription
customerIdYesYour unique customer ID. Required for reporting and fraud checks.
customerCountryNoISO 2-letter country code (e.g. ZA). Used for tax/fraud. Defaults to IP geo or UI prompt if not provided.
customerNameNoCustomer full name.
customerEmailNoEmail address (used for receipt if CYCLE sends confirmation).
customerStateProvinceNoState/province. Required for some tax regions.
customerCityNoCustomer city.
customerPostalCodeNoPostal/ZIP code. Required for tax in some countries.
customerStreetAddressNoStreet address for tax/shipping.
customerStreetAddress2NoAdditional address line.
customerDOBNoDate of birth in YYYY-MM-DD format. Used for fraud checks and age restrictions.
customerLocaleNoLanguage override (e.g. en_US, fr_FR).

Hosted Payment Page Options

ParameterRequiredDescription
successUrlNoRedirect URL after successful purchase.
failureUrlNoRedirect URL after failed purchase (decline, fraud, etc).
cancelUrlNoRedirect URL if user cancels the payment.
flowCompletionUrlNoRedirect URL for any result if success/failure/cancel are not defined.
callbackUrlNoWebhook endpoint for real-time notifications (overrides global notification URL if set).
savePaymentProfileNotrue to auto-save card info for eligible payment methods.
showPaymentProfilesNotrue to show stored profiles to returning users.
recurrenceNoUsed for recurring billing. Set as { "type": "INITIAL" } to create a token for future use.

Deep Link Parameters

ParameterRequiredDescription
modeYesMust be set to "DEEP_LINK" to use embedded or direct iframe launch.
paymentMethodYesMust be set to "CREDIT_CARD" or other supported method.

Hosted Payment Page postMessage Events

Events sent from the Hosted Payment Page iframe to your parent page via window.postMessage.

EventExample JSONDescription
Paywall Opened
{ "name": "PURCHASE_STATUS", "initialized": true }
Indicates the Hosted Payment Page is ready. Show iframe if previously hidden.
Order Submitted
{ "name": "PURCHASE_STATUS", "submitted": true }
Order submitted but not complete. Switch button from “Back” to “Cancel”.
Success
{ "name": "PURCHASE_STATUS", "success": true, "pending": false }
Payment completed successfully. If pending: true, funds not yet captured.
Failure
{ "name": "PURCHASE_STATUS", "success": false }
Payment failed (e.g. declined). Update UI accordingly.
Paywall Closed
{ "name": "PURCHASE_STATUS", "close": true }
Indicates user closed the Hosted Payment Page manually. Hide iframe.
Resize Event
{ "message": { "name": "WINDOW_SIZE", "success": true, "payload": { "size": { "width": 666, "height": 1542 }}}}
Resize your iframe to the provided dimensions.