Skip to content

Hosted Payment Page

The Hosted Payment Page is a fully managed, branded checkout page that you can present at checkout. Creating a Payment Request with the hostedPaymentPage node, will generate a hosted page link that displays your logo, line items, adjustments, and handles the payment flow end-to-end.

Hosted Payment Page example

How It Works

  1. Create a Payment Request with the hostedPaymentPage node included.
  2. Direct your customer to the hosted URL returned in the response.
  3. The customer completes payment on the branded page.
  4. Based on the resultPage configuration, the customer sees a hosted result page, or is redirected to your site.
  5. Receive the final payment result via webhooks or query the Payment Request result using the resource Id.

Configuration

Creating a hostedPaymentPage using the Payment Request is as follows:

{
"reference": "INV-2026-042",
"payment": {
"amount": 5500,
"currencyCode": "AUD",
"description": "Order #42 - 2x Widget Pro"
},
"paymentMethods": [
"card",
"google_pay"
],
"hostedPaymentPage": {
"merchantName": "Acme Store",
"logo": "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAADUlEQVR42mNk+M9QDwADhgGAWjR9awAAAABJRU5ErkJggg==",
"redirectUrl": "https://merchant.example.com/thank-you",
"resultPage": "show",
"lineItems": [
{
"title": "Widget Pro",
"image": "https://merchant.example.com/images/widget.png",
"amount": 2500,
"quantity": 2,
"modifier": "each"
}
],
"adjustments": [
{
"title": "Postage",
"order": 1,
"amount": 500,
"adjustmentType": "shipping"
}
]
}
}

Properties

HostedPaymentPage

PropertyTypeRequiredDescription
merchantNamestringNoThe merchant name displayed on the hosted page. Max 140 characters. Defaults to the merchant name configured during onboarding if not provided.
logostringYesBase64-encoded image to display as the merchant logo. Use PNG, SVG, or WebP image formats only. Maximum size 10KB.
redirectUrlstringNoURL to redirect the customer to after payment. Required when resultPage is redirect. Optional when resultPage is show. Must be a valid URL.
resultPagestringNoControls what happens after payment completes. Default is show. See Result Page Behaviour.
lineItemsarrayNoList of line items to display in the payment summary. Maximum 50 items.
adjustmentsarrayNoList of adjustments (discounts, shipping, tax) applied to the order. Maximum 10 items.

LineItem

PropertyTypeRequiredDescription
titlestringYesDisplay name of the line item. Max 50 characters.
imagestringNoHTTPS URL of an image for the line item. Same format restrictions as logo (Use PNG, SVG, or WebP image formats only.). Maximum size 10KB.
amountintegerYesUnit price in cents (e.g. 1000 = $10.00). Must be >= 0.
quantityfloatNoQuantity of this item. Must be > 0. Supports up to 3 decimal places (e.g. 1.5, 0.750). Defaults to 1.
modifierstringNoUnit label displayed alongside the quantity (e.g. “each”, “kg”). Max 50 characters.

Hosted Payment Page example

Adjustment

PropertyTypeRequiredDescription
titlestringYesDisplay name of the adjustment. Max 30 characters.
orderintegerNoDisplay order of this adjustment. If provided for one adjustment, it must be provided for all. Must be >= 0. No duplicate values allowed.
amountintegerYesAdjustment amount in cents. Can be negative (e.g. -1000 for a $10.00 discount), zero, or positive (e.g. 500 for a $5.00 shipping fee).
adjustmentTypestringYesThe type of adjustment. Defaults to other. See Adjustment Types.

Hosted Payment Page example

Adjustment Types

ValueDescription
otherGeneral adjustment (default)
discountA discount applied to the order
shippingA shipping fee
taxTax applied to the order

Result Page Behaviour

The resultPage property controls what happens after the customer completes (or fails) a payment:

ValueBehaviourredirectUrl required?
showDisplays the Hosted Payment Page result page with payment outcome.No (optional — if provided, a “Return to merchant” link is shown)
redirectRedirects the customer to redirectUrl.Yes
noneNo action after payment.No

Logo and Image Requirements

  • The logo must be provided as a base64-encoded data URI (e.g. data:image/png;base64,...). Maximum size 10KB.
  • Line item image URLs must be valid HTTPS URLs. Maximum size 10KB.
  • Use PNG, SVG, or WebP image formats only.

Validation Rules Summary

Important: When line items and adjustments are provided, the sum of each line item’s amount × quantity plus the sum of all adjustments must equal the payment.amount of the Payment Request.

RuleConstraint
Line items and adjustments total must equal payment.amountSum of (amount × quantity) across all line items plus sum of all adjustments
Maximum line items50
Maximum adjustments10
Merchant name lengthMax 140 characters
Line item title lengthMax 50 characters
Line item modifier lengthMax 50 characters
Adjustment title lengthMax 30 characters
Adjustment orderOptional, must be >= 0, with no duplicates
Line item quantityMust be > 0, max 3 decimal places
redirectUrl required when resultPage = redirectYes