Developers Guides Gift Cards & Promotions

Gift Cards & Promotions

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

Online API Gift Cards Promotions Commerce

Overview

Surfboard Payments provides APIs for two complementary commerce features: gift cards for stored-value and entitlement-based programs, and promotions for marketing campaigns displayed across merchant channels. This guide covers creating and managing both, with full API details and request/response examples.

Gift Cards

Gift cards in Surfboard come in two types:

  • FUND — A stored monetary balance. Customers spend down the balance over one or more transactions.
  • ENTITLEMENT — A usage-limited card. Instead of a cash value, the card grants a fixed number of redemptions (e.g., “5 free coffees”).

Create a Gift Card

POST /gift-cards

FUND Type Request

{
  "cardType": "FUND",
  "amount": 500,
  "currency": "SEK",
  "name": "Holiday Gift Card",
  "accessControl": "OPEN",
  "expiryDate": "12/31/2026",
  "note": "Happy Holidays!"
}

ENTITLEMENT Type Request

{
  "cardType": "ENTITLEMENT",
  "redemptionLimit": 10,
  "name": "Loyalty Reward Card",
  "accessControl": "OPEN",
  "expiryDate": "06/30/2027",
  "note": "Thank you for being a valued customer"
}

Request Parameters

ParameterTypeRequiredDescription
cardTypestringYesFUND or ENTITLEMENT
amountnumberConditionalMonetary amount in smallest currency unit. Required for FUND type
redemptionLimitnumberConditionalNumber of allowed uses. Required for ENTITLEMENT type
currencystringNoISO currency code (e.g., SEK, EUR)
namestringNoDisplay name for the gift card
accessControlstringNoAccess control level (e.g., OPEN)
expiryDatestringNoExpiry date in mm/dd/yyyy or mm-dd-yyyy format
notestringNoOptional note or message

Response

{
  "status": "SUCCESS",
  "data": {
    "giftCardId": "gc-abc-123",
    "pan": "6789012345678901",
    "name": "Holiday Gift Card",
    "cardType": "FUND",
    "amount": 500,
    "currency": "SEK",
    "accessControl": "OPEN",
    "status": "ACTIVE",
    "expiryDate": "12/31/2026",
    "shareableLink": "https://giftcards.surfboardpayments.com/gc-abc-123",
    "formats": {
      "qrCode": "data:image/png;base64,...",
      "nfcData": "NFC_ENCODED_DATA",
      "barcode": "data:image/png;base64,..."
    },
    "externalId": "ext-001",
    "externalIdType": "CUSTOM"
  },
  "message": "Gift card created successfully"
}

The response includes multiple format representations (QR code, NFC data, barcode) for flexible distribution. The shareableLink provides a URL that can be sent directly to the recipient.

List All Gift Cards

Retrieve a paginated list of all gift cards for a merchant, with optional filtering.

GET /gift-cards

Query Parameters

ParameterTypeRequiredDescription
typestringNoFilter by card type: FUND or ENTITLEMENT
statusstringNoFilter by card status

Response

{
  "status": "SUCCESS",
  "data": [
    {
      "giftCardId": "gc-abc-123",
      "pan": "6789012345678901",
      "name": "Holiday Gift Card",
      "cardType": "FUND",
      "amount": 500,
      "currentAmount": 350,
      "usageCount": 2,
      "currency": "SEK",
      "accessControl": "OPEN",
      "status": "ACTIVE",
      "expiryDate": "12/31/2026",
      "lastTransactionAt": "2026-01-15T14:30:00Z",
      "transactionCount": 2,
      "totalRedeemed": 150
    }
  ],
  "message": "Gift cards fetched successfully"
}

Note the tracking fields: currentAmount shows the remaining balance for FUND cards, usageCount tracks how many times the card has been used, and totalRedeemed shows the cumulative amount spent.

Get Gift Card Details

Retrieve full details for a single gift card, including customer information and format representations.

GET /gift-cards/:id

Response

{
  "status": "SUCCESS",
  "data": {
    "giftCardId": "gc-abc-123",
    "pan": "6789012345678901",
    "name": "Holiday Gift Card",
    "cardType": "FUND",
    "amount": 500,
    "currentAmount": 350,
    "usageCount": 2,
    "currency": "SEK",
    "status": "ACTIVE",
    "expiryDate": "12/31/2026",
    "lastTransactionAt": "2026-01-15T14:30:00Z",
    "transactionCount": 2,
    "totalRedeemed": 150,
    "customerDetails": {
      "customerId": "cust-456",
      "firstName": "Anna",
      "surname": "Svensson",
      "countryCode": "SE",
      "emails": [{ "email": "anna@example.com" }],
      "phoneNumbers": [
        {
          "phoneNumber": {
            "countryCode": "46",
            "number": "701234567"
          }
        }
      ]
    },
    "shareableLink": "https://giftcards.surfboardpayments.com/gc-abc-123",
    "formats": {
      "qrCode": "data:image/png;base64,...",
      "nfcData": "NFC_ENCODED_DATA",
      "barcode": "data:image/png;base64,..."
    }
  },
  "message": "Gift card details fetched successfully"
}

Get Gift Card Transactions

View the transaction history for a specific gift card. Supports filtering by transaction type and pagination via the x-page-number header.

GET /gift-cards/:giftCardId/transactions

Query Parameters

ParameterTypeRequiredDescription
transactionTypestringNoFilter by type: ISSUED, CREDIT, or DEBIT

Response

{
  "status": "SUCCESS",
  "data": [
    {
      "paymentId": "pay-789",
      "transactionType": "DEBIT",
      "transactionAmount": 150,
      "currency": "SEK",
      "valueBefore": 500,
      "valueAfter": 350,
      "orderId": "order-456",
      "merchantId": "merchant-xyz-789",
      "storeId": "store-abc-123",
      "metadata": {}
    },
    {
      "paymentId": "pay-001",
      "transactionType": "ISSUED",
      "transactionAmount": 500,
      "currency": "SEK",
      "valueBefore": 0,
      "valueAfter": 500,
      "merchantId": "merchant-xyz-789",
      "metadata": {}
    }
  ],
  "message": "Transactions fetched successfully"
}

Each transaction record shows the valueBefore and valueAfter fields, giving a clear audit trail of the gift card balance over time.

Promotions

Promotions let you create and manage marketing campaigns that appear across merchant channels, such as on payment terminals, receipts, and idle screens. Each promotion is scoped to a specific merchant and store.

Create a Promotion

POST /merchants/:merchantId/stores/:storeId/promotions

Request

{
  "title": "Summer Sale",
  "name": "summer-sale-2026",
  "description": "50% off all summer items",
  "assetUrl": "https://cdn.example.com/promo-summer.png",
  "type": "RECEIPT_BIG",
  "assetOpacity": "0.8",
  "backgroundColor": "#1e3a5f",
  "contentTextColor": "#ffffff",
  "endProductUrl": "https://shop.example.com/summer",
  "endProduct": "SUMMER-COLLECTION",
  "buttonLabel": "Shop Now",
  "priority": 1,
  "startDate": "06-01-2026",
  "endDate": "08-31-2026"
}

Request Parameters

ParameterTypeRequiredDescription
namestringYesUnique name for the promotion
typestringYesPromotion type (e.g., RECEIPT_BIG, RECEIPT_SMALL)
prioritynumberYesDisplay priority. Lower numbers = higher priority
startDatestringYesStart date in MM-DD-YYYY format
endDatestringYesEnd date in MM-DD-YYYY format
titlestringNoDisplay title for the promotion
descriptionstringNoBrief description of the promotion
assetUrlstringNoURL of the promotional image
assetOpacitystringNoImage opacity, 0 (transparent) to 1 (opaque)
backgroundColorstringNoBackground color in hex format
contentTextColorstringNoText color in hex format
endProductUrlstringNoURL of the promoted product
endProductstringNoProduct ID linked to the promotion
buttonLabelstringNoLabel for the call-to-action button

Response

{
  "status": "SUCCESS",
  "data": {
    "promotionId": "promo-abc-456"
  },
  "message": "Promotion created successfully"
}

List All Promotions

Retrieve all promotions for a merchant’s store to view, manage, and track active and past campaigns.

GET /merchants/:merchantId/stores/:storeId/promotions

Response

{
  "status": "SUCCESS",
  "data": [
    {
      "promotionId": "promo-abc-456",
      "merchantId": "merchant-xyz-789",
      "storeId": "store-abc-123",
      "name": "summer-sale-2026",
      "title": "Summer Sale",
      "description": "50% off all summer items",
      "assetUrl": "https://cdn.example.com/promo-summer.png",
      "endProduct": "SUMMER-COLLECTION",
      "buttonLabel": "Shop Now",
      "startDate": "2026-06-01T00:00:00Z",
      "endDate": "2026-08-31T00:00:00Z",
      "priority": "1",
      "assetOpacity": "0.8",
      "backgroundColor": "#1e3a5f",
      "contentTextColor": "#ffffff",
      "endProductUrl": "https://shop.example.com/summer"
    }
  ],
  "message": "Promotions fetched successfully"
}

Get Promotion by ID

Retrieve the full configuration and current state of a single promotion.

GET /merchants/:merchantId/stores/:storeId/promotions/:promotionId

The response structure is identical to a single item in the list response above.

Update a Promotion

Modify any attributes of an existing promotion. Send only the fields you want to change.

PUT /merchants/:merchantId/stores/:storeId/promotions/:promotionId

Request

{
  "description": "Up to 60% off all summer items - extended!",
  "endDate": "09-30-2026",
  "priority": 1
}

All fields are optional. The response confirms the update:

{
  "status": "SUCCESS",
  "message": "Promotion updated successfully"
}

Delete a Promotion

Permanently remove a promotion and its associated data.

DELETE /merchants/:merchantId/stores/:storeId/promotions/:promotionId

Response

{
  "status": "SUCCESS",
  "message": "Promotion deleted successfully"
}

Warning: Deletion is permanent. The promotion will no longer be active or visible on any channel.

API Quick Reference

OperationMethodEndpoint
Create gift cardPOST/gift-cards
List all gift cardsGET/gift-cards
Get gift card detailsGET/gift-cards/:id
Get gift card transactionsGET/gift-cards/:giftCardId/transactions
Create promotionPOST/merchants/:merchantId/stores/:storeId/promotions
List all promotionsGET/merchants/:merchantId/stores/:storeId/promotions
Get promotion by IDGET/merchants/:merchantId/stores/:storeId/promotions/:promotionId
Update promotionPUT/merchants/:merchantId/stores/:storeId/promotions/:promotionId
Delete promotionDELETE/merchants/:merchantId/stores/:storeId/promotions/:promotionId

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

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 & Notifications

Receive real-time event notifications via webhooks, email, Slack, and SFTP. Subscribe to payment events and settlement reports 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

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.