# Create link

Payment links are code-free and reusable, allowing you to share them as many times as needed.

Endpoint: POST /link/init
Version: 1.0.0
Security: merchant, signature

## Header parameters:

  - `merchant` (string, required)

  - `signature` (string, required)

## Request fields (application/json):

  - `order` (object, required)
    Information required to create an order.

  - `order.amount` (integer, required)
    Order amount in the smallest currency unit (cents for euros).
For instance, 1020 means 10 EUR and 20 cents.However, the value 0 is valid only for a zero-amount authorization flow.

  - `order.currency` (string, required)
    Three-letter ISO-4217 currency code of the product price currency.

  - `order.future_usage` (object)
    Defines the usage of stored payment credentials.

  - `order.future_usage.payment_type` (string)
    Payment type for future usage.
Should be provided for alternative payment methodsalipay, bizum, mbway or wechatpay.
    Enum: "one-time", "unscheduled"

  - `order.order_description` (string)
    A description of the order.
Highly recommended to keep the description brief to improve the clarity of payment processing, ideally not exceeding 100 characters.It is used in the email receipt sent to the customer.

  - `order.type` (string, required)
    Initiates a two-step payment flow.
    Enum: "auth"

  - `order.settle_interval` (integer)
    Delay before automatic transaction settlement in hours.
- `240` hours = 10 days for Visa customer-initiated payments
- `120` hours = 5 days for Visa merchant-initiated payments
- `168` hours = 7 days for all other card brands

Highly recommended to check validation for PSP limits.If null, the responsibility for initiating the second stage of the payment via a separate settle request is on the API user.

  - `order.authorization_type` (string)
    Authorization type that defines the transaction flow and capabilities.
- final - standard authorization, no increments allowed
- estimated - initial authorization with possible amount changes
    Enum: "final", "estimated"

  - `order.google_pay_allowed_auth_methods` (array)
    Array of allowed Google Pay authorization methods.
- `PAN_ONLY` - this authentication method is associated with payment cards stored on file with the user’s Google Account. Returned payment data includes primary account number (PAN) with the expiration month and the expiration year.
- `CRYPTOGRAM_3DS` - this authentication method is associated with cards stored as Android device tokens. Returned payment data includes a 3D Secure (3DS) cryptogram generated on the device.

The capability to transmit only PAN_ONLY or CRYPTOGRAM_3DS is also available, and such transmission will work for both one-time payments and subscriptions.

  - `order.dynamic_descriptor` (object)
    Optional dynamic suffix appended to the statement descriptor shown on the cardholder's bank statement.

  - `order.dynamic_descriptor.suffix` (string, required)
    Dynamic part of the billing descriptor that appears on the cardholder's bank statement.
Must match ASCII alphanumeric characters, punctuation, and spaces. Must not contain the ^ symbol.
    Example: PRODUCTX

  - `order.payment_type_data` (object)
    Additional customer data to process payments in specific locations.
If the customer later enters a value on the page, that value takes precedence over the data sent in this object.

  - `order.payment_type_data.klarna_network_session_token` (string)
    Klarna Web SDK session token.
Highly recommended for Klarna boost features like Express Checkout, On-Site Messaging, and Sign in with Klarna. Enables session continuity and pre-filled customer details.Obtain the token from the Klarna Web SDK and always use the latest value. Never reuse a consumed token.

  - `order.payment_type_data.klarna_network_data` (string)
    Klarna Network Data (KND). Structured JSON pass-through carrying Klarna payment context across the payment lifecycle.
Highly recommended to include supplementary purchase data, for example order line items, as described in how to send Klarna Network Data.

  - `order.payment_type_data.sweden_pin` (string)
    Swedish personal identity number for customers in Sweden.
    Example: 19811228-9874

  - `order.payment_type_data.norway_nin` (string)
    Norwegian national identity number for customers in Norway.
    Example: 01017012345

  - `order.payment_type_data.italy_cf` (string)
    Italian tax code, codice fiscale, for customers in Italy.
    Example: RSSMRA85M01H501Z

  - `order.payment_type_data.finland_hetu` (string)
    Finnish personal identity code for customers in Finland.
    Example: 131052-308T

  - `order.payment_type_data.spain_dni` (string)
    Spanish national ID, DNI, for customers in Spain.
    Example: 12345678Z

  - `order.payment_type_data.denmark_cpr` (string)
    Danish civil registration number for customers in Denmark.
    Example: 120578-1234

  - `order.payment_type_data.usa_ssn` (string)
    US Social Security Number for customers in the United States.
    Example: 123-45-6789

  - `order.traffic_source` (string)
    Identifies the marketing or acquisition channel that brought the customer to the transaction.

  - `order.transaction_source` (string)
    Identifies the internal system or flow that triggered the transaction.

  - `order.language` (string)
    Payment link language that customers can change to English.
It is also used to translate the email receipt to supported languages. If no language is specified, the email receipt defaults to English.
    Enum: "cs", "da", "de", "el", "en", "es", "fi", "fr", "it", "nl", "no", "pl", "pt", "ro", "sk", "sv", "uk"

  - `order.website` (string)
    Website from which the transaction took place.

  - `order.success_url` (string)
    URL for browser redirect after a successful payment.

  - `order.fail_url` (string)
    URL for browser redirect after a failed payment.
Should not be provided if you want to use the user's card details on a failed payment  for retry logic.

  - `page_customization` (object, required)
    Information required to customize the payment page display.

  - `page_customization.public_name` (string, required)
    Shop name.
It is visible to customers on the payment page.

  - `page_customization.order_title` (string)
    Names of goods or services you sell are visible to customers on the payment page.

  - `page_customization.order_description` (string)
    A description of the order.
Highly recommended to keep the description brief to improve the clarity of payment processing, ideally not exceeding 100 characters.It is used in the email receipt sent to the customer.

  - `page_customization.payment_methods` (array)
    Additional alternative payment methods.

  - `page_customization.button_font_color` (string)
    Color of the font on the Pay Button.
Highly recommended to use HEX format.

  - `page_customization.button_color` (string)
    Color of the Pay Button.
Highly recommended to use HEX format.

  - `page_customization.font_name` (string)
    Font name on the payment page.
Highly recommended to use the Google Font name.

  - `page_customization.is_cardholder_visible` (boolean)
    Display the field cardholder on the payment page.
If the field is accepted as true, it will be displayed.

  - `page_customization.terms_url` (string)
    URL for the merchant Terms & Conditions will be attached to the checkbox.

  - `page_customization.back_url` (string)
    URL where the customer should be redirected in case of clicks the Back button.
Passing this parameter will add a Back button on your payment and status pages.

  - `configuration` (object)
    Configuration settings for the payment link.

  - `configuration.usage_mode` (string)
    Determines the payment link usage mode.
- reusable allows multiple successful payments
- single_use only one successful payment allowed per link
    Enum: "reusable", "single_use"

  - `configuration.amount_setter` (string)
    Defines the method for setting the payment amount.
- merchant the merchant sets the amount directly
- payer the amount is determined based on payer input
    Enum: "merchant", "payer"

## Response 200 fields (application/json):

  - `url` (string, required)
    Specific URL where the customer should be directed to complete their transaction.
    Example: https://payment-page.solidgate.com/link/Q6J3212g7K

  - `id` (string, required)
    Unique payment link identifier.
    Example: Q6J3212g7K

  - `error` (object, required)
    Error object.

  - `error.code` (string, required)
    Unauthorized access due to invalid credentials.
    Example: 1.01

  - `error.message` (array, required)
    Array of error messages applied to the decline payment.

