Skip to content

Developers

A REST API that behaves the way you expect.

Resource-oriented URLs, JSON everywhere, standard HTTP verbs and status codes. Learn the conventions once and they apply to payments, payouts and accounts alike.

Payments

Create a payment

Creates a payment in the customer’s local currency and returns the next action for the chosen method.

POST /v1/payments
amountinteger
currencystring
methodstring
idempotency_keyheader

Core endpoints

An overview of the main resources. Paths here illustrate the shape of the API. The full reference is available to account holders.

MethodPathPurpose
POST/v1/paymentsCreate a payment with a local method or card
GET/v1/payments/{id}Retrieve a payment and its current status
POST/v1/payments/{id}/refundsRefund a payment in full or in part
POST/v1/payoutsSend a single payout to a bank account or wallet
POST/v1/payouts/batchesSubmit a bulk payout file in one request
GET/v1/balancesList balances held in each currency
POST/v1/fx/quotesLock a foreign exchange rate before converting
POST/v1/virtual-accountsIssue a virtual IBAN or local account number
POST/v1/payment-linksGenerate a shareable hosted payment link
GET/v1/eventsList events, matching what webhooks deliver

Conventions

Consistent behavior across every resource keeps your integration code small.

  • Idempotency

    Send an idempotency key with any create request. Retrying with the same key returns the original result instead of creating a duplicate.

  • Cursor pagination

    List endpoints return a page of results and a cursor for the next page, so large result sets stay fast and stable.

  • Structured errors

    Errors return a standard HTTP status with a machine-readable code, a human-readable message and the parameter at fault.

  • Versioning

    Your account is pinned to an API version. Breaking changes ship as new versions you opt into when you are ready.

  • Authentication

    Secret keys authenticate server-side requests over HTTPS. Separate keys for sandbox and live keep environments isolated.

  • Metadata

    Attach your own key-value metadata, such as order IDs, to payments and payouts and get it back in every response and event.

Same request, five languages

Official SDKs wrap authentication, retries and idempotency so you write less boilerplate.

const fletpay = new Fletpay(process.env.FLETPAY_KEY);

const payment = await fletpay.payments.create({
  amount: 125000,
  currency: "BRL",
  method: "pix",
  customer: { email: "ana@example.com" },
}, { idempotencyKey: "order_8812" });

console.log(payment.status); // "pending"

Webhook events · order_8812Illustrative example

  • 12:04:01.218payment.created
  • 12:04:01.402payment.routed
  • 12:04:03.977payment.succeeded
  • 12:04:04.010settlement.completed

Ready to Unlock Emerging & Global Markets?

Join fast-growing enterprises scaling their payment infrastructure with Fletpay.