surfboard_white
Published blog

Simplifying Your Payment Integration

3 min read

Modern software providers need to operate seamlessly across both physical devices and online channels. At Surfboard Payments, our platform is designed to streamline the integration process, allowing you to implement secure, cross-channel (omni-payment) solutions quickly and efficiently. In this post, we’ll cover the basic flows—from creating an order to initiating a payment. We also explain how you can start a transaction online and complete it in-person, with practical code examples to help you get started.

Overview

Our platform provides a consistent integration experience regardless of the payment channel. Whether you’re connecting to a physical payment terminal or integrating online payments, the underlying processes share similar endpoints and security standards. Our solution supports omni-payments, enabling scenarios where a customer can reserve an amount online and then complete the full payment in-person.


In-Person Payment Integration

In-person payment integration involves managing transactions across various physical devices — from countertop terminals to mobile SoftPOS devices. Our guides and APIs ensure that the process is straightforward, secure, and consistent.

Step 1: Creating an Order

Begin by creating an order using our API. The endpoint accepts order details such as the order ID, amount, currency, and list of items.

cURL Example

curl  -d '{
  "terminal$id": "813bee989f08500405",
  "type": "purchase",
  "referenceId": "orderabc",
  "orderLines": [
    {
      "id": "1234",
      "name": "Bucket hat",
      "quantity": 1,
      "itemAmount": {
        "regular": 2000,
        "total": 2000,
        "currency": "SEK",
        "tax": [
          {
            "amount": 200,
            "percentage": 10,
            "type": "vat"
          }
        ]
      }
    }
  ]
}'
-H 'Content-Type: application/json' \
-H 'API-KEY: YOUR_API_KEY' \
-H 'API-SECRET: YOUR_API_SECRET' \
-H 'MERCHANT-ID: YOUR_MERCHANT_ID' \
YOUR_API_URL/orders

Step 2: Initiating the Payment

Once the order is created, initiate the payment for an in-person transaction. This process communicates with the designated payment terminal and handles the transaction details.

cURL Example

curl -d '{
  "orderId": "o_RelSnor1A6gqgKzZxrbM7",
  "paymentMethod": "CARD"
}' \
-H 'Content-Type: application/json' \
-H 'API-KEY: YOUR_API_KEY' \
-H 'API-SECRET: YOUR_API_SECRET' \
-H 'MERCHANT-ID: YOUR_MERCHANT_ID' \
YOUR_API_URL/payments

Omni-Payments: Bridging Online and In-Person Experiences

A powerful feature of our platform is the ability to support omni-payments. This approach allows a customer to begin a payment online and complete it in-person. For example, you might reserve an amount online via an order creation and partial payment process, then finalize the transaction using a physical terminal when the customer visits your location. This flexibility ensures that your business can offer a seamless and adaptable payment experience across all channels.

The flow is similar, but with initiating a partial payment instead of a full one. You simply update the order, and initiate another partial payment.

Update order

cURL Example

curl  -d '{
  "terminal$id": "813bee989f08500405",
  "type": "purchase",
  "orderLines": [
    {
      "id": "1234",
      "name": "Bucket hat",
      "quantity": 1,
      "itemAmount": {
        "regular": 2000,
        "total": 2000,
        "currency": "SEK",
        "tax": [
          {
            "amount": 200,
            "percentage": 10,
            "type": "vat"
          }
        ]
      }
    }
  ]
}' \
-H 'Content-Type: application/json' \
-H 'API-KEY: YOUR_API_KEY' \
-H 'API-SECRET: YOUR_API_SECRET' \
-H 'MERCHANT-ID: YOUR_MERCHANT_ID' \
YOUR_API_URL/orders/:orderId

Initiate a partial payment

  1. Start by making a POST request to the Initiate a Payment API.
  2. Include the following key parameters:
  • orderId: The unique identifier for the order you're initiating a partial payment for.
  • paymentMethod: Specify the method by which the payment will be processed. Default payment method is ’CARD’
  • amount: Input the partial sum that the customer agrees to pay at this time.
  1. You will get a response containing the paymentId. This ID is required to fetch payment status, performing a refund etc.
  2. Store the Payment ID securely and associate it with an identifiable record in your system for easy retrieval.
  3. Merchants can now accept payments from customers using the selected payment method. For card payments, merchants can accept payments through our payment acceptance terminals.
  4. Repeat the aforementioned steps for initiating partial payments until the total order amount is fully paid. Keep in mind that the order will only be completed when all the initiated partial payments are processed and their sum equals the total order amount.
In the example below, the customer is making a partial payment of 10 SEK, represented as 1000 in the smallest currency unit. If the total order amount is 50 SEK, repeat these steps for additional partial payments until the cumulative total reaches 50 SEK. The order will be marked as complete only once all partial payments add up to the full order amount.
curl -d '{
  "orderId": "o_RelSnor1A6gqgKzZxrbM7",
  "paymentMethod": "CARD"
  "amount": 1000
}' \
-H 'Content-Type: application/json' \
-H 'API-KEY: YOUR_API_KEY' \
-H 'API-SECRET: YOUR_API_SECRET' \
-H 'MERCHANT-ID: YOUR_MERCHANT_ID' \
YOUR_API_URL/payments

Key Benefits

  • Unified Integration Experience: Use a consistent API approach for both in-person and online payments.
  • Omni-Payments Capability: Enable customers to switch between online and in-person channels effortlessly.
  • Ease of Integration: Comprehensive documentation and code examples reduce development time.
  • Cross-Channel Compatibility: Seamlessly support various hardware devices and online payment methods.
  • Scalability and Security: Our platform is designed to grow with your business while maintaining high security standards.
🧑‍💻 Developer access: Get started with our platform now and accept payments already tonight. Sign up as a developer »

Let's discuss payment solutions

By submitting this form, you consent to allow Surfboard Payments to store and process the personal information above to provide you with the content requested.

Checkout our products

Take a look at our products which includes both hardware-, and software-based payment solutions

SurfTouch

Hardware terminal

Our all-in-one handheld smart terminal device with scanner. Possible to mount in the countertop with a charger stand

SurfPrint

Hardware terminal

Our all-in-one handheld smart terminal device with scanner and printer. Good fit for restaurants, cafés, and bars

SurfPad

Hardware terminal

With a physical keypad. Perfect as a card terminal replacement, or paired with a customer-facing tablet screen

SurfAlone

Hardware terminal

Our unattended payment terminal is designed to seamlessly integrate EV chargers, vending machines, public transport, and beyond.

SurfXpress

SoftPOS

Our 22-inch SoftPOS Android tablet for self-checkout and customer-facing payments.

CheckoutX

Payment application

Our SoftPOS solution is for any Android smartphone, with no extra hardware needed. Can also be used as backup

CheckoutPro

Payment application

The customer-facing screen for multiple payment methods, loyalty, and campaigns. To be accompanied by the SurfPad

CheckoutOnline

Online Payments

Pre-built checkout page through link or SDK for your webshop or app

🍪 We Value Your Privacy

We use cookies for a better browsing experience and to analyze site traffic. Click "Accept" to consent, or "Decline" to refuse non-essential cookies. Learn more in our Privacy Policy.