FinMarket payment API reference
Include your API key in every request using the Authorization header.
Authorization: Bearer <your-api-key>
For sandbox/testing, use the test key: fm_test_key_acme_12345
All monetary amounts are in cents (integer). R$ 100,00 = 10000.
PIX
{
"method": "pix",
"amount": 10000,
"customer": {
"name": "João Silva",
"document": "12345678900"
}
}
Credit Card
{
"method": "card",
"amount": 25000,
"installments": 3,
"capture": true,
"customer": { "name": "Maria Souza", "document": "98765432100" },
"card": {
"number": "4111111111111111",
"holderName": "MARIA SOUZA",
"expirationMonth": 12,
"expirationYear": 2028,
"cvv": "123"
}
}
Boleto
{
"method": "boleto",
"amount": 5000,
"dueDate": "2026-05-30",
"customer": { "name": "Carlos Lima", "document": "11122233344" }
}
Idempotency-Key: <uuid> header to safely retry requests without creating duplicates.created → awaiting_payment → paid
↘ cancelled
→ refunded
→ chargeback
{
"amount": 5000
}
Omit amount for a full refund.
Webhook payloads are signed with HMAC-SHA256. Verify the x-webhook-signature header.
{
"event": "payment.confirmed" | "payment.refunded" | "payment.chargeback",
"gatewayId": "fake_...",
"chargeId": "uuid",
"amountCents": 10000,
"timestamp": "2026-05-14T00:00:00.000Z"
}
Simulate gateway events in the test environment without waiting for real payment confirmations.