# Create Payment Link

**POST** `/payment-links`

Base URL: `https://api-sandbox.whitelabel.com/v1`

Create Payment Link

## Authorization

- public-api-key (apiKey in header)
- private-secret-key (apiKey in header)

## Body

Content type: `application/json`

- `account_id` (string, required)
  The unique identifier of the account. You find this information on [the WHITELABEL Dashboard](https://dashboard.whitelabel.com/) (MAX 64; MIN 36).
- `description` (string)
  The description of the payment link (MAX 255; MIN 3).
- `country` ("AR" | "BO" | "BR" | "CL" | "CO" | "CR" | "EC" | "SV" | "GT" | "HN" | "MX" | "NI" | "PA" | "PY" | "PE" | "US" | "UY", required)
  The customer's country code (MAX 2; MIN 2; [ISO 3166-1](/reference/country-reference)) **[Required]**.
- `merchant_order_id` (string)
  Identification of the payment link transaction defined by the merchant (MAX 255; MIN 3).
- `amount` (object, required)
  Specifies the payment amount object, with the value and currency.
  - `value` (number<float>, required)
    The payment amount (multiple of 0.0001)
  - `currency` (string, required)
    The currency used to make the payment. For a full list of currency codes, see [Country reference](/reference/country-reference) (MAX 3; MIN 3; ISO 4217).
- `capture` (boolean)
  Decides whether to authorize the payment or capture it. Authorizing a card payment allows you to reserve funds in a customer's bank account. If not set, true by default.
- `type` (string)
  The type of the payment link.
- `status` (string)
  The status of the payment link.
- `payment_method` (object)
  Payment method object (optional).
- `installments_plan` (object)
  Installments plan configuration (optional).
- `timezone` (string)
  Timezone for availability (e.g., UTC +03:00).
- `payments_number` (integer)
  Number of payments associated with this link.
- `split_payment_methods` (boolean)
  Allow split payment methods.
- `taxes` (object[])
  Specifies the payment taxes list.
  - `type` (string)
    Type of the tax.
  - `tax_base` (number<float>)
    The amount base to apply the tax defined.
  - `value` (number<float>)
    The amount of the tax.
  - `percentage` (number<float>)
    The percentage of the tax.
- `customer_payer` (object)
  Specifies customer object for payments.
  - `id` (string)
    The unique identifier of the customer (UUID | MAX 36; MIN 36).
  - `merchant_customer_id` (string)
    The unique identifier of the customer in the external merchant (MAX 255; MIN 3).
  - `first_name` (string)
    The customer's first name (MAX 255; MIN 1).
  - `last_name` (string)
    The customer's last name (MAX 255; MIN 1).
  - `gender` (string)
    The customer's gender (MAX 2; MIN 1; (M=Male/F=Female/NA=Not applicable/NK=Not Known)).
  - `date_of_birth` (string)
    The customer's date of birth in the YYYY-MM-DD format (Length: 10).
  - `email` (string)
    The customer's e-mail (MAX 255; MIN 3).
  - `nationality` (string)
    The customer's nationality (MAX 2; MIN 2; ISO 3166-1).
  - `document` (object)
    Specifies the customer's document object, including its number and type.
    - `document_number` (string, required)
      The document number (MAX 40; MIN 3).
    - `document_type` ("DNI" | "CI" | "LC" | "LE" | "CUIT" | "CUIL" | "PAS" | "CPF" | "RG" | "CNH" | "CNPJ" | "RUT" | "RUN" | "CC" | "CE" | "NIT" | "DUI" | "PIC" | "DPI" | "IFR" | "INE" | "CP" | "RFC" | "CURP" | "CIP" | "CIC" | "CUI" | "RUC" | "")
      Document type (MAX 6; MIN 3; [Country reference](/reference/country-reference)).
  - `phone` (object)
    Specifies the customer's phone number object.
    - `country_code` (string)
      The country calling code of the phone (MAX 5; MIN 1). Check the [country reference](/reference/country-reference) to see the phone codes.
    - `number` (string)
      The phone number, without the country code (MAX 32; MIN 1).
  - `billing_address` (object)
    Specifies the customer's billing address object.
    - `address_line_1` (string)
      The primary address line (MAX 255; MIN 3).
    - `address_line_2` (string)
      The secondary address line (MAX 255; MIN 3).
    - `city` (string)
      The city considered for the address (MAX 255; MIN 3).
    - `country` ("AR" | "BO" | "BR" | "CL" | "CO" | "CR" | "EC" | "SV" | "GT" | "HN" | "MX" | "NI" | "PA" | "PY" | "PE" | "US" | "UY")
      The country (MAX 2; MIN 2; [ISO 3166-1](/reference/country-reference)).
    - `state` (string)
      The state/province from the address (MAX 255; MIN 3).
    - `zip_code` (string)
      The zipcode for the address (MAX 10; MIN 5).
  - `shipping_address` (object)
    Specifies the customer's shipping address object.
    - `address_line_1` (string)
      The primary address line (MAX 255; MIN 3).
    - `address_line_2` (string)
      The secondary address line (MAX 255; MIN 3).
    - `city` (string)
      The city considered for the address (MAX 255; MIN 3).
    - `country` ("AR" | "BO" | "BR" | "CL" | "CO" | "CR" | "EC" | "SV" | "GT" | "HN" | "MX" | "NI" | "PA" | "PY" | "PE" | "US" | "UY")
      The country (MAX 2; MIN 2; [ISO 3166-1](/reference/country-reference)).
    - `state` (string)
      The state/province from the address (MAX 255; MIN 3).
    - `zip_code` (string)
      The zipcode for the address (MAX 10; MIN 5).
  - `ip_address` (string)
    Specifies the customer's IP address (MAX 45; MIN 1).
- `additional_data` (object)
  Specifies the additional_data object. This object is not mandatory. However, if you send this information, the payment experience will be enhanced for your user.
  - `order` (object)
    Specifies the order object.
    - `shipping_amount` (number<float>)
      The shipping amount of the order (multiple of 0.0001)
    - `fee_amount` (number<float>)
      The fee amount of the order (multiple of 0.0001)
    - `items` (object[])
      Specifies the items array of object.
      - `id` (string, required)
        The unique identifier of the item (MAX 255; MIN 1).
      - `name` (string, required)
        The name of the item (MAX 255; MIN 3).
      - `quantity` (integer<int32>, required)
        The quantity of the item.
      - `unit_amount` (number<float>, required)
        The unit amount of the item (multiple of 0.0001).
      - `category` (string)
        The category of the item. Check the Item category reference.
      - `brand` (string)
        The brand of the item (MAX 255; MIN 1).
      - `sku_code` (string)
        The stock keeping unit (SKU) of the item (MAX 255; MIN 1).
      - `manufacture_part_number` (string)
        The manufacture part number of the item (MAX 255; MIN 1).
  - `airline` (object)
    Specifies the airline object.
    - `pnr` (string)
      Passenger name record (MAX 10; MIN 1).
    - `legs` (object[])
      Specifies the legs object.
      - `departure_airport` (string, required)
        IATA code. See http://www.iata.org (MAX 3; MIN 3).
      - `departure_datetime` (string<date>, required)
        The departure date and time in UTC time (ISO 8601, MAX 27; MIN 27).
      - `departure_airport_timezone` (string)
        Airport timezone (MAX 6; MIN 6).
      - `arrival_airport` (string, required)
        IATA airport code. See http://www.iata.org (MAX 3; MIN 3).
      - `carrier_code` (string)
        IATA carrier code. See http://www.iata.org (MAX 2; MIN 2).
      - `carrier_name` (string)
        The name of the airline carrier (MAX 100; MIN 1).
      - `flight_number` (string)
        The flight number assigned by the airline carrier (MAX 5; MIN 1).
      - `fare_basis_code` (string)
        Code base rate provides specific information on the fare in addition to the class service, both required for booking (MAX 15; MIN 1).
      - `fare_class_code` (string)
        The fare class code of the airline (MAX 3; MIN 1). The values can be letters (A-Z) but may vary depending on the airline's definition. Check the [Airline information reference](/reference/airline-information#fare-class-code).
      - `base_fare` (number<float>)
        The transaction amount, excluding taxes and fees, the smallest unit of currency (multiple of 0.0001).
      - `base_fare_currency` (string)
        The currency used for the base fare amount (MAX 3; MIN 3; [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217)).
      - `stopover_code` (string)
        1-letter code that indicates whether the passenger is allowed to make a stopover. Only two types of characters are allowed: O: Stopover allowed (the letter “O”, not zero) / X: Stopover not allowed. (MAX 1; MIN 1).
  - `device` (object)
    Specifies the device object.
    - `locale` (string)
      The locale of the device (MAX 20; e.g. es-CL).
    - `geolocation` (string)
      The geolocation of the device in lat,long format (MAX 255).
    - `event_uuid` (string)
      The unique identifier of the event (MAX 64).
    - `user_agent` (string)
      The user agent of the device (MAX 512).
  - `payer_risk_data` (object)
    Specifies the payer risk data object.
    - `login_platform` (string)
      The platform used to log in (MAX 64; e.g. WEB).
    - `approved_transactions_2m` (integer)
      Number of approved transactions in the last 2 months (MIN 0).
    - `recent_transactions_3h` (integer)
      Number of transactions in the last 3 hours (MIN 0).
    - `is_paid_user` (boolean)
      Indicates whether the payer is a paid user.
    - `account_creation_date` (string)
      The account creation date in YYYYMMDD format (e.g. 20191005).
  - `seller_details` (object)
    Specifies the seller's details object. Only mandatory for PSPs with sub_merchant account information.
    - `name` (string)
      The seller's legal name (MAX 255; MIN 1).
    - `email` (string)
      The seller's e-mail (MAX 255; MIN 1).
    - `reference` (string)
      The seller's identification code (MAX 255; MIN 1).
    - `website` (string)
      The seller's website URL (MAX 255; MIN 1).
    - `industry` (string)
      The seller's industry (MAX 255; MIN 3; Industry category reference).
    - `country` (string)
      The seller's country (MAX 255; MIN 3; ISO 3166-1).
    - `document` (object)
      Specifies the document object of the seller.
      - `document_number` (string, required)
        The document number (MAX 40; MIN 3).
      - `document_type` ("DNI" | "CI" | "LC" | "LE" | "CUIT" | "CUIL" | "PAS" | "CPF" | "RG" | "CNH" | "CNPJ" | "RUT" | "RUN" | "CC" | "CE" | "NIT" | "DUI" | "PIC" | "DPI" | "IFR" | "INE" | "CP" | "RFC" | "CURP" | "CIP" | "CIC" | "CUI" | "RUC" | "")
        Document type (MAX 6, MIN 1; [Country reference](/reference/country-reference)).
    - `phone` (object)
      Specifies the seller's phone number object.
      - `country_code` (string)
        The country calling code of the phone (MAX 5; MIN 1).  Check the [Country reference](/reference/country-reference) to see the phone codes.
      - `number` (string)
        The phone number, without the country code (MAX 32; MIN 1).
    - `address` (object)
      Specifies the seller's address object.
      - `address_line_1` (string)
        The primary address line (MAX 255; MIN 3).
      - `address_line_2` (string)
        The secondary address line (MAX 255; MIN 1).
      - `city` (string)
        The city considered for the address (MAX 255; MIN 3).
      - `country` ("AR" | "BO" | "BR" | "CL" | "CO" | "CR" | "EC" | "SV" | "GT" | "HN" | "MX" | "NI" | "PA" | "PY" | "PE" | "US" | "UY")
        The country (MAX 2; MIN 2; [ISO 3166-1](/reference/country-reference)).
      - `state` (string)
        The state/province from the address (MAX 255; MIN 3).
      - `zip_code` (string)
        The zipcode for the address (MAX 10; MIN 5).
- `callback_url` (string)
  URL to redirect the customer after the payment (MAX 256).
- `one_time_use` (boolean)
  `true` allows only one use, `false` multiple payments
- `availability` (object)
  The availability object. Refers to the Payment Link expiration date.
  - `start_at` (string<date-time>)
    Start of the validity period of the payment link.
  - `finish_at` (string<date-time>)
    End of the validity period of the payment link.
- `payment_method_types` (string[], required)
  The list of types of payment methods that customers can use. Check the available payment methods on [Payment type](/reference/payment-type-list). If no value is passed, WHITELABEL will display the payment methods defined in the dashboard.
- `metadata` (object[])
  Specifies a list of metadata objects. You can add up to 50 metadata objects.
  - `key` (string)
    The metadata key (MAX 48).
  - `value` (string)
    The metadata key value (MAX 512).
- `vault_on_success` (boolean)
  Flag to enroll the card after a successful payment

Example:

```json
{
  "account_id": "string",
  "description": "string",
  "country": "AR",
  "merchant_order_id": "string",
  "amount": {
    "value": 0,
    "currency": "string"
  },
  "capture": true,
  "type": "string",
  "status": "string",
  "payment_method": {},
  "installments_plan": {},
  "timezone": "string",
  "payments_number": 0,
  "split_payment_methods": true,
  "taxes": [
    {
      "type": "string",
      "tax_base": 0,
      "value": 0,
      "percentage": 0
    }
  ],
  "customer_payer": {
    "id": "string",
    "merchant_customer_id": "string",
    "first_name": "string",
    "last_name": "string",
    "gender": "string",
    "date_of_birth": "string",
    "email": "string",
    "nationality": "string",
    "document": {
      "document_number": "string",
      "document_type": "DNI"
    },
    "phone": {
      "country_code": "string",
      "number": "string"
    },
    "billing_address": {
      "address_line_1": "string",
      "address_line_2": "string",
      "city": "string",
      "country": "AR",
      "state": "string",
      "zip_code": "string"
    },
    "shipping_address": {
      "address_line_1": "string",
      "address_line_2": "string",
      "city": "string",
      "country": "AR",
      "state": "string",
      "zip_code": "string"
    },
    "ip_address": "string"
  },
  "additional_data": {
    "order": {
      "shipping_amount": 0,
      "fee_amount": 0,
      "items": [
        {
          "id": "string",
          "name": "string",
          "quantity": 0,
          "unit_amount": 0,
          "category": "string",
          "brand": "string",
          "sku_code": "string",
          "manufacture_part_number": "string"
        }
      ]
    },
    "airline": {
      "pnr": "string",
      "legs": [
        {
          "departure_airport": "string",
          "departure_datetime": "2024-01-01",
          "departure_airport_timezone": "string",
          "arrival_airport": "string",
          "carrier_code": "string",
          "carrier_name": "string",
          "flight_number": "string",
          "fare_basis_code": "string",
          "fare_class_code": "string",
          "base_fare": 0,
          "base_fare_currency": "string",
          "stopover_code": "string"
        }
      ]
    },
    "device": {
      "locale": "string",
      "geolocation": "string",
      "event_uuid": "string",
      "user_agent": "string"
    },
    "payer_risk_data": {
      "login_platform": "string",
      "approved_transactions_2m": 0,
      "recent_transactions_3h": 0,
      "is_paid_user": true,
      "account_creation_date": "string"
    },
    "seller_details": {
      "name": "string",
      "email": "string",
      "reference": "string",
      "website": "string",
      "industry": "string",
      "country": "string",
      "document": {
        "document_number": "string",
        "document_type": "DNI"
      },
      "phone": {
        "country_code": "string",
        "number": "string"
      },
      "address": {
        "address_line_1": "string",
        "address_line_2": "string",
        "city": "string",
        "country": "AR",
        "state": "string",
        "zip_code": "string"
      }
    }
  },
  "callback_url": "string",
  "one_time_use": true,
  "availability": {
    "start_at": "1970-01-01T00:00:00.000Z",
    "finish_at": "1970-01-01T00:00:00.000Z"
  },
  "payment_method_types": [
    "string"
  ],
  "metadata": [
    {
      "key": "string",
      "value": "string"
    }
  ],
  "vault_on_success": true
}
```

## Responses

### 200

200

- `id` (string)
- `country` (string)
- `availability` (object)
  - `start_at` (string)
  - `finish_at` (string)
- `status` (string)
- `merchant_order_id` (string)
- `description` (string)
- `amount` (object)
  - `currency` (string)
  - `value` (integer)
- `capture` (boolean)
- `metadata` (any)
- `split_payment_methods` (boolean)
- `payment_method_types` (string[])
- `one_time_use` (boolean)
- `payments` (any)
- `callback_url` (string)
- `installments_plan` (any)
- `customer_payer` (any)
- `taxes` (any)
- `additional_data` (object)
  - `airline` (any)
  - `order` (any)
  - `seller_details` (any)
  - `device` (object)
    - `locale` (string)
    - `geolocation` (string)
    - `event_uuid` (string)
    - `user_agent` (string)
  - `payer_risk_data` (object)
    - `login_platform` (string)
    - `approved_transactions_2m` (integer)
    - `recent_transactions_3h` (integer)
    - `is_paid_user` (boolean)
    - `account_creation_date` (string)
- `account_id` (string)
- `checkout_url` (string)
- `payments_number` (integer)
- `merchant_image` (string)

Example:

```json
{
  "id": "555933df-4eed-4af4-ae83-a32072ef34af",
  "country": "US",
  "availability": {
    "start_at": "2023-01-15T14:00:12Z",
    "finish_at": "2023-12-29T14:00:12Z"
  },
  "status": "CREATED",
  "merchant_order_id": "AA01",
  "description": "Test",
  "amount": {
    "currency": "USD",
    "value": 5000
  },
  "capture": true,
  "metadata": null,
  "split_payment_methods": false,
  "payment_method_types": [
    "CARD"
  ],
  "one_time_use": false,
  "payments": null,
  "callback_url": "https://checkout.sandbox.whitelabel.com/payment/status",
  "installments_plan": null,
  "customer_payer": null,
  "taxes": null,
  "additional_data": {
    "airline": null,
    "order": null,
    "seller_details": null,
    "device": {
      "locale": "es-CL",
      "geolocation": "string",
      "event_uuid": "string",
      "user_agent": "string"
    },
    "payer_risk_data": {
      "login_platform": "WEB",
      "approved_transactions_2m": 0,
      "recent_transactions_3h": 0,
      "is_paid_user": true,
      "account_creation_date": "20191005"
    }
  },
  "account_id": "493e9374-510a-4201-9e09-de669d75f256",
  "checkout_url": "https://checkout.sandbox.whitelabel.com/payment?session=2f6d9754-43d0-4dca-b023-6aba4b107179",
  "payments_number": 0,
  "merchant_image": ""
}
```

### 400

400

Example:

```json
{}
```