Quick Start
Getting Started
Integrate once with S-Interio Cashier and access 30+ payment methods across Latin America. We handle everything: payment UI, provider routing, and customer experience.
Hosted Checkout
Create a session, redirect your customer, receive webhooks. We handle the entire payment experience - no frontend code required.
How It Works
┌──────────────┐ ┌──────────────┐ ┌──────────────────────┐
│ Your Server │────▶│ Cashier API │────▶│ Hosted Checkout Page │
│ │ │ │ │ │
│ 1. Create │ │ Returns │ │ - Shows methods │
│ session │ │ checkout_url │ │ - Customer form │
└──────────────┘ └──────────────┘ │ - Processes payment │
└──────────┬───────────┘
│
┌─────────────────────────────────────────────┘
│
▼
┌──────────────┐ ┌──────────────┐
│ success_url │◀────│ Webhook │
│ or │ │ to your │
│ cancel_url │ │ server │
└──────────────┘ └──────────────┘Integration Steps
1
Create a checkout session with amount, currency, and redirect URLs
2
Redirect customer to the checkout_url
3
Receive webhook when payment completes
Quick Start
Step 1: Create Checkout Session
Create a checkout session with your API key:
create-session.sh
POST https://cashier.flowpayment.net/api/v1/checkout
Content-Type: application/json
X-API-Key: your_api_key
{
"merchant_id": "your_merchant_id",
"amount": 150.00,
"currency": "BRL",
"country": "BRA",
"description": "Order #12345",
"reference_id": "order_12345",
"success_url": "https://your-site.com/payment/success",
"cancel_url": "https://your-site.com/payment/cancel",
"notification_url": "https://your-server.com/webhooks/cashier",
"metadata": {
"order_id": "12345",
"customer_email": "joao@example.com"
}
}Response
response.json
{
"success": true,
"session_id": "cs_abc123xyz",
"checkout_url": "https://checkout.flowpayment.net/cs_abc123xyz",
"expires_at": "2025-01-04T13:00:00Z"
}Step 2: Redirect Customer
Redirect your customer to the checkout_url. They will see:
- Available payment methods for their country
- Customer information form
- Secure payment processing
javascript
window.location.href = "https://checkout.flowpayment.net/cs_abc123xyz"Step 3: Receive Webhook
When the payment completes (success or failure), we send a webhook to your notification_url:
webhook-payload.json
POST https://your-server.com/webhooks/cashier
Content-Type: application/json
X-Signature: a1b2c3d4e5...
{
"event": "payment.success",
"payment_id": "pi_abc123xyz",
"checkout_session_id": "cs_abc123xyz",
"merchant_id": "your_merchant_id",
"reference_id": "order_12345",
"status": "success",
"amount": 150.00,
"currency": "BRL",
"method_code": "s-interio-mt-1",
"payment_method": "pix",
"provider": "sfp",
"paid_at": "2025-01-04T12:30:00Z",
"timestamp": "2025-01-04T12:30:01Z",
"metadata": {
"order_id": "12345",
"customer_email": "joao@example.com"
}
}Step 4: Customer Redirect
After payment, the customer is automatically redirected to:
success_url- if payment was successfulcancel_url- if customer cancelled or payment failed
Important
Always verify payment status via webhook before fulfilling orders. The redirect URL can be manipulated by users.
Request Parameters
| Field | Type | Required | Description |
|---|---|---|---|
merchant_id | string | Yes | Your merchant identifier |
amount | number | Yes | Payment amount |
currency | string | Yes | Currency code (BRL, PEN, COP, etc.) |
country | string | Yes | Country code (BRA, PER, COL, etc.) |
success_url | string | Yes | Redirect URL after successful payment |
cancel_url | string | Yes | Redirect URL if customer cancels |
notification_url | string | No | Webhook URL (uses merchant default if not set) |
reference_id | string | No | Your order/transaction ID |
description | string | No | Payment description shown to customer |
metadata | object | No | Custom data returned in webhooks |
Available Countries
| Country | Code | Currency | Payment Methods |
|---|---|---|---|
| Brazil | BRA | BRL | PIX, Boleto, Bank Transfer, PicPay |
| Peru | PER | PEN | Bank Transfer, CIP, Wallets |
| Colombia | COL | COP | PSE, Nequi, Efecty, Transfiya |
| Chile | CHL | CLP | Bank Transfer, Servipag |
| Mexico | MEX | MXN | SPEI, OXXO |
| Ecuador | ECU | USD | Bank Transfer |
| Argentina | ARG | ARS | Bank Transfer |
Example: Complete Integration (Node.js)
checkout.js
1 // 1. Create checkout session 2 const response = await fetch('https://cashier.flowpayment.net/api/v1/checkout', { 3 method: 'POST', 4 headers: { 5 'Content-Type': 'application/json', 6 'X-API-Key': process.env.CASHIER_API_KEY 7 }, 8 body: JSON.stringify({ 9 merchant_id: 'your_merchant_id', 10 amount: order.total, 11 currency: 'BRL', 12 country: 'BRA', 13 reference_id: order.id, 14 success_url: `https://your-site.com/orders/${order.id}/success`, 15 cancel_url: `https://your-site.com/orders/${order.id}/cancel`, 16 notification_url: 'https://your-site.com/webhooks/cashier' 17 }) 18 }); 19 20 const { checkout_url } = await response.json(); 21 22 // 2. Redirect customer 23 res.redirect(checkout_url);
Example: Webhook Handler (Node.js)
webhook-handler.js
1 app.post('/webhooks/cashier', async (req, res) => { 2 const { event, payment_id, reference_id, status } = req.body; 3 4 // Respond immediately 5 res.status(200).send('OK'); 6 7 // Process based on event 8 if (event === 'payment.success') { 9 await fulfillOrder(reference_id); 10 await sendConfirmationEmail(reference_id); 11 } else if (event === 'payment.failed') { 12 await markOrderFailed(reference_id); 13 } 14 });