# Create a payment link

A link is `OPEN` (the payer names the amount), `STATIC` (a fixed
amount), or `PRODUCT` (priced from your catalog).

Endpoint: POST /payment-links
Security: ClientKey

## Security:

  - `ClientKey` (unknown)
    apiKey in header client_key

## Request fields (application/json):

  - `data` (string, required)
    A JWT signed with your secret key, holding the parameters.
    Example: example

  - `lang` (string)
    Example: example

## Response 200:

  - `200` (unknown)
    The link was created.

## Response 200 fields (application/json):

  - `statusCode` (integer, required)
    Repeats the HTTP status code.
    Example: 200

  - `headers` (object)

  - `body` (object, required)

  - `body.message` (any)
    A string on success. On a validation failure, an array holding
every rule that failed.

  - `body.response` (any)
    The payload, when the endpoint returns one.

## Response 400:

  - `400` (unknown)
    One or more parameters were rejected. `body.message` is an array
listing every failure, not just the first.

## Response 400 fields (application/json):

  - `statusCode` (integer, required)
    Repeats the HTTP status code.
    Example: 200

  - `headers` (object)

  - `body` (object, required)

  - `body.message` (any)
    A string on success. On a validation failure, an array holding
every rule that failed.

  - `body.response` (any)
    The payload, when the endpoint returns one.

## Response 500:

  - `500` (unknown)
    The signature could not be verified, or the key was missing.
Note this returns **500**, not 401. The behaviour is documented as it
is, rather than as it ought to be.

## Response 500 fields (application/json):

  - `statusCode` (integer, required)
    Repeats the HTTP status code.
    Example: 200

  - `headers` (object)

  - `body` (object, required)

  - `body.message` (any)
    A string on success. On a validation failure, an array holding
every rule that failed.

  - `body.response` (any)
    The payload, when the endpoint returns one.

## Response 400 examples:

  - `Captured from a live sandbox response` (unknown)

## Response 500 examples:

  - `Captured from a live sandbox response` (unknown)

