# 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: MerchantID

## Header parameters:

  - `merchant` (string, required)
    Unique public key provided upon registration and must be shared for identification purposes.
    Example: "api_pk_7b197...ba108f842"

  - `signature` (string, required)
    Request signature that allows verification of merchant authenticity on the payment gateway server.
    Example: "M2E3OTkyNzcz...xMmExODI4"

## Request fields (application/json):

  - `body` (object) — one of:
    - Payment:
      - `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 methods alipay, 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.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 personal 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.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.order_metadata` (object)
        Metadata is useful for storing additional, structured information about an object.
      - `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.
      - `order.type` (string, required)
        Initiates a two-step payment flow.
        Enum: "auth"
      - `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"
    - Subscription payment:
      - `order` (object, required)
        Information required to create an order.
      - `order.product_id` (string, required)
        Unique product identifier of the subscription.
      - `order.product_price_id` (string)
        Unique product price identifier.

Set product_price_id for the subscription flow and to ensure correct pricing, specifically for multi-currency products.


  To get product_price_id, use get product prices request.
      - `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.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.
        Enum: "final"
      - `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.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: same as `order.language` in "Payment" (17 values)
      - `order.website` (string)
        Website from which the transaction took place.
      - `order.order_metadata` (object)
        Metadata is useful for storing additional, structured information about an object.
      - `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.
      - `order.type` (string, required)
        Initiates a two-step payment flow.
        Enum: same as `order.type` in "Payment" (1 values)
      - `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)
        RL 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.

## Response 200 fields (application/json):

  - `body` (object) — one of:
    - Success:
      - `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"
    - Authentication failed:
      - `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.
        Example: ["Authentication failed"]
    - Error:
      - `error` (object, required)
        Error object.
      - `error.code` (string, required)
        Error code.
        Example: "2.01"
      - `error.message` (object, required)
        An object provide details about the error or status.


  Contain key-value pairs explaining the issue in more detail.


