Documentation Index Fetch the complete documentation index at: https://docs.gates2b.com/llms.txt
Use this file to discover all available pages before exploring further.
paymentMethod = CREDIT_CARD is not accepted on this endpoint — sensitive card data must go through the public checkout only (POST /charge/{id}/checkout/payment with X-Checkout-Token).
New Payment Split — distribute the charge amount among multiple recipients using the split[] field. Supports fixed value (FIXED in BRL) and percentage (PERCENT over netAmount). See the parameter details below.
Parameters
Bearer authentication token.
Gross charge amount in BRL (two decimal places).
Charge currency (ISO 4217). Currently always BRL — for payment in another currency, use checkoutCurrency with paymentMethod = INTERNATIONAL.
If provided, creates the first attempt alongside the charge.
Accepted values:
PIX — creates an attempt with PIX instructions (QR code, EMV).
INTERNATIONAL — creates a checkout session via Revolut. Requires checkoutCurrency.
If omitted, the charge is created as PENDING with no attempt.
Currency in which the payer will pay at the gateway (ISO 4217, e.g. USD, EUR, MXN). Required when paymentMethod = INTERNATIONAL.
Free-text description for the charge.
Expiration date in ISO 8601 format.
External reference from your system for tracking.
Idempotency key for the attempt. Reusing the same key returns 409.
URL called when the charge is paid (POST with payload).
Return URL after payment (Revolut).
Attempt expiration at the gateway (ISO 8601).
Customer data. Used by gateways when not overridden at payment time. Origin (PRE_FILLED or COLLECT_AT_CHECKOUT).
New List of recipients for payment split. Omitting this field creates the charge without split.Recipient’s email registered on the platform. The recipient must have an active account on the platform as a CUSTOMER user. Emails not found or belonging to users with a different profile fall as residual to the charge owner — does not block creation , but the amount will not be forwarded to the intended recipient.
Split type:
FIXED — fixed amount in BRL (provide amount). Sum of FIXED items must be ≤ grossAmount.
PERCENT — percentage over netAmount (provide percent). Sum of PERCENT items must be ≤ 100.
Fixed amount in BRL (e.g. "50.00"). Required when kind = FIXED.
Percentage from 0.01 to 100. Required when kind = PERCENT.
Response
Without paymentMethod: ID of the charge .
With paymentMethod: ID of the attempt (the charge ID is in chargeId).
Charge ID (present only when the response is an attempt).
PENDING / PROCESSING / PAID / EXPIRED / CANCELED / FAILED / REFUNDED.
PIX or INTERNATIONAL (present only when there is an attempt).
Gross charge amount (2 decimal places).
Charge currency (ISO 4217).
Instructions for the front-end to complete the payment. Method (PIX / INTERNATIONAL).
Base64 QR image (PIX only).
PIX BR Code as text (PIX only).
Public token to initialize the Revolut Checkout Web SDK (INTERNATIONAL only).
Checkout currency (INTERNATIONAL only).
Exchange rate applied (INTERNATIONAL only). Target currency (e.g. USD).
Final amount charged (with spread).
Split configuration provided at creation (present when split[] was sent). Fixed amount in BRL (FIXED).
Calculated settlement: how much each recipient receives. Rounding remainder (PERCENT) always goes to the owner. Amount the user will receive (cents).
true when the charge owner.
Creation date (ISO 8601).
Last update date (ISO 8601).
cURL (without attempt)
cURL (with PIX)
cURL (with split)
cURL (with INTERNATIONAL)
Node
Python
curl -X POST "https://api.gates2b.com/charge" \
-H "Authorization: Bearer {your-token}" \
-H "Content-Type: application/json" \
-d '{
"grossAmount": "10.50",
"currency": "BRL",
"description": "Test charge",
"expiresAt": "2030-12-31T23:59:59.000Z",
"externalReference": "order-123",
"customerMeta": {
"name": "Example Customer",
"email": "customer@example.com",
"source": "PRE_FILLED"
}
}'
200 — without attempt
200 — with PIX
200 — with INTERNATIONAL
200 — PIX with split
400 — invalid paymentMethod
400 — missing checkoutCurrency
401 — unauthorized
409 — idempotencyKey reused
{
"id" : "01KPQ3EG70VJ22B7B5VDKCPN7H" ,
"userId" : 222 ,
"kind" : "SALE" ,
"status" : "PENDING" ,
"grossAmount" : "10.50" ,
"netAmount" : "10.45" ,
"sharedAmount" : "0.00" ,
"disputeReserve" : "0.00" ,
"refundedAmount" : "0.00" ,
"currency" : "BRL" ,
"description" : "Test charge" ,
"externalReference" : "order-123" ,
"expiresAt" : "2030-12-31T23:59:59.000Z" ,
"customerMeta" : {
"name" : "Example Customer" ,
"email" : "customer@example.com" ,
"source" : "PRE_FILLED"
},
"webhookUrl" : null ,
"feesMeta" : { "fees" : "..." },
"createdAt" : "2026-04-21T01:05:49.924Z" ,
"updatedAt" : "2026-04-21T01:05:49.924Z"
}
Create Standalone Attempt
POST /charge/{chargeId}/attempts
Creates a payment attempt for an existing charge (server-side, authenticated via JWT). Accepts PIX and INTERNATIONAL.
Parameter Type Required Description paymentMethodstring Yes PIX or INTERNATIONALcurrencystring Conditional Target currency (required for INTERNATIONAL, ISO 4217) redirectUrlstring No Return URL (used for INTERNATIONAL) attemptIdempotencyKeystring No Idempotency key (recommended)
curl -X POST "https://api.gates2b.com/charge/{chargeId}/attempts" \
-H "Authorization: Bearer {your-token}" \
-H "Content-Type: application/json" \
-d '{
"paymentMethod": "PIX",
"attemptIdempotencyKey": "uuid-v4"
}'