Skip to main content
POST
Process a card payment

Authorizations

X-API-Key
string
header
required

Company API key. Send in the X-API-Key header.

Headers

x-client-id
string
required

Client identifier for the company in the request.

Example:

"client_abc123"

Body

application/json
merchant_order_id
string
required

Your internal order reference (1–100 chars).

Example:

"ORD-2026-12345"

amount
integer
required

Amount in cents (R$1,00 minimum = 100)

Example:

15000

currency
string
required

3-letter ISO currency code.

Example:

"BRL"

payment_method
enum<string>
required
Available options:
card,
pix,
billet
Example:

"card"

customer
object
required

Identify by token (existing customer) or by name + email + document (new customer).

gateway_first_try
enum<string> | null

Gateway slug to attempt first. Falls back to routing rules if not set or gateway not enabled.

Available options:
pagarme,
picpay,
safe2pay,
pagbank,
stripe,
asaas,
erede
Example:

"pagarme"

capture
boolean
default:true

When false, performs an auth-only (pre-authorization): funds are reserved but not settled, and the transaction comes back with status "authorized". Settle it with POST /payments/{id}/capture or release it with POST /payments/{id}/cancel. Supported gateways: pagarme, pagbank, stripe, erede.

Example:

false

card
object | null

Required when payment_method is card. Provide either token or raw card fields.

billing_address
object | null

Required when no card.token is provided.

splits
object[] | null

Optional split rules. Each entry directs a portion of the amount to a sub-account.

Response

Payment processed successfully

status
enum<string>
Available options:
approved,
failed,
pending
Example:

"approved"

transaction_id
string
Example:

"01hvxyz..."

amount
integer
Example:

15000

message
string
Example:

"Payment approved."

attempts
integer
Example:

1

payment_method
string
Example:

"card"

merchant_order_id
string | null
Example:

"ORD-2026-12345"

idempotency_key
string | null
Example:

"order-abc-123"

plugtopay_request_time
string | null
Example:

"0.05s"

total_request_time
string | null
Example:

"0.8s"

gateways_request_time
string | null
Example:

"0.75s"

created_at
string<date-time> | null
updated_at
string<date-time> | null
transactions
object[]
customer
object | null
webhook
object | null
card
object | null

Present when payment_method is card and status is not processing.