Developers Guides Create Order Error Codes

Create Order Error Codes

Reference of error codes returned by the create order and initiate payment flows, with notes on when each is thrown and how to handle it.

Online API Orders Errors Reference

Overview

This reference lists the error codes returned by the create order and initiate payment flows. Most create order calls also initiate a payment in the same request (via controlFunctions.initiatePaymentsOptions), so errors from either step can surface on the same endpoint.

See the Create an Order guide for request/response shape and the Payment Lifecycle guide for status semantics.

Error Response Shape

Errors return a status of ERROR along with an error code and message. Example:

{
  "status": "ERROR",
  "errorCode": "OR_0042",
  "message": "Terminal not found"
}

Error code prefixes indicate the source:

PrefixSource
OR_Orders service (validation, order state, terminal/store checks)
PS_Payment service (payment initiation, refund handling)
GC_Gift card service
SP_Service provider

Messages may contain placeholders like <id>, <amount>, <type>, or <status> — the API substitutes the real value at runtime.

Create Order Errors

Errors thrown while validating and creating the order.

Validation and Schema

CodeMessageNotes
OR_0015Order validation failedWraps the raw schema validator error. Check required fields and types.
OR_0022Invalid order line item. Missing item priceAt least one line is missing amount.regular or amount.total.
OR_0023Invalid item price for item id [<id>], <errorMsg>Price on the named line item failed validation.
OR_0037Invalid total order pricetotalOrderAmount does not reconcile with the order lines and adjustments.
OR_0049(empty message)Reserved / edge-case validation failure.

Merchant, Store, and Terminal

CodeMessageNotes
PS_0059No Merchant found with the given Merchant IDMerchant ID in the URL does not exist.
OR_0001No Merchant Details found for the Merchant IDMerchant exists but is missing required configuration.
OR_0002Order creation is not allowed for this merchant type <type>The merchant type does not permit direct order creation.
OR_0028Store is not in an active stateActivate the store before creating orders.
OR_0042Terminal not foundterminal$id does not match any terminal.
OR_0007The Terminal ID is not associated with this merchantTerminal exists but belongs to another merchant.
OR_0006The terminal is in deregistered stateRe-register the terminal before use.
OR_0050Order cannot be created, terminal is in an inactive stateTerminal is registered but not active.

Currency

CodeMessageNotes
OR_0003Currency Code is not present for this merchantMerchant has no configured currency — contact your onboarding contact.
OR_0004The currency code is not associated with this merchantUse a currency enabled on the merchant.
OR_0005Currency is mandatory as the merchant has more than one currencyMulti-currency merchants must set amount.currency explicitly.
OR_0048Currencies should be same in order linesAll line items must use the same currency.

Payment Method Locking

CodeMessageNotes
OR_0031No Payment Method found with the given payment method idThe lockToPaymentMethods id is unknown.
OR_0032Lock to payment method is not allowed for this merchantThe merchant does not have the lock-to-method feature enabled.
SP_0001Service provider IDs [<ids>] not associated with this merchantOne or more service provider IDs are invalid for this merchant.

Refunds (on create order)

Refunds are created as new orders with negative quantities and a purchaseOrderId on each line. These errors surface during that validation.

CodeMessageNotes
OR_0010No purchase order found with ID: <id>purchaseOrderId does not match any completed order.
OR_0035Cannot refund from purchase order that is not completed. Status: <status>Only completed orders can be refunded.
OR_0039Cannot refund more than the original order amountRefund amount exceeds the remaining refundable balance.
PS_0043Invalid order line item. Missing purchase order id for refund lineEvery refund line must carry purchaseOrderId.
PS_0010Unlinked refunds are only supported for CARD payment methodsUnlinked refunds cannot be issued on non-card methods.
GC_0004Gift card refunds are not supportedGift card payments cannot be refunded via this flow.

Initiate Payment Errors

When the create order request also initiates a payment, these errors can be returned from the same call. They also surface when you call initiate payment directly.

Order State

CodeMessageNotes
PS_0057Order not foundThe order referenced by the payment request does not exist.
PS_0062Order already paidThe order has already been fully paid.
OR_0046Order cancelledThe order is in a cancelled state and cannot accept payments.
PS_0019Cannot pay [<amount>], amount payable [<pendingFromOrder>]Requested amount exceeds the outstanding balance on the order.

Amount and Validation

CodeMessageNotes
PS_0008Payment amount cannot be less than 0.01Send a positive amount in the smallest currency unit.
PS_0033empty payload - payment initiation rejected or Initiate payment validation failed with error <err>Payload is missing or failed schema validation.
PS_0025Payment initiation failed: <error.message>Wraps unexpected exceptions from downstream services. See the Handling PS_0025 section below.

Terminal, Merchant, and Store

CodeMessageNotes
OR_0042Terminal not foundTerminal ID unknown.
OR_0006Terminal [<terminalId>] is not activeRe-activate the terminal.
PS_0013No linked terminals found / Terminal not linked to merchant / Terminal not linked to storeLink the terminal to the merchant/store before initiating.
PS_0059Merchant not foundMerchant ID unknown.
PS_0058Store not foundStore ID unknown.

Refund-Specific

CodeMessageNotes
OR_0053Mixed linked and unlinked refund lines are not supportedSplit mixed refunds into separate requests.
PS_0104Multiple purchasePaymentId values found in refund lines / This purchase order has partial paymentsSpecify which payment to refund using purchasePaymentId.
PS_0017No valid purchase payments found for the specified payment IDs / Purchase payment not foundThe purchasePaymentId does not match a refundable payment.
PS_0010Payment method <method> not supported for returns / No payments with matching payment method found / Unlinked refunds are not enabled for this merchant / Unlinked refunds are only supported for [<methods>] / Purchase payment does not support CARD_NP refundRefund is not allowed for the given method or configuration.
PS_0032Cannot refund amount <amount> (not enough remaining / not enough in card / not enough in other methods / exceeds max for <method>)Refund would exceed the available balance.
PS_0068Cannot refund amount <amount> as there are no card payments in the purchase orderNo card payments are available to refund against.
PS_0096Cannot initiate refund as there are no payments of type <method>No payments of the requested method exist on the order.
PS_0034Message is missingCard-not-present refund is missing the message field.
PS_0044Cannot refund amount <amount> as message <msg> is not allowed / Purchase payment id is required, more than one purchase matches the criteriaCard-not-present refund message/ID disambiguation required.

Combined Flow Errors

When the create order call also initiates a payment, downstream payment failures (processor, network, 3DS) are reported through the payment object rather than as a top-level error:

{
  "status": "ERROR",
  "errorCode": "<first processor code>",
  "message": "Payment failed",
  "payment": {
    "error": {
      "errorMessage": "...",
      "errorCode": ["..."],
      "psErrorCodes": ["..."]
    }
  }
}

Merge payment.error.errorCode and payment.error.psErrorCodes to get the full list of processor codes for logging and support.

Handling PS_0025 — Terminal Not Connected

A common PS_0025 variant is:

PS_0025: Terminal is not connected to server so unable to send transactions

Re-run the terminal configure call and retry the payment. This can be done transparently — no user interaction is required. It is most common on SoftPOS, where the consumer device can drop its server session between transactions.

See Interapp Integration for the full recovery pattern.

Handling Patterns

  • Retryable vs. terminal. Treat PS_0025, PS_0013, and network-class errors as retryable after a configure/refresh. Treat OR_* validation errors as terminal — fix the payload and resubmit.
  • User-facing vs. internal. OR_0022, OR_0023, OR_0037, OR_0048 are actionable by the merchant integration team. PS_0025, PS_0059, PS_0058 usually mean misconfiguration — surface them to an internal log rather than to the cardholder.
  • Refund edge cases. When handling PS_0104, always re-issue the refund with an explicit purchasePaymentId — there is no sensible default when multiple payments exist on one order.
  • Log the full response. Capture errorCode, message, and payment.error.* together. Support tickets without the error code are very hard to trace.

Reference

Other Guides

in-store

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.

in-store

Android SoftPOS SDK

Turn Android devices into payment terminals with the Surfboard Android SoftPOS SDK. Complete integration guide from setup to production.

in-store

CheckoutX SoftPOS

Accept in-person payments on smartphones and tablets by pairing the CheckoutX app with your own POS app — a dual-app setup that requires no SDK integration.

in-store

EMV Terminal Integration

Integrate traditional card-present terminals through Surfboard's unified API. From account setup to live payments in one guide.

online

Payment Page

Redirect customers to a Surfboard-hosted checkout page. The fastest way to accept online payments with minimal integration effort.

in-store

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.

online

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.

online

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.

online

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.

online

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.

online

Payment Lifecycle

Manage the full payment lifecycle from order creation through capture, void, cancel, and refund operations using the Surfboard Payments API.

online

Capture a Payment

Finalize a previously authorized payment by capturing funds. Covers delay capture and pre-authorization flows with step-by-step API examples.

in-store

Terminal & Device Management

Manage payment terminals and devices via the Surfboard API. Register in-store and online terminals, configure settings, and handle device operations.

online

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.

online

Webhooks

Receive real-time event notifications via webhooks. Subscribe to order, payment, logistics, and merchant application events with automatic retries and signature verification.

online

Notification Subscriptions

Subscribe to persistent, account-level event notifications delivered via email, Slack, or SFTP. Receive settlement reports and operational alerts for merchants and partners.

online

Recurring Payments

Implement subscription billing and recurring charges using tokenization, recurring payment configuration, and Merchant Initiated Transactions.

online

Void a Payment

Reverse a completed payment before settlement. Voiding stops funds from transferring to the merchant's account, avoiding incorrect transactions.

in-store

Receipts

Generate, email, print, and customise receipts for in-store transactions using the Surfboard Receipts API.

online

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.

online

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.

in-store

Tips Configuration

Configure tipping on Surfboard payment terminals at the merchant, store, or terminal level using a hierarchical override model.

in-store

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.

online

Partial Payments

Split an order across multiple payment methods or transactions. Accept card, cash, and Swish in any combination to settle a single order.

in-store

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.

online

Store Management

Create, update, verify, and manage in-store and online stores using the Surfboard Payments Store APIs.

online

Gift Cards & Promotions

Issue and manage gift cards, track transactions, and create marketing promotions using the Surfboard Payments APIs.

online

Product Catalog

Create and manage product catalogs, products, variants, inventory levels, and analytics through the Catalog API.

online

Settlements & Reporting

Retrieve settlement reports, view adjustments, manage merchant charges, and register customer profiles for reconciliation and billing.

online

Account & Service Provider Management

Create merchant and partner accounts, manage user roles, register service providers, and configure external notifications via the Surfboard API.

online

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.

online

Client Auth Tokens

Generate client-side authentication tokens for secure API access from browsers and mobile apps without exposing your API key or secret.

online

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.