# CreateLinkRequest

Order details, idempotency key, price, and payment methods.

[Definition in OpenAPI](https://api.cadmospay.com/static/api/gateway-machine-api.json#/components/schemas/CreateLinkRequest)

## JSON schema

```json
{
  "type": "object",
  "additionalProperties": false,
  "required": [
    "description",
    "externalReference"
  ],
  "properties": {
    "description": {
      "type": "string",
      "minLength": 1,
      "maxLength": 200,
      "description": "Shown to the payer. Trimmed."
    },
    "externalReference": {
      "type": "string",
      "minLength": 1,
      "maxLength": 120,
      "description": "Your own reference, such as an order number. Returned with every settlement. Trimmed."
    },
    "requestId": {
      "$ref": "#/components/schemas/Uuid",
      "description": "A UUID v4 you choose; it becomes the link's `uuid`. Reuse it to retry the same create."
    },
    "localMethods": {
      "type": "array",
      "maxItems": 5,
      "uniqueItems": true,
      "items": {
        "type": "string",
        "pattern": "^[a-z0-9_-]{2,40}$"
      },
      "description": "Cash methods the link should also accept, such as `whish`. The ones your account may not offer are left out and listed in `refusedLocalMethods`. Absent: crypto only."
    },
    "amountUsd": {
      "type": "string",
      "pattern": "^\\d{1,7}(\\.\\d{1,2})?$",
      "description": "The price in dollars, from 0.50 to 1000000, as a decimal string (`\"100\"`, `\"99.5\"`), never a JSON number. The Gateway Fee is yours: it comes out of what is counted and the payer never sees it. Absent: the payer chooses what to send."
    }
  }
}
```
