Payment Page
Redirect customers to a Surfboard-hosted checkout page. The fastest way to accept online payments with minimal integration effort.
Overview
The Payment Page is the simplest way to accept online payments with Surfboard. Instead of building your own checkout form, you redirect customers to a Surfboard-hosted payment page. The customer completes payment there and is redirected back to your site.
This approach requires minimal frontend work — you only need to create an order via the API and redirect the customer to the returned payment link.
Prerequisites
Before accepting payments with the Payment Page:
- Create a developer account at the Developer Portal
- Complete onboarding (merchant and store setup)
- Register a terminal with the type set to PaymentPage
Payment Types
There are two primary types of payments:
- Customer Initiated Transaction (CIT): Transactions initiated by customers on your webshop, such as e-commerce purchases.
- Merchant Initiated Transaction (MIT): Transactions initiated by the merchant, such as subscription charges.
Note: MIT payments can only be processed by terminals set to
MerchantInitiated. See the Server-to-Server API guide for details on MIT.
Payment Process
Step 1: Create an Order
Create an order using the Create Order API. On success, you receive a payment link to share with the customer.
POST /merchants/:merchantId/orders
{
"terminal$id": "YOUR_TERMINAL_ID",
"orderLines": [
{
"id": "ITEM-001",
"name": "Annual Subscription",
"quantity": 1,
"amount": {
"total": 99900,
"currency": "752"
}
}
],
"controlFunctions": {
"initiatePaymentsOptions": {
"paymentMethod": "CARD",
"amount": 99900
}
}
}
Control Fields
The Payment Page supports additional control fields for fine-grained payment control:
| Field | Description |
|---|---|
delayCapture | Set to true to capture payment later after authorisation. Default: false. |
enforceTokenization | Override tokenisation config — control whether the card is saved for future use. |
enforce3DSecure | Whether the customer goes through 3D Secure verification. |
paymentPageValidFor | How long the payment link is valid. Default: one day. |
lockToPaymentMethod | Force the customer to use a specific payment method. |
authMode | PREAUTH or AUTH. Default: AUTH. If PREAUTH, delayCapture is set to true automatically. |
redirectUrl | URL to redirect to after successful payment. Includes orderId as a query param. |
failureRedirectUrl | URL to redirect to after failed payment. Includes orderId as a query param. |
generateShortLink | Set to true to get a shortened payment URL. Default: false. |
Recurring Payment Fields
For subscription-based payments, include these additional fields:
| Field | Description |
|---|---|
subscriptionAmountType | FIXED or VARIABLE |
maxAmount | Maximum amount in minor units (for variable subscriptions) |
frequency | daily, weekly, monthly, quarterly, annually, unscheduled, etc. |
numberOfPayments | Total expected payments for this subscription |
uniqueReference | Unique reference for the recurring order |
Step 2: Check Order Status
Monitor the order status using the Fetch Order Status API. When the status changes to PAYMENT_COMPLETED or PAYMENT_CANCELLED, you can view the transaction details.
You can also receive real-time updates via webhook notifications — configure them in the Developer Portal Console.
Integration Flow
Here is the typical integration flow:
- Customer clicks “Pay” on your website
- Your backend calls the Create Order API
- You redirect the customer to the
paymentUrlfrom the response - Customer completes payment on the Surfboard-hosted page
- Customer is redirected to your
redirectUrl(orfailureRedirectUrl) - Your backend verifies the order status via the API or webhook
Tip: Always verify the order status server-side after redirect. Do not rely solely on the redirect URL to confirm payment success.
Reference
Other Guides
Tap to Pay on iPhone SDK
Accept contactless payments directly on iPhone. Complete integration guide for Surfboard's iOS SoftPOS SDK -- from setup to production.
Android SoftPOS SDK
Turn Android devices into payment terminals with the Surfboard Android SoftPOS SDK. Complete integration guide from setup to production.
EMV Terminal Integration
Integrate traditional card-present terminals through Surfboard's unified API. From account setup to live payments in one guide.
Inter-App Integration
Integrate your POS app with CheckoutX using native app switch. Register terminals, process payments, and scan NFC tags through a bi-directional deep link flow.
Self-Hosted Checkout
Embed a payment form directly in your web app with the Surfboard Online SDK. Full UI control with Surfboard handling PCI compliance.
Server-to-Server API
Process online payments entirely from your backend with Merchant Initiated Transactions. Full control over recurring payments, subscriptions, and tokenized card flows.
Create an Order
Learn how to create orders with line items, tax, customer details, and control functions. The starting point for accepting payments with the Surfboard API.
Merchant Onboarding
Set up merchants and stores on the Surfboard platform. Walk through the full onboarding flow from merchant creation to KYB completion and store setup.
Payment Lifecycle
Manage the full payment lifecycle from order creation through capture, void, cancel, and refund operations using the Surfboard Payments API.
Capture a Payment
Finalize a previously authorized payment by capturing funds. Covers delay capture and pre-authorization flows with step-by-step API examples.
Terminal & Device Management
Manage payment terminals and devices via the Surfboard API. Register in-store and online terminals, configure settings, and handle device operations.
Cancel a Payment
Stop an in-progress payment before it completes. Use cancellation when a customer abandons checkout or a payment needs to be halted mid-process.
Webhooks & Notifications
Receive real-time event notifications via webhooks, email, Slack, and SFTP. Subscribe to payment events and settlement reports for merchants and partners.
Recurring Payments
Implement subscription billing and recurring charges using tokenization, recurring payment configuration, and Merchant Initiated Transactions.
Void a Payment
Reverse a completed payment before settlement. Voiding stops funds from transferring to the merchant's account, avoiding incorrect transactions.
Receipts
Generate, email, print, and customise receipts for in-store transactions using the Surfboard Receipts API.
Refund an Order
Process a full refund by creating a return order with negative quantities. Covers the complete refund flow with API examples and payment method requirements.
Partial Refund
Refund specific items or a reduced amount from a completed order. Process partial returns by creating a return order with only the items to be refunded.
Tips Configuration
Configure tipping on Surfboard payment terminals at the merchant, store, or terminal level using a hierarchical override model.
NFC Tag Reading
Use the NFC Reading API to create tag-reading sessions on payment terminals, scan NFC/RFID-tagged products, and retrieve scanned tag data.
Partial Payments
Split an order across multiple payment methods or transactions. Accept card, cash, and Swish in any combination to settle a single order.
Multi-Merchant Terminals
Set up shared payment terminals for multiple merchants using the Multi-Merchant Group API. Ideal for food courts, events, and co-located businesses.
Store Management
Create, update, verify, and manage in-store and online stores using the Surfboard Payments Store APIs.
Gift Cards & Promotions
Issue and manage gift cards, track transactions, and create marketing promotions using the Surfboard Payments APIs.
Product Catalog
Create and manage product catalogs, products, variants, inventory levels, and analytics through the Catalog API.
Settlements & Reporting
Retrieve settlement reports, view adjustments, manage merchant charges, and register customer profiles for reconciliation and billing.
Account & Service Provider Management
Create merchant and partner accounts, manage user roles, register service providers, and configure external notifications via the Surfboard API.
Payment Methods
Activate, deactivate, and list payment methods for a merchant. Manage card, Swish, Klarna, AMEX, Vipps, MobilePay, and more via the API or Partner Portal.
Client Auth Tokens
Generate client-side authentication tokens for secure API access from browsers and mobile apps without exposing your API key or secret.
Partner Branding
Configure white-label branding for terminals and payment pages. Set colors, fonts, logos, and cover images at the partner level via API or Partner Portal.
Ready to get started?
Create a sandbox account and start building your integration today.