Cash-in
Receive payments with PIX "copia e cola" and dynamic QR Codes.
POST /api/v1/gateway/request-qrcode creates a PIX charge. The response contains the PIX code (paymentCode) and the QR Code PNG image in base64 (paymentCodeBase64) for you to show the customer.
Flow
- Your server calls Create PIX charge with the order's
requestNumber. - You display the QR Code and a "copy code" button.
- The customer pays in their banking app.
- WeetPay credits the amount (net of fees) to your balance and sends a
POSTtocallbackUrlwithstatusTransaction: "PAID_OUT". - Your system validates the signature, releases the order and replies
200.
Displaying the QR Code
<img src="data:image/png;base64,{paymentCodeBase64}" width="240" height="240" alt="PIX QR Code" />
<input value="{paymentCode}" readonly />
<button onclick="navigator.clipboard.writeText('{paymentCode}')">Copy PIX code</button>Charge status
processingStatus | Meaning |
|---|---|
WAITING_FOR_APPROVAL | awaiting payment |
PAID_OUT | paid — amount credited to the balance |
EXPIRED | QR expired unpaid (default: 1 hour) |
CANCELED | canceled by operations |
REFUNDED | refunded / disputed (MED) |
Tips
- Use one
requestNumberper payment attempt. If the QR expires, create another charge with a newrequestNumber(e.g.order-12345-2). - Send the payer's real CPF/CNPJ in
client.document: it is validated and forwarded to the bank. - Pass
utm_source,utm_campaign… in the query string to store the sale's origin with the charge.