Organizations / Fiat / Spot
Fiat Spot for Members
Convert BRL and USD at the live rate on behalf of a member: quote, create the order, have the payer send the pay-in, and Crebit pays out to the member's bank account automatically. Every request below uses your admin keys plus X-Crebit-Acting-As-Partner-Id.
Before You Start
- The member is approved for fiat (otherwise
403 fiat_spot_not_enabled). See Fiat readiness. - The member has a payout bank account on the right rail and a registered customer reference. See Payout bank accounts and Customer references.
- Examples use the production host
https://lock-apis.crebitpay.com.
Corridors
| direction | Pay-in | usd_receive_method means | Payout bank |
|---|---|---|---|
| BRL_TO_USD | PIX (BRL) | Payout rail: ach, wire or swift | ach / wire / swift, same as usd_receive_method |
| USD_TO_BRL | USD deposit account | Pay-in rail: ach, wire or swift | pix |
| USD_TO_EUR | USD deposit account | Pay-in rail: ach, wire or swift | sepa |
USD pay-in corridors need the member's USD deposit account to be approved (usd_virtual_account_ready on the profile). Rail cover fees are charged in the pay-in currency: ACH $0.50, wire $15, SWIFT $29.
1. Rate Preview
Optional. The live rate for a corridor, before you know the amount or rail. Returns a cached preview unless you send "refresh": true. market_rate is BRL per 1 USD (EUR per 1 USD for USD_TO_EUR).
curl -sS -X POST "https://lock-apis.crebitpay.com/api/v1/fiat/spot/quote-preview" \
-H "Content-Type: application/json" \
-H "X-Crebit-Key-Id: ADMIN_KEY_ID" \
-H "X-Crebit-Key-Secret: ADMIN_KEY_SECRET" \
-H "X-Crebit-Environment: production" \
-H "X-Crebit-Acting-As-Partner-Id: 8f3c2a1e-4b5d-4e6f-9a7b-1c2d3e4f5a6b" \
-d '{"direction":"BRL_TO_USD"}'{
"direction": "BRL_TO_USD",
"market_rate": "5.4700",
"quote_expires_at": "2026-09-28T14:10:00Z"
}2. Quote
Prices a fixed amount on one side (amount_side: payin or payout) with the rail cover fee. Spot uses the live rate with no Crebit spread, so locked_rate equals market_rate unless you add a client spread. The same parameters return the cached quote for up to 10 minutes; send "refresh": true for a fresh one. Limits are checked here.
curl -sS -X POST "https://lock-apis.crebitpay.com/api/v1/fiat/spot/quotes" \
-H "Content-Type: application/json" \
-H "X-Crebit-Key-Id: ADMIN_KEY_ID" \
-H "X-Crebit-Key-Secret: ADMIN_KEY_SECRET" \
-H "X-Crebit-Environment: production" \
-H "X-Crebit-Acting-As-Partner-Id: 8f3c2a1e-4b5d-4e6f-9a7b-1c2d3e4f5a6b" \
-H "Idempotency-Key: $(uuidgen)" \
-d '{"direction":"BRL_TO_USD","amount":"50000.00","amount_side":"payin","usd_receive_method":"wire"}'{
"spread_percent": "0",
"base_rate": "5.4700",
"client_rate": "5.4700",
"spread_revenue_amount": "0",
"spread_revenue_currency": "USD",
"direction": "BRL_TO_USD",
"payin_amount": "50000.00",
"payin_currency": "BRL",
"payout_amount": "9140.77",
"payout_currency": "USD",
"locked_rate": "5.4700",
"market_rate": "5.4700",
"spread_bps": 0,
"quote_expires_at": "2026-09-28T14:10:00Z",
"usd_receive_method": "wire",
"cover_fee_usd": "15.00",
"cover_fee_payin_amount": "82.05",
"cover_fee_payin_currency": "BRL",
"total_payin_amount": "50082.05"
}3. Create the Order
| Field | Required | Notes |
|---|---|---|
| direction | yes | BRL_TO_USD, USD_TO_BRL or USD_TO_EUR |
| amount | yes | Decimal string, fixed on amount_side |
| amount_side | no | payin (default) or payout |
| usd_receive_method | yes | ach, wire or swift (see Corridors) |
| customer_reference_id | yes | Registered customer reference (1-256 chars) |
| payout_destination.bank_account_id | yes | Member's bank account on the matching rail |
| payer_role | no | self (default) or third_party, when someone else sends the pay-in |
| spread_percent | no | Your markup as a percent (0.5 = 0.5%); see Client spread |
spread_percent on the quote and order. See Client spread.curl -sS -X POST "https://lock-apis.crebitpay.com/api/v1/fiat/spot/orders" \
-H "Content-Type: application/json" \
-H "X-Crebit-Key-Id: ADMIN_KEY_ID" \
-H "X-Crebit-Key-Secret: ADMIN_KEY_SECRET" \
-H "X-Crebit-Environment: production" \
-H "X-Crebit-Acting-As-Partner-Id: 8f3c2a1e-4b5d-4e6f-9a7b-1c2d3e4f5a6b" \
-H "Idempotency-Key: $(uuidgen)" \
-d '{"direction":"BRL_TO_USD","amount":"50000.00","amount_side":"payin","payer_role":"self","usd_receive_method":"wire","customer_reference_id":"cust_7781","payout_destination":{"bank_account_id":"ba_4f7c2d9e1a3b"}}'{
"spread_percent": "0",
"base_rate": "5.4700",
"client_rate": "5.4700",
"spread_revenue_amount": "0",
"spread_revenue_currency": "USD",
"id": "7e1f2a3b-4c5d-4e6f-8a9b-0c1d2e3f4a5b",
"direction": "BRL_TO_USD",
"status": "awaiting_payin",
"payer_role": "self",
"customer_reference_id": "cust_7781",
"payin_amount": "50000.00",
"payin_currency": "BRL",
"payout_amount": "9140.77",
"payout_currency": "USD",
"locked_rate": "5.4700",
"spread_bps": 0,
"quote_expires_at": "2026-09-28T14:10:00Z",
"payin_expires_at": "2026-09-28T14:05:00Z",
"usd_receive_method": "wire",
"cover_fee_usd": "15.00",
"cover_fee_payin_amount": "82.05",
"cover_fee_payin_currency": "BRL",
"total_payin_amount": "50082.05",
"payout_destination": {
"bank_account_id": "ba_4f7c2d9e1a3b",
"name": "Member Co operating",
"beneficiary_name": "Member Co LLC"
},
"failure_reason": null,
"share_token": "q3V9xkT2bLr8…",
"share_url": "https://developers.crebitpay.com/fiat/pay/q3V9xkT2bLr8…",
"payment_instructions": [
{
"id": "3a4b5c6d-7e8f-4a9b-8c0d-1e2f3a4b5c6d",
"instruction_kind": "payin",
"rail": "pix",
"credentials": {
"pix_code": "00020126580014br.gov.bcb.pix0136…5204000053039865406500082.055802BR…6304A1B2"
},
"display_text": "Pay 50082.05 BRL (BRL TO USD)\nRail: PIX\nPIX: 00020126580014br.gov.bcb.pix0136…",
"expires_at": "2026-09-28T14:05:00Z"
}
],
"created_at": "2026-09-28T14:00:00Z",
"updated_at": "2026-09-28T14:00:00Z",
"swift_compliance": null
}The order is created in awaiting_payinwith its pay-in instructions. It belongs to the member and shows up in the member's partner portal.
4. Pay In
Send the payer the instruction in payment_instructions (or the share link). The payer must send total_payin_amount.
- BRL_TO_USD: a PIX code in
credentials.pix_code. It expires about 5 minutes after the order is created (payin_expires_at). The order then moves toawaiting_payin_confirmationfor a webhook grace window (default 15 minutes) so a late payment confirmation can still settle a payment made just before the PIX timed out; only after that grace does it becomeexpired. Minimum BRL pay-in is 5.00. - USD_TO_BRL and USD_TO_EUR:the member's USD deposit account details for the chosen rail. The window is 120 hours by default.
{
"id": "5c6d7e8f-9a0b-4c1d-8e2f-3a4b5c6d7e8f",
"instruction_kind": "payin",
"rail": "ach",
"credentials": {
"routing_number": "021000021",
"account_number": "000123456789",
"beneficiary_name": "Member Co Ltda"
},
"display_text": "Pay 10000.50 USD (USD TO BRL)\nRail: ACH\nRouting Number: 021000021\nAccount Number: 000123456789\nBeneficiary Name: Member Co Ltda",
"expires_at": "2026-10-03T14:00:00Z"
}5. Poll Until Settled
There are no fiat webhooks. Poll the order with the acting-as header until it is settled, expired or failed. Once the pay-in arrives Crebit converts and submits the payout on its own; no further call is needed.
curl -sS -X GET "https://lock-apis.crebitpay.com/api/v1/fiat/spot/orders/7e1f2a3b-4c5d-4e6f-8a9b-0c1d2e3f4a5b" \
-H "X-Crebit-Key-Id: ADMIN_KEY_ID" \
-H "X-Crebit-Key-Secret: ADMIN_KEY_SECRET" \
-H "X-Crebit-Environment: production" \
-H "X-Crebit-Acting-As-Partner-Id: 8f3c2a1e-4b5d-4e6f-9a7b-1c2d3e4f5a6b"{
"spread_percent": "0",
"base_rate": "5.4700",
"client_rate": "5.4700",
"spread_revenue_amount": "0",
"spread_revenue_currency": "USD",
"id": "7e1f2a3b-4c5d-4e6f-8a9b-0c1d2e3f4a5b",
"direction": "BRL_TO_USD",
"status": "settled",
"payer_role": "self",
"customer_reference_id": "cust_7781",
"payin_amount": "50000.00",
"payin_currency": "BRL",
"payout_amount": "9140.77",
"payout_currency": "USD",
"locked_rate": "5.4700",
"spread_bps": 0,
"quote_expires_at": "2026-09-28T14:10:00Z",
"payin_expires_at": "2026-09-28T14:05:00Z",
"usd_receive_method": "wire",
"cover_fee_usd": "15.00",
"cover_fee_payin_amount": "82.05",
"cover_fee_payin_currency": "BRL",
"total_payin_amount": "50082.05",
"payout_destination": {
"bank_account_id": "ba_4f7c2d9e1a3b",
"name": "Member Co operating",
"beneficiary_name": "Member Co LLC"
},
"failure_reason": null,
"share_token": "q3V9xkT2bLr8…",
"share_url": "https://developers.crebitpay.com/fiat/pay/q3V9xkT2bLr8…",
"payment_instructions": [
{
"id": "3a4b5c6d-7e8f-4a9b-8c0d-1e2f3a4b5c6d",
"instruction_kind": "payin",
"rail": "pix",
"credentials": {
"pix_code": "00020126580014br.gov.bcb.pix0136…5204000053039865406500082.055802BR…6304A1B2"
},
"display_text": "Pay 50082.05 BRL (BRL TO USD)\nRail: PIX\nPIX: 00020126580014br.gov.bcb.pix0136…",
"expires_at": "2026-09-28T14:05:00Z"
}
],
"created_at": "2026-09-28T14:00:00Z",
"updated_at": "2026-09-28T14:21:40Z",
"swift_compliance": null
}Status Lifecycle
| status | Meaning | Next |
|---|---|---|
| quoted | Order row created; pay-in instructions being issued (not normally visible) | awaiting_payin, expired |
| awaiting_payin | Waiting for the payer; see payin_expires_at | payin_detected, awaiting_payin_confirmation, failed |
| awaiting_payin_confirmation | Pay-in window closed; waiting for the payment confirmation (grace window, default 15 min) | payin_detected, expired, failed |
| payin_detected | Pay-in received | converting |
| converting | Converting and submitting the payout (retried automatically if submission fails) | payout_submitted, failed |
| payout_submitted | Payout sent to the member's bank; SWIFT payouts may wait for compliance documents | settled, failed |
| settled | Payout completed (terminal) | |
| expired | Grace ended with no confirmed pay-in (or quote expired). Late payin.complete can still revive. | payin_detected |
| failed | Pay-in failed, or the payout failed after the automatic retries were used up; see failure_reason (terminal) |
SWIFT Compliance Documents
SWIFT payouts can be held for a document showing the payer and recipient relationship. While held, the order's swift_compliance.status is waiting_documents. If you stored a document on the bank account, Crebit submits it automatically. Otherwise send one once the order is payout_submitted:
transaction_document_type: invoice, purchase_order, delivery_slip, contract, customs_declaration, bill_of_lading, first_party or others.transaction_document_file: PDF, JPEG or PNG as an HTTPS URL or data URL, under about 8 MB. Not needed forfirst_party.- Optional
transaction_document_id(max 128) anddescription(max 512).
curl -sS -X POST "https://lock-apis.crebitpay.com/api/v1/fiat/spot/orders/7e1f2a3b-4c5d-4e6f-8a9b-0c1d2e3f4a5b/compliance-documents" \
-H "Content-Type: application/json" \
-H "X-Crebit-Key-Id: ADMIN_KEY_ID" \
-H "X-Crebit-Key-Secret: ADMIN_KEY_SECRET" \
-H "X-Crebit-Environment: production" \
-H "X-Crebit-Acting-As-Partner-Id: 8f3c2a1e-4b5d-4e6f-9a7b-1c2d3e4f5a6b" \
-d '{"transaction_document_type":"invoice","transaction_document_id":"INV-2026-0042","transaction_document_file":"data:application/pdf;base64,JVBERi0xLjQK…","description":"Invoice for September supplies"}'{
"spread_percent": "0",
"base_rate": "5.4700",
"client_rate": "5.4700",
"spread_revenue_amount": "0",
"spread_revenue_currency": "USD",
"id": "7e1f2a3b-4c5d-4e6f-8a9b-0c1d2e3f4a5b",
"direction": "BRL_TO_USD",
"status": "payout_submitted",
"payer_role": "self",
"customer_reference_id": "cust_7781",
"payin_amount": "50000.00",
"payin_currency": "BRL",
"payout_amount": "9140.77",
"payout_currency": "USD",
"locked_rate": "5.4700",
"spread_bps": 0,
"quote_expires_at": "2026-09-28T14:10:00Z",
"payin_expires_at": "2026-09-28T14:05:00Z",
"usd_receive_method": "swift",
"cover_fee_usd": "15.00",
"cover_fee_payin_amount": "82.05",
"cover_fee_payin_currency": "BRL",
"total_payin_amount": "50082.05",
"payout_destination": {
"bank_account_id": "ba_4f7c2d9e1a3b",
"name": "Member Co operating",
"beneficiary_name": "Member Co LLC"
},
"failure_reason": null,
"share_token": "q3V9xkT2bLr8…",
"share_url": "https://developers.crebitpay.com/fiat/pay/q3V9xkT2bLr8…",
"payment_instructions": [],
"created_at": "2026-09-28T14:00:00Z",
"updated_at": "2026-09-28T14:00:00Z",
"swift_compliance": {
"required": true,
"status": "compliance_reviewing",
"document_type": "invoice",
"document_id": "INV-2026-0042",
"submitted_at": "2026-09-28T14:30:02Z"
}
}swift_compliance.status moves from waiting_documents to compliance_reviewing to approved.
List Orders
The member's spot orders, newest first. Optional status filter and limit (1-200, default 100). List items don't include payment instructions; get the order for those. For spot and forward orders together with pagination, use GET /api/v1/fiat/orders.
curl -sS -X GET "https://lock-apis.crebitpay.com/api/v1/fiat/spot/orders?status=settled&limit=50" \
-H "X-Crebit-Key-Id: ADMIN_KEY_ID" \
-H "X-Crebit-Key-Secret: ADMIN_KEY_SECRET" \
-H "X-Crebit-Environment: production" \
-H "X-Crebit-Acting-As-Partner-Id: 8f3c2a1e-4b5d-4e6f-9a7b-1c2d3e4f5a6b"{
"items": [
{
"spread_percent": "0",
"base_rate": "5.4700",
"client_rate": "5.4700",
"spread_revenue_amount": "0",
"spread_revenue_currency": "USD",
"id": "7e1f2a3b-4c5d-4e6f-8a9b-0c1d2e3f4a5b",
"direction": "BRL_TO_USD",
"status": "settled",
"payer_role": "self",
"customer_reference_id": "cust_7781",
"payin_amount": "50000.00",
"payin_currency": "BRL",
"payout_amount": "9140.77",
"payout_currency": "USD",
"locked_rate": "5.4700",
"spread_bps": 0,
"quote_expires_at": "2026-09-28T14:10:00Z",
"payin_expires_at": "2026-09-28T14:05:00Z",
"usd_receive_method": "wire",
"cover_fee_usd": "15.00",
"cover_fee_payin_amount": "82.05",
"cover_fee_payin_currency": "BRL",
"total_payin_amount": "50082.05",
"payout_destination": {
"bank_account_id": "ba_4f7c2d9e1a3b",
"name": "Member Co operating",
"beneficiary_name": "Member Co LLC"
},
"failure_reason": null,
"share_token": "q3V9xkT2bLr8…",
"share_url": "https://developers.crebitpay.com/fiat/pay/q3V9xkT2bLr8…",
"payment_instructions": [],
"created_at": "2026-09-28T14:00:00Z",
"updated_at": "2026-09-28T14:21:40Z",
"swift_compliance": null
}
]
}Share and Receipt
Share the Payment Instructions
Ready-made text and links for the payer (useful with payer_role: third_party). The share_url opens a public payment page.
curl -sS -X GET "https://lock-apis.crebitpay.com/api/v1/fiat/spot/orders/7e1f2a3b-4c5d-4e6f-8a9b-0c1d2e3f4a5b/share" \
-H "X-Crebit-Key-Id: ADMIN_KEY_ID" \
-H "X-Crebit-Key-Secret: ADMIN_KEY_SECRET" \
-H "X-Crebit-Environment: production" \
-H "X-Crebit-Acting-As-Partner-Id: 8f3c2a1e-4b5d-4e6f-9a7b-1c2d3e4f5a6b"{
"order_id": "7e1f2a3b-4c5d-4e6f-8a9b-0c1d2e3f4a5b",
"share_token": "q3V9xkT2bLr8…",
"share_url": "https://developers.crebitpay.com/fiat/pay/q3V9xkT2bLr8…",
"share_text": "Pay 50082.05 BRL (BRL TO USD)\nRail: PIX\nPIX: 00020126580014br.gov.bcb.pix0136…",
"mailto_url": "mailto:?subject=…&body=…",
"whatsapp_url": "https://wa.me/?text=…"
}Download the Receipt
Returns a PDF (application/pdf, sent as an attachment).
curl -sS -X GET "https://lock-apis.crebitpay.com/api/v1/fiat/spot/orders/7e1f2a3b-4c5d-4e6f-8a9b-0c1d2e3f4a5b/receipt" \
-H "X-Crebit-Key-Id: ADMIN_KEY_ID" \
-H "X-Crebit-Key-Secret: ADMIN_KEY_SECRET" \
-H "X-Crebit-Environment: production" \
-H "X-Crebit-Acting-As-Partner-Id: 8f3c2a1e-4b5d-4e6f-9a7b-1c2d3e4f5a6b"Errors
Spot-specific codes. Readiness, bank account, limit and idempotency errors are on the fiat overview.
| Status | code | When |
|---|---|---|
| 400 | bad_request | Unsupported direction (EUR pay-in is not supported), invalid amount, BRL pay-in below 5.00 |
| 400 | (per-transaction limit) | Amount outside the member's per-transaction USD range; details include min_usd and max_usd |
| 400 | fiat_daily_limit_exceeded / fiat_monthly_limit_exceeded | Member's volume cap reached |
| 403 | fiat_virtual_account_not_ready | USD_TO_BRL or USD_TO_EUR before the USD deposit account is approved |
| 400 | fiat_payout_bank_rail_mismatch | Payout bank type does not match the corridor |
| 404 | not_found | customer_reference_id not registered for the member |
| 404 | fiat_spot_order_not_found | Unknown order id, or an order of another partner |
| 502 | live_spot_rate_unavailable | Live rate unavailable; retry |
| 400 | not_swift_payout | Compliance documents sent for a non-SWIFT order |
| 409 | payout_not_submitted | Compliance documents sent before the order is payout_submitted |
| 400 | document_required | Document file missing for a non first_party document type |
| 400 | document_too_large | Document over about 8 MB |
- Expired orders can't be revived. Create a new order (with a new
Idempotency-Key). - For a
failedorder, checkfailure_reasonand contact Crebit if funds were received.