Actions7
Create PIX Order
AI-generatedSummary
Create a PIX payment order on PagBank using customer details, order items, and optional payment splits.
Inputs
- customerName (required) — Full customer name for the PIX order.
- customerEmail (required) — Customer email address.
- customerTaxId (required) — Customer CPF (11 digits) or CNPJ (14 digits), used for tax identification.
- items (required) — List of order items each with product name, optional reference ID, quantity, and amount in cents.
- splitMethod — Optional method to divide payment between receivers, either fixed amounts (cents) or percentage (must sum to 100). Defaults to fixed.
- splitReceivers — Optional list of 2 or more receivers with PagBank account IDs and corresponding amount or percentage. Used for splitting payment.
- additionalFields — Optional fields including Reference ID (order identifier), Redirect URL (after payment), Notification URL (to receive payment notifications), Installments, Statement Descriptor, and whether to simplify the response.
Output shape
a JSON object representing the created PIX order as returned by PagBank API
The response includes order details such as reference ID, customer information, items, total amount, QR code data for the PIX payment, and any payment splits. The output shape can be simplified or raw based on the 'simplify' additional field. Errors with detailed messages are thrown if inputs are invalid or API request fails.
Examples
Example 1: Create a PIX order with two items and split the payment by fixed amounts between two receivers, with basic customer info and notification URL set.
customerName, customerEmail, customerTaxId set; items with two products including name, quantity, amount in cents; splitMethod set to 'FIXED'; splitReceivers defining two accounts with their respective cent amounts summing to total order; optional notificationUrl in additionalFields; referenceId provided.