---
title: "Initiate subscription from offer in the server to server process"
method: POST
path: "/subscription/offer/{subscriptionOfferId}/initiate-server"
tags: ["Subscription"]
---

# Initiate subscription from offer in the server to server process

`POST /subscription/offer/{subscriptionOfferId}/initiate-server`

ℹ️ **Note:** To transmit card information directly through this API (server-to-server), replace the default base URL with `https://api-card.inflowpay.com` — contact support to get the required authorization.

**If you are not transmitting card information directly (e.g. you're using our SDK to collect card details), keep the default base URL.**

Initiates a new subscription from an existing offer

## Path parameters

- `subscriptionOfferId` string, required

## Request body

- ApiInitiateServerSubscriptionDto
  - `card` CardInfoDto
    - `number` string, required — Card number (13-19 digits)
    - `expiration_month` number, required — Card expiration month (1-12)
    - `expiration_year` number, required — Card expiration year (4 digits)
    - `cvc` string, required — Card security code (CVC/CVV, 3-4 digits)
  - `items` CatalogItemRefDto[] — The list of catalog references to purchase (priceId or productId + quantity), resolved against your catalog. Provide either products or items, not both.
    - `priceId` string — The immutable price to charge. Provide either priceId or productId.
    - `productId` string — The product to charge; its active price in the payment currency is used. Provide either priceId or productId.
    - `quantity` number, required — The quantity to purchase
  - `customerEmail` string, email, required — Customer email address
  - `savePaymentMethod` boolean — Whether to save the payment method. Cannot be used if useCustomerPaymentMethod is true.
  - `useCustomerPaymentMethod` boolean — Whether to use the last saved customer payment method. Cannot be used if savePaymentMethod is true.
  - `offSession` boolean — Off-session payment (payer absent), Merchant Initiated. Requires a saved payment method (useCustomerPaymentMethod) and that the merchant is allowed to use off-session payments. Cannot be combined with force3ds or with card information.
  - `force3ds` boolean — Force an on-session (payer present) 3DS browser challenge. With card information the 3DS is forced even if it would not normally be required. With useCustomerPaymentMethod the browser 3DS is performed before charging. Cannot be combined with offSession.
  - `billingCountry` string, required — Billing country code (ISO 3166-1 alpha-2)
  - `postalCode` string — Billing postal code (required for some countries like US)
  - `purchasingAsBusiness` boolean, required — Whether the purchase is for a business
  - `businessName` string — Business name (required if purchasingAsBusiness is true)
  - `taxId` string — Business tax ID (required if purchasingAsBusiness is true)
  - `firstName` string — First name, is optional but can cause issues with the 3DS authentication if not provided
  - `lastName` string — Last name, is optional but can cause issues with the 3DS authentication if not provided
  - `metadatas` object — Optional metadata (key-value pairs)
  - `autoConfirm` boolean — Auto-confirm the payment (default false). When enabled, the payment is processed immediately if no 3DS step is required, or right after a successful 3DS authentication.
  - `pricingMode` 'TAX_EXCLUSIVE' | 'TAX_INCLUSIVE' — Pricing mode for the products. TAX_EXCLUSIVE (default): Product prices are excluding tax (HT), tax is added on top to calculate the final amount. TAX_INCLUSIVE: Product prices include tax (TTC), tax is extracted from the total while keeping the final amount fixed.
  - `threeDsSuccessUrl` string — URL to redirect to after successful 3DS authentication, only required if card information is provided
  - `threeDsFailureUrl` string — URL to redirect to after failed 3DS authentication, only required if card information is provided
  - `marketplaceFeeInCents` number — Connect only: explicit marketplace take on this payin in cents. Only the parent marketplace may set this for sub-merchant payins (X-On-Behalf-Of). When omitted, the marketplace default from settings applies at checkout success.
  - `captureMode` 'AUTOMATIC' | 'MANUAL' — Capture mode for card payments. AUTOMATIC (default): funds are captured when the customer pays. MANUAL: funds are authorized at checkout and must be captured later via POST /api/payment/:paymentId/capture (full amount only).
  - `statementDescriptor` string — Optional statement descriptor (max 11 characters) shown on the customer's bank statement as 'INFLOWPAY* <descriptor>'. Falls back to the account-level statement descriptor if omitted.
  - `label` string — Optional label for the subscription that overrides the offer name. If not provided, the subscription offer's name is used.

## Response `200`

Initiate subscription from offer in the server to server process successful

- InitiateServerSubscriptionResponse
  - `type` 'payment' | 'setup', required — Discriminator of the result. `payment` when the first cycle / entry fee is charged (a PaymentIntent is created). `setup` when no charge occurs (free trial or waitlist): only a payment method is collected via a PaymentSetup. When `setup` is returned without a payment method provided at init (no `tokenIntentId` / `useCustomerPaymentMethod`), the collection is deferred: use `paymentSetup.id` with the SDK endpoints (`GET /sdk/customer-payment-method/:id` then `POST /sdk/customer-payment-method/confirm`).
  - `payment` ApiPaymentDto
    - `id` string, required — The id of the payment
    - `amount` number, required — The amount of the payment in cents, this has been calculated from the products prices and quantities
    - `customerEmail` string, required — The email of the customer
    - `customerId` string, nullable — The id of the customer
    - `currency` 'EUR' | 'GBP' | 'USD', required — The currency of the payment, this currency will refer to product list prices
    - `products` ProductDto[], required — The products list
      - `name` string, required — The name of the product
      - `price` number, required — The price of the product in cents
      - `quantity` number, required — The quantity of the product
    - `metadatas` object — The metadatas of the payment
    - `status` 'INITIATION' | 'CHECKOUT_PENDING' | 'CHECKOUT_AUTHORIZED' | 'CHECKOUT_SUCCESS' | 'CHECKOUT_CANCELED' | 'CANCELED' | 'PAYMENT_RECEIVED' | 'PAYMENT_SUCCESS' | 'PAYMENT_FAILED' | 'PARTIAL_REFUNDED' | 'FULLY_REFUNDED' | 'REFUND_PENDING' | 'REFUND_FAILED' | 'DISPUTE_INQUIRY' | 'DISPUTE_INQUIRY_CLOSED' | 'DISPUTE_OPENED' | 'DISPUTE_EVIDENCE_SUBMITTED' | 'DISPUTE_UNDER_REVIEW' | 'DISPUTE_WON' | 'DISPUTE_LOST' | 'DISPUTE_ACCEPTED' | 'DISPUTE_PREVENTED' | 'FRAUD_FLAGGED', required — The status of the payment, exhaustive list of status to come
    - `captureMode` 'AUTOMATIC' | 'MANUAL', required — AUTOMATIC or MANUAL (authorize now, capture later)
    - `authorizedAt` string, date-time, nullable
    - `capturedAmountInCents` number, required — Total amount captured in cents (TTC)
    - `timeline` Timeline[], required — The timeline of the payment
      - `status` string, required — The status of the timeline
      - `date` string, date-time, required — The date of the timeline
      - `amountInCents` number — Refund amount in HT cents for refund-related timeline entries (PARTIAL_REFUNDED, FULLY_REFUNDED, REFUND_PENDING, REFUND_FAILED). Omitted for non-refund lifecycle events.
    - `depositAttempts` PaymentAttemptDto[], required — An history of payment attempts
      - `paymentId` string, required — The id of the payment
      - `status` string, required — The status of the payment attempt
      - `errorMessage` string, nullable, required — The error message of the payment attempt
      - `attemptedAt` string, date-time, required — The date when the payment attempt was made
      - `paymentMethod` 'card' | 'apple_pay' | 'google_pay' | 'open_banking' | 'ideal' | 'sepa_debit', nullable, required — The payment method used for this attempt
      - `paymentError` PaymentErrorDto
        - `code` string, nullable, required — Error code (e.g. 'card_declined')
        - `declineCode` string, nullable, required — Decline code (e.g. 'insufficient_funds')
        - `networkDeclineCode` string, nullable, required — Raw ISO 8583 network decline code (e.g. '51')
        - `message` string, nullable, required — Human-readable error message
        - `networkDeclineMessage` string, nullable, required — Human-readable error message corresponding to the network decline code, when known
    - `transactionSummary` ApiOnrampDestination
      - `currency` string, required — The currency of the payment
      - `finalAmount` string, required — The final amount of the payment
    - `createdAt` string, date-time, required — The creation date of the payment
    - `updatedAt` string, date-time, required — The last update date of the payment
    - `subscriptionId` string, nullable — The subscription id if payment is part of a subscription
    - `taxCountry` string, nullable — The tax country of the payment
    - `amountTaxesIncluded` number, nullable — The total amount including taxes in cents
    - `depositStatus` string, nullable — The status from the deposit payment service provider
    - `lastDepositAttempt` LastDepositAttemptDto
      - `status` string — The status of the last deposit attempt (e.g., 'succeeded', 'failed', 'requires_action')
      - `amount` number — The amount of the last deposit attempt in cents
      - `paymentMethod` 'CARD' | 'DIRECT_BANK_TRANSFER' | 'OPEN_BANKING' | 'NOT_KNOWN' — The payment method used for the last deposit attempt
      - `error` string, nullable — Error code from the last failed deposit attempt (e.g., 'card_declined', 'insufficient_funds')
      - `attemptedAt` string, date-time — Timestamp of the last deposit attempt
      - `paymentError` PaymentErrorDto
        - `code` string, nullable, required — Error code (e.g. 'card_declined')
        - `declineCode` string, nullable, required — Decline code (e.g. 'insufficient_funds')
        - `networkDeclineCode` string, nullable, required — Raw ISO 8583 network decline code (e.g. '51')
        - `message` string, nullable, required — Human-readable error message
        - `networkDeclineMessage` string, nullable, required — Human-readable error message corresponding to the network decline code, when known
    - `taxRateInPercentage` number, nullable — The tax rate in percentage applied to the payment
    - `pricingMode` string, nullable — The pricing mode used for the payment. TAX_EXCLUSIVE (default): Prices are excluding tax (HT), tax is added on top. TAX_INCLUSIVE: Prices include tax (TTC), tax is extracted from total.
    - `lastThreeDsAttempt` LastThreeDsAttemptDto
      - `status` string, required — The status of the last 3DS attempt
      - `cardBrand` string, required — The brand of the card
      - `createdDate` string, date-time, required — The creation date of the last 3DS attempt
    - `expiresAt` string, date-time, nullable — The expiration date of the payment
    - `invoiceUrl` string, nullable — URL to view and download the invoice (available after payment success)
    - `customerPaymentMethod` PaymentCustomerPaymentMethodDto
      - `id` string, required — The id of the saved payment method
      - `type` string, required — The type of the payment method
      - `cardBrand` string, nullable — The card brand
      - `cardLast4` string, nullable — The last 4 digits of the card
  - `paymentSetup` PaymentSetupDto
    - `id` string, required — PaymentSetup id
    - `status` string, required — Setup status: pending | requires_3ds | completed | failed | cancelled
    - `currency` 'EUR' | 'GBP' | 'USD', required
    - `subscriptionId` string, nullable — Subscription this setup is tied to (trial / waitlist)
    - `errorCode` string
    - `errorMessage` string
    - `createdAt` string, date-time, required
    - `updatedAt` string, date-time, required
    - `completedAt` string, date-time, nullable
  - `subscriptionId` string, required — Subscription id created for this initiation.
  - `threeDsSessionUrl` string — URL to complete the 3DS authentication, if applicable

## Other responses

- `400` — Invalid input data
- `401` — Unauthorized - Invalid API key
- `404` — Resource not found

---

[API](https://skmtc.dev/inflowpay/apis/inflow-api.md) · [All operations](https://skmtc.dev/inflowpay/apis/inflow-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/inflowpay/inflow-api/revisions/3012dd3dd14a/schema)
