# Create Cash-In Generates a PIX payment intent. Standard PIX flow: Returns a Copia e Cola string and a QR Code image (Base64) that your user can scan to complete the payment. OpenFinance flow: Include the openFinance object to generate an OpenFinance payment link instead. The user is redirected to their bank's app to authorize the payment. Once payment is confirmed by the banking network, ConnectPSP will POST a CASHIN_PAID event to your webhookUrl. Endpoint: POST /cash-in Version: 2.0.0 Security: bearerAuth ## Header parameters: - `ApplicationToken` (string, required) Fixed GUID that uniquely identifies your integration. Provided during ConnectPSP onboarding. Example: "{{ApplicationToken}}" - `X-Idempotency-Key` (string) A client-generated UUID v4 to guarantee idempotency. If the same key is sent twice, the second request returns the original response without creating a duplicate transaction. Strongly recommended for all POST operations. Example: "550e8400-e29b-41d4-a716-446655440000" ## Request fields (application/json): - `amount` (number, required) Payment amount in BRL (Brazilian Reais). Decimal format (e.g. 150.50). Example: 150.5 - `externalReference` (string, required) Your internal order or transaction ID. Must be unique per application. Example: "order_abc123" - `expirationInMinutes` (integer) QR Code validity in minutes. Defaults to 1440 (24h) if omitted. Example: 60 - `webhookUrl` (string) URL to receive asynchronous payment events (CASHIN_PAID, CASHIN_REFUNDED). Example: "https://api.yourdomain.com/webhooks/connectpsp" - `payer` (object, required) - `payer.name` (string, required) Full name of the payer. Example: "João Silva" - `payer.document` (string, required) CPF (11 digits) or CNPJ (14 digits) — numbers only. Example: "12345678909" - `openFinance` (object) When present, triggers the OpenFinance flow instead of a standard QR Code. The response will include a paymentUrl to redirect the user to their bank's authorization screen. - `openFinance.redirectUrl` (string, required) URL to redirect the user after completing payment in their banking app. Example: "https://yourdomain.com/payment/success" - `includeQrCodeImage` (boolean) If true, the response includes QR Code as Base64. Defaults to true. ## Response 201 fields (application/json): - `transactionId` (string) PIX network TxId (alphanumeric). Example: "kk6g232xel65a0daee4dd13kk2912714964" - `internalCode` (string) ConnectPSP short code (7 characters). Use this to poll status. Example: "US7B1JQ" - `externalReference` (string) Your original order reference echoed back. Example: "order_abc123" - `status` (string) Always AWAITING_PAYMENT at creation. Enum: "AWAITING_PAYMENT" - `amount` (number) Example: 150.5 - `payer` (object) - `payer.name` (string) Example: "João Silva" - `payer.document` (string) Example: "12345678909" - `payer.bankData` (object) Banking details returned after settlement. May be null before settlement. - `payer.bankData.ispb` (string) Bank ISPB code (8 digits). Example: "00000000" - `payer.bankData.bank` (string) Bank name. Example: "Banco do Brasil S.A." - `payer.bankData.branch` (string) Branch number. Example: "0001" - `payer.bankData.account` (string) Account number. Example: "123456" - `pixData` (object) - `pixData.copyAndPaste` (string) Full PIX Copia e Cola string (EMV QR Code payload). Example: "00020101021226..." - `pixData.qrCodeImageBase64` (string) QR Code image encoded as Base64. Present only when includeQrCodeImage is true. Example: "iVBORw0KGgoAAAANSU..." - `openFinanceData` (object) - `openFinanceData.paymentUrl` (string) Redirect URL to the user's OpenFinance payment authorization screen. Example: "https://app.linaopenx.com.br/payments?paymentLinkId=b7116f6a..." - `requestedAt` (string) Transaction creation timestamp (ISO 8601, UTC-3). Example: "2026-03-10T11:20:00-03:00" ## Response 400 fields (application/problem+json): - `type` (string) URI identifying the error type. Example: "https://connect-psp.redocly.app/errors/insufficient-funds" - `title` (string) Short, human-readable summary. Example: "Insufficient Funds" - `status` (integer) HTTP status code. Example: 422 - `code` (string) Machine-readable error code for programmatic handling. Example: "INSUFFICIENT_FUNDS" - `detail` (string) Human-readable explanation of this specific occurrence. Example: "The requested amount of R$ 500.00 exceeds available balance of R$ 100.00." ## Response 401 fields (application/problem+json): - `type` (string) URI identifying the error type. Example: "https://connect-psp.redocly.app/errors/insufficient-funds" - `title` (string) Short, human-readable summary. Example: "Insufficient Funds" - `status` (integer) HTTP status code. Example: 422 - `code` (string) Machine-readable error code for programmatic handling. Example: "INSUFFICIENT_FUNDS" - `detail` (string) Human-readable explanation of this specific occurrence. Example: "The requested amount of R$ 500.00 exceeds available balance of R$ 100.00." ## Response 422 fields (application/problem+json): - `type` (string) URI identifying the error type. Example: "https://connect-psp.redocly.app/errors/insufficient-funds" - `title` (string) Short, human-readable summary. Example: "Insufficient Funds" - `status` (integer) HTTP status code. Example: 422 - `code` (string) Machine-readable error code for programmatic handling. Example: "INSUFFICIENT_FUNDS" - `detail` (string) Human-readable explanation of this specific occurrence. Example: "The requested amount of R$ 500.00 exceeds available balance of R$ 100.00."