Customize Hosted Checkout

Configure the hosted checkout page to match your brand and business needs.

Branding

The hosted checkout page automatically displays your store branding as configured in the Teya Business Portal. This includes your store name and logo.

Checkout & receipt customisation

The following options can be configured in the Teya Business Portal. These settings apply across all hosted checkout sessions for your store.

SettingDescriptionWhere it appearsRequired
Message on checkoutA custom message shown to the customer before they pay. Use this for order context, instructions, or any terms the customer should see.Hosted checkout pageNo
Message on receiptA custom message shown after a successful payment. Use this for confirmation notes, next steps, or contact details.Receipt pageNo
Privacy policy URLA link to your privacy policy. Customers can review how their data is handled before completing payment.Hosted checkout pageNo
Terms & conditions URLA link to your terms and conditions, displayed alongside the privacy policy link.Hosted checkout pageNo

Session options

These parameters are set per session when calling the Create Session API:

ParameterDescriptionRequired
amountPayment amount in minor units (e.g. 1000 = 10.00)Yes
typeTransaction type - SALE, PRE_AUTHORISATION, or ACCOUNT_VERIFICATIONYes
save_payment_methodTokenizes the card so you can charge it again later. See Saving a payment methodNo
success_urlURL to redirect after successful paymentNo
cancel_urlURL to redirect if customer cancelsNo
line_itemsArray of order line items with description, quantity, and unit priceNo
merchant_referenceYour internal order reference for reconciliationNo
metadataCustom key-value pairs stored with the sessionNo

Amount field structure

The amount object in the session request uses two fields:

amount.valueInteger
Payment amount in the smallest currency unit
amount.currencyString
ISO 4217 currency code
Smallest currency unit
For currencies with two decimal places (EUR, GBP, USD), multiply the amount by 100. For example, €50.00 is 5000 and £9.99 is 999.

Saving a payment method

Consent comes first
Before you store a card, you must obtain and record the customer's agreement to save it and charge it again. That agreement — often called a mandate — defines when, how often, and for how much you can charge the card. It is what makes the later merchant-initiated payments valid.

Set save_payment_method to true when you create the session. The customer enters their card on the Teya-hosted page, so 3D Secure runs there and the card number never touches your systems.

Two fields work together on the session. save_payment_method is what mints the token; type decides what the customer sees on the hosted page:

typeamount.valueWhat the hosted page shows
ACCOUNT_VERIFICATION0Saves the card without charging it. The pay button shows no price.
SALEThe real amountSaves the card alongside a real payment.

If you send type: ACCOUNT_VERIFICATION with save_payment_method: false, Teya verifies the card but saves nothing.

{
  "type": "ACCOUNT_VERIFICATION",
  "save_payment_method": true,
  "amount": { "value": 0, "currency": "EUR" },
  "success_url": "https://mywebsite.com/account/cards/saved",
  "cancel_url": "https://mywebsite.com/account/cards"
}

The token arrives on the payment.succeeded.v1 webhook as data.token_response.token_id. Store it alongside data.payment_method.brand and last4 so you can render “Mastercard ••••4065” in your UI.

See Card on File for the consent rules and the wider flow, and Charge a Saved Payment Method for charging the token.

Full API reference

For complete endpoint documentation including all request and response fields, see the Online Payments API Reference.

Session expiry

Checkout sessions expire after 15 minutes. Once expired, the customer will see an error page if they try to access the checkout URL. Create a new session if needed.