Pular para o conteúdo principal
POST
/
checkout
/
links
Criar checkout link
curl --request POST \
  --url https://checkout-api.sandbox.z2pay.com/checkout/links \
  --header 'Content-Type: application/json' \
  --header 'x-api-key: <api-key>' \
  --data '
{
  "paymentMethods": {},
  "name": "<string>",
  "description": "<string>",
  "slug": "<string>",
  "mode": "payment",
  "currency": "BRL",
  "locale": "pt-BR",
  "items": [],
  "splits": [
    {
      "recipientId": "<string>",
      "percentage": 50.005,
      "liable": true
    }
  ],
  "branding": {
    "primaryColor": "<string>",
    "logoUrl": "<string>",
    "merchantName": "<string>",
    "faviconUrl": "<string>",
    "coverUrl": "<string>"
  },
  "subscription": {
    "planId": "<string>",
    "currency": "<string>",
    "trialDays": 182,
    "maxCycles": 1,
    "collectionTiming": "prepaid",
    "metadata": {},
    "itemCovers": {},
    "maxEnrollmentInstallments": 1
  },
  "requiredFields": [],
  "customFields": [
    {
      "key": "<string>",
      "label": "<string>",
      "options": [
        "<string>"
      ],
      "required": true
    }
  ],
  "successUrl": "<string>",
  "cancelUrl": "<string>",
  "metadata": {},
  "expirationMinutes": 21602
}
'

Autorizações

x-api-key
string
header
obrigatório

CheckoutCredential — sk_* (backend) / pk_* (frontend público)

Corpo

application/json
paymentMethods
object
obrigatório
name
string | null
Maximum string length: 255
description
string | null
Maximum string length: 2000
slug
string | null
Required string length: 3 - 100
Pattern: ^[a-z0-9-]+$
mode
enum<string>
padrão:payment
Opções disponíveis:
payment,
subscription
currency
string
padrão:BRL
locale
enum<string>
padrão:pt-BR
Opções disponíveis:
pt-BR,
en-US,
es-ES
items
object[]
splits
object[] | null
branding
object
subscription
object
requiredFields
enum<string>[] | null
Opções disponíveis:
email,
document,
phone,
address
customFields
object[] | null
successUrl
string<uri> | null
Maximum string length: 2000
cancelUrl
string<uri> | null
Maximum string length: 2000
metadata
object
expirationMinutes
integer | null
Intervalo obrigatório: 5 <= x <= 43200

Resposta

Link criado