Skip to main content
POST
/
checkout
/
charges
Criar charge
curl --request POST \
  --url https://checkout-api.sandbox.z2pay.com/checkout/charges \
  --header 'Content-Type: application/json' \
  --header 'x-api-key: <api-key>' \
  --data '
{
  "items": [
    {
      "name": "<string>",
      "quantity": 2,
      "unitAmount": 2,
      "description": "<string>",
      "imageUrl": "<string>",
      "metadata": {}
    }
  ],
  "paymentMethods": {},
  "mode": "payment",
  "currency": "BRL",
  "locale": "pt-BR",
  "splits": [
    {
      "recipientId": "<string>",
      "percentage": 50.005,
      "liable": true
    }
  ],
  "branding": {
    "primaryColor": "<string>",
    "logoUrl": "<string>",
    "merchantName": "<string>",
    "faviconUrl": "<string>",
    "coverUrl": "<string>"
  },
  "customer": {
    "name": "<string>",
    "email": "jsmith@example.com",
    "document": "<string>",
    "phone": "<string>",
    "address": {
      "zipCode": "<string>",
      "street": "<string>",
      "number": "<string>",
      "complement": "<string>",
      "neighborhood": "<string>",
      "city": "<string>",
      "state": "<string>",
      "country": "BR"
    }
  },
  "requiredFields": [],
  "customFields": [
    {
      "key": "<string>",
      "label": "<string>",
      "options": [
        "<string>"
      ],
      "required": true
    }
  ],
  "successUrl": "<string>",
  "cancelUrl": "<string>",
  "description": "<string>",
  "metadata": {},
  "expirationMinutes": 21602
}
'

Authorizations

x-api-key
string
header
required

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

Body

application/json
items
object[]
required
paymentMethods
object
required
mode
enum<string>
default:payment
Available options:
payment,
subscription
currency
string
default:BRL
locale
enum<string>
default:pt-BR
Available options:
pt-BR,
en-US,
es-ES
splits
object[]
branding
object
customer
object
requiredFields
enum<string>[]
Available options:
email,
document,
phone,
address
customFields
object[]
successUrl
string<uri>
Maximum string length: 2000
cancelUrl
string<uri>
Maximum string length: 2000
description
string
Maximum string length: 2000
metadata
object
expirationMinutes
integer
Required range: 5 <= x <= 43200

Response

Charge criada