Create PIX charge
/api/v1/gateway/request-qrcodeCreates a PIX "copia e cola" code (dynamic QR Code) for your customer to pay. The charge starts as WAITING_FOR_APPROVAL and becomes PAID_OUT once paid — the amount is then credited to your balance (minus the fee) and WeetPay sends a POST to callbackUrl. The QR expires after the platform-defined window (1 hour by default).
requestNumber identifies the order in your system and must be unique per account (reusing it returns 400 requestNumber já utilizado). UTM parameters in the query string (utm_source, utm_campaign, utm_medium, utm_content, utm_term) are stored with the charge.
Client ID (e.g. weetpay-100123). Also accepted as x-client-id.
In: header
Client secret. Also accepted as x-client-secret. Never expose it in front-end code.
In: header
Query Parameters
Campaign tracking (optional), stored with the charge
length <= 300Campaign tracking (optional), stored with the charge
length <= 300Campaign tracking (optional), stored with the charge
length <= 300Campaign tracking (optional), stored with the charge
length <= 300Campaign tracking (optional), stored with the charge
length <= 300Request Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
Response Body
application/json
application/json
application/json
application/json
application/json
application/json
curl -X POST "https://example.com/api/v1/gateway/request-qrcode" \ -H "Content-Type: application/json" \ -d '{ "requestNumber": "pedido-12345", "amount": 49.9, "callbackUrl": "https://sualoja.com.br/webhooks/weetpay", "client": { "name": "Maria da Silva", "document": "12345678909", "email": "[email protected]", "phoneNumber": "11999998888" }, "products": [ { "description": "Camiseta básica", "quantity": 1, "value": 49.9 } ] }'{ "idTransaction": "cmh1x2y3z0001ab12cd34ef56", "paymentCode": "00020101021226850014br.gov.bcb.pix2563qrcode.exemplo.com.br/pix/v2/cobv/9d36b84f...5204000053039865406149.905802BR5913WEETPAY6009SAO PAULO62070503***6304ABCD", "paymentCodeBase64": "iVBORw0KGgoAAAANSUhEUgAA...", "response": "OK", "status": "WAITING_FOR_APPROVAL"}