Create a payment link
deonpay_create_linkCreate a payment link with a fixed or itemized amount in centavos, configure recurring or limited-use options, and generate a public URL to share with customers.
Instructions
Create a new payment link. Use this when the user says 'create a link for $X for product Y' or 'genera un link de pago para...'. Amounts are in centavos: $500 MXN = 50000. You can pass either a fixed amount OR line_items (the API sums quantity * unit_amount automatically). Type defaults to 'single' (one-shot). Optional fields cover MSI (months without interest), max_uses, expires_at, custom_fields and visual customization. The response includes the public payment URL the user can share.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| name | Yes | Link name (visible to the customer, max 255 chars). | |
| amount | No | Fixed amount in CENTAVOS (1 MXN = 100). Required UNLESS line_items are provided or the link uses min_amount/max_amount (open amount). | |
| type | No | 'single' (default), 'recurring' or 'unlimited'. | |
| description | No | ||
| max_uses | No | Maximum number of successful payments. | |
| expires_at | No | ISO date when the link stops accepting payments. | |
| allow_msi | No | Enable MSI (meses sin intereses). | |
| msi_options | No | Allowed MSI plans, e.g. [3, 6, 12]. | |
| min_amount | No | Minimum amount for open-amount links (centavos). | |
| max_amount | No | Maximum amount for open-amount links (centavos). | |
| merchant_reference | No | Internal reference for the merchant. | |
| metadata | No | Free-form key/value metadata (max 50 keys). | |
| customization | No | Visual overrides for the hosted page. Only the keys you set are merged into the merchant defaults. | |
| custom_fields | No | ||
| line_items | No | Catalog or inline items. When provided, the total amount is computed server-side. | |
| display_currency | No | Foreign-currency display. Requires exchange_rate. | |
| exchange_rate | No | MXN per unit of display_currency. |