FlowAlp

Create a Paylink

July 30, 2026

Create a FlowAlp Pay Paylink with POST /Invoice/: a hosted payment link to share by email or QR code. Parameters, examples and errors.

A Paylink is a hosted FlowAlp Pay payment page with a fixed configuration: you create it once and then share it — by e-mail, in an invoice PDF, as a QR code or in a chat message. Customers open the link and pay; no code on your website is required. In the Merchant API the underlying resource is called Invoice.

POSThttps://api.pay.flowalp.com/v1.16/Invoice/v1.14 · v1.15 · v1.16

Use API version v1.16 for new integrations; v1.14 and v1.15 remain supported. Authenticate with the X-API-KEY header and identify your account with the instance query parameter — see Authentication. The body may be sent as application/json (recommended) or application/x-www-form-urlencoded.

Request

Query parameters

ParameterTypeRequiredDescription
instancestringYesName of your merchant instance; identifies your account on every API call.

Body parameters

ParameterTypeRequiredDescription
titlestringYesTitle shown at the top of the hosted payment page.
descriptionstringYesDescriptive text shown on the payment page.
referenceIdstringYesYour own invoice or order identifier; echoed in responses and webhooks.
purposestringYesPurpose of the payment shown to the customer.
amountintegerYesAmount in minor units of the currency; CHF 89.25 becomes 8925.
currencystringYesPayment currency as an ISO 4217 code, for example CHF.
vatRatefloatNoVAT rate in percent. Default: null.
psparray of integersNoIDs of the payment providers to offer for this Paylink.
pmarray of stringsNoPayment method identifiers to display.
skustringNoStock keeping unit of the product.
preAuthorizationbooleanNoAuthorizes the payment method for a later charge instead of charging immediately. Default: false.
reservationbooleanNoReserves the amount for a later capture. Default: false.
namestringNoInternal name of the payment page; visible only to administrators.
fieldsarray of stringsNoNames of the contact data fields to display on the payment page.
hideFieldsbooleanNoHides the whole contact data section on the payment page. Default: false.
buttonTextstringNoCustom label for the pay button.
expirationDatedateNoDate on which the link expires, for example 2026-08-31.
successRedirectUrlstringNoURL the customer is redirected to after a successful payment.
failedRedirectUrlstringNoURL the customer is redirected to after a failed payment.
subscriptionStatebooleanNoHandles the payment as a subscription. Default: false.
subscriptionIntervalstringNoBilling interval of the subscription in period notation, for example P1M.
subscriptionPeriodstringNoTotal duration of the subscription in period notation.
subscriptionCancellationIntervalstringNoPeriod during which the subscription can be cancelled, in period notation.
attachmentsfileNoFile attachments made available to your customer.
isPriceExclusiveVatbooleanNoWhen true, VAT is added on top of amount instead of being included in it.
concardisOrderIdstringNoOrder ID forwarded to the acquirer; only available when the matching option is enabled in your payment provider settings.

Some options depend on your account configuration: provider IDs for psp, method identifiers for pm, subscription settings, attachments and provider-specific parameters such as concardisOrderId only take effect when the matching feature is active on your instance. If an optional parameter is rejected, review your dashboard configuration or contact support.

Example request

Create a Paylink (cURL)bash
curl --request POST \
  --url "https://api.pay.flowalp.com/v1.16/Invoice/?instance=${FLOWALP_PAY_INSTANCE}" \
  --header "X-API-KEY: ${FLOWALP_PAY_API_SECRET}" \
  --header "Content-Type: application/json" \
  --data '{
    "title": "Invoice INV-2026-0042",
    "description": "Consulting services, June 2026",
    "referenceId": "INV-2026-0042",
    "purpose": "Invoice INV-2026-0042",
    "amount": 8925,
    "currency": "CHF",
    "expirationDate": "2026-08-31",
    "successRedirectUrl": "https://shop.example.com/payment/success",
    "failedRedirectUrl": "https://shop.example.com/payment/failed"
  }'
Create a Paylink (PHP SDK)PHP
<?php
use FlowAlpPay\FlowAlpPay;
use FlowAlpPay\Models\Request\Paylink;

$client = new FlowAlpPay(
    getenv('FLOWALP_PAY_INSTANCE'),
    getenv('FLOWALP_PAY_API_SECRET'),
    FlowAlpPay::DEFAULT_COMMUNICATION_HANDLER,
    'pay.flowalp.com',
    '1.16'
);

$paylink = new Paylink();
$paylink->setTitle('Invoice INV-2026-0042');
$paylink->setDescription('Consulting services, June 2026');
$paylink->setReferenceId('INV-2026-0042');
$paylink->setPurpose('Invoice INV-2026-0042');
$paylink->setAmount(8925); // CHF 89.25 in minor units
$paylink->setCurrency('CHF');
$paylink->setSuccessRedirectUrl('https://shop.example.com/payment/success');
$paylink->setFailedRedirectUrl('https://shop.example.com/payment/failed');

$response = $client->create($paylink);

// Share this URL by e-mail or render it as a QR code.
$paylinkUrl = $response->getLink();

Response

The new Paylink is returned inside the success envelope. Send your customer the URL in link — or build the URL from hash — and store id and referenceId in your records. To connect an incoming payment to the Paylink, rely on link or hash, not on referenceId alone.

200 OKJSON
{
  "status": "success",
  "data": [
    {
      "id": 57,
      "hash": "f7d1b2e94c3a48d2a5efb6c17d0a9c31",
      "referenceId": "INV-2026-0042",
      "link": "https://demo-shop.pay.flowalp.com/?payment=f7d1b2e94c3a48d2a5efb6c17d0a9c31",
      "title": "Invoice INV-2026-0042",
      "description": "Consulting services, June 2026",
      "purpose": "Invoice INV-2026-0042",
      "amount": 8925,
      "currency": "CHF",
      "createdAt": "2026-07-30 11:52:08"
    }
  ]
}

Errors

HTTP statusMeaningRecommended action
400The request failed validation, for example a required parameter such as title or referenceId is missing.Fix the request body and send the request again.

Error responses use the envelope {"status": "error", "message": "..."} — see Errors and Rate limits.

Related: the product guide Pay links and QR codes, payment verification with Retrieve and list Paylinks, lifecycle management in Update and delete a Paylink, and payment confirmation via webhooks.