Quickstart
From sign-up to your first paid charge, in five steps.
Create and verify your account
Sign up at app.weetpay.com and submit the identity verification documents. The API only works after approval — until then every call returns 403 with code: "KYC_REQUIRED".
Generate credentials
In the dashboard, open Developers and reveal your keys with your transaction PIN. You get:
- Client ID —
weetpay-<account number>, never changes; - Client secret — a UUID. Keep it in a secrets vault; Update credentials issues a new one and revokes the old one immediately.
Create a charge
curl -X POST https://api.weetpay.com/api/v1/gateway/request-qrcode \
-H "Content-Type: application/json" \
-H "vspi: $WEETPAY_CLIENT_ID" \
-H "vsps: $WEETPAY_CLIENT_SECRET" \
-d '{
"requestNumber": "order-12345",
"amount": 49.90,
"callbackUrl": "https://yourstore.com/webhooks/weetpay",
"client": { "name": "Maria da Silva", "document": "12345678909", "email": "[email protected]" }
}'The response contains the PIX code (paymentCode) and the QR Code image (paymentCodeBase64):
{
"idTransaction": "cmh1x2y3z0001ab12cd34ef56",
"paymentCode": "00020101021226850014br.gov.bcb.pix…",
"paymentCodeBase64": "iVBORw0KGgoAAAANSUhEUgAA…",
"response": "OK",
"status": "WAITING_FOR_APPROVAL"
}Show the customer the image data:image/png;base64,{paymentCodeBase64} and a "copy" button with paymentCode.
Receive the payment notice
When the PIX is paid, WeetPay sends a POST to callbackUrl:
{
"requestNumber": "order-12345",
"statusTransaction": "PAID_OUT",
"idTransaction": "cmh1x2y3z0001ab12cd34ef56",
"typeTransaction": "PIX",
"value": 49.9,
"debtorName": "MARIA DA SILVA",
"debtorDocument": "12345678909",
"date": "2026-10-30T13:03:40.000Z",
"endToEnd": "E18236120202610301303s0123456789"
}Check the X-WeetPay-Signature, release the order and reply 200. Details in Callbacks and webhooks.
Check anytime
Use Get transaction to check the status at any time (for example, when the customer comes back to the order page) and Get balance to see what is available.
Reference clients
Copy-paste ready, no dependencies:
- weetpay-client.mjs — Node.js 18+ (native
fetch), with callback validation; - weetpay-client.php — PHP 7.4+ with cURL, with callback validation.
import { weetpay } from './weetpay-client.mjs';
const { status, data } = await weetpay('POST', '/api/v1/gateway/request-qrcode', {
requestNumber: 'order-12345',
amount: 49.9,
client: { name: 'Maria da Silva', document: '12345678909' },
});