PagBank icon

PagBank

Integration with PagBank for payment processing

Create Credit Card Charge

AI-generated

Summary

Create a direct credit card charge on PagBank by providing customer details, order items, and encrypted card data. Supports optional payment splitting among multiple receivers, installment settings, and notification URLs.

Inputs

  • Customer Name (required) — Full customer name for the charge.
  • Customer Email (required) — Email address of the customer.
  • Customer CPF/CNPJ (required) — Customer's CPF (11 digits) or CNPJ (14 digits) tax identification number.
  • Order Items (required) — A list of items in the order, each with product name, optional reference ID, quantity, and unit amount in cents.
  • Card Data (required) — Credit card information including number, holder name, expiration month/year, and security code; this data is encrypted before submission.
  • Split Method (optional) — Method to split payment amounts among receivers: either fixed amounts in cents or percentage values summing to 100.
  • Split Receivers (optional) — A list of 2 or more receivers with PagBank account IDs and amount/percentage shares, custody and liability options for payment splitting.
  • Additional Fields (optional) — Additional parameters such as unique reference ID, redirect URL after payment, notification URL for callbacks, number of installments (1-12), statement descriptor, and whether to simplify response data.

Output shape

a single JSON object representing the created credit card charge response from PagBank API.

The operation encrypts the credit card data using PagBank's encryption public key before sending the charge request. It requires valid PagBank Connect credentials configured in n8n. Errors during validation or API request throw node operation errors with descriptive messages. The response can be simplified if selected in additional fields.

Examples

Example 1: Create a credit card charge for a customer with two order items, split payment between two receivers with fixed amounts, 3 installments, and receive notifications via a webhook URL.

Provide customerName, customerEmail, customerTaxId; add two items with names, quantities, and unit_amount in cents; provide correct cardData with valid card fields; choose splitMethod as FIXED; add two splitReceivers with accountIds and fixed amounts summing the order total; set installments to 3; specify notificationUrl in additionalFields.

Links

Discussion