---
title: "Create an offline pay-by-link order"
method: POST
path: "/v2/instore/paybylink/orders"
tags: ["Instore"]
---

# Create an offline pay-by-link order

`POST /v2/instore/paybylink/orders`

## Request

- Base URL: `https://integration.api.scalapay.com`
- URL: `https://integration.api.scalapay.com/v2/instore/paybylink/orders`
- Auth: API key in header `Authorization`
- TypeScript: <https://skmtc.dev/scalapay/apis/scalapay-api/docs/v2/instore/paybylink/orders/post.ts> (a function with typed inputs; its response is checked against the schema)

Create an offline pay-by-link order and notify the customer using the extensions. Use the correct device Bearer token, not the merchant token.

## Request body

- object
  - `totalAmount` Amount, required: The monetary amount.
    - `amount` string, required: Monetary value. Example: 187.95.
    - `currency` string, required: Currency code.
  - `merchantReference` string: Merchant reference for tracking the order in your system.
  - `type` string
  - `items` object[]: List of items in the order.
    - `gtin` string: Global Trade Item Number (UPC, EAN, JAN, ISBN, ITF-14).
    - `quantity` integer, required: Quantity of the item.
    - `price` Amount, required: The monetary amount.
      - `amount` string, required: Monetary value. Example: 187.95.
      - `currency` string, required: Currency code.
    - `name` string, required: Name of the item.
    - `category` string, required: Category of the item.
    - `subcategory` string[]: Subcategories of the item.
    - `sku` string, required: Stock Keeping Unit (SKU) code.
    - `brand` string: Brand name.
    - `pageUrl` string: URL of the product page.
    - `imageUrl` string: URL of the product image.
  - `extensions` Extensions: Additional extension properties for the order.
    - `industry` object: Industry-specific extensions.
      - `travel` object: Travel-related extension information.
        - `startDate` string, date: Travel start date.
        - `endDate` string, date: Travel end date.
    - `type` object: Extensions for link orders.
      - `link` object: Extensions for orders created via a link.
        - `notification` object, required: Notification details for the order.
          - `phoneCountryCode` string: Customer phone number country code. Required if SMS is selected as a notification channel.
          - `phoneNumber` string: Customer phone number. Required if SMS is selected as a notification channel.
          - `preferredLanguage` '' | 'english' | 'italiano' | 'francais' | 'deutsch' | 'espanol' | 'dutch' | 'suomi' | 'portuguese': Customer's preferred language.
          - `emailAddress` string: Customer email address. Required if email is selected as a notification channel.
          - `channels` string[], required: Notification channels to use. Choose "email" and/or "sms".

## Response `200`

Offline pay-by-link order created successfully.

## Other responses

- `400`: Bad request
- `401`: Unauthorized

---

[API](https://skmtc.dev/scalapay/apis/scalapay-api.md) - [All operations](https://skmtc.dev/scalapay/apis/scalapay-api/llms.txt) - [OpenAPI document](https://skmtc.dev/scalapay/apis/scalapay-api/revisions/175c16830418?raw)
