HubPay icon

HubPay

Create, retrieve and cancel Hubpay PIX charges

Actions3

Charge → Create

AI-generated

Summary

Create a new PIX charge in HubPay by specifying amount, provider, and optional details such as reference, description, expiration time, payer information, and metadata.

Inputs

  • Amount (BRL) (required) — Charge amount in Brazilian Real (BRL); internally converted to cents, minimum 0.01 BRL.
  • Provider (PSP) (required) — Payment Service Provider for the charge; choose one from supported options or 'random' for HubPay's smart routing.
  • Reference — Unique string reference for the charge, used as a seed for idempotency key; leave empty to generate a new UUID per execution.
  • Description — Optional text description of the charge, up to 500 characters.
  • Expires In (seconds) — Time window in seconds before the PIX QR code expires; minimum 60 seconds, default 86400 (24 hours).
  • Payer — Collection of payer details including name (max 250 characters), email, and document (CPF or CNPJ with punctuation stripped).
  • Metadata — Free-form key-value pairs that HubPay will echo back in webhooks; if 'reference' is provided and not included in metadata, it is added automatically.

Output shape

a single charge object as returned by the HubPay /v1/charges POST endpoint

The operation returns the full JSON response from HubPay for the created charge including charge ID, status, and relevant URLs. If a reference is provided, the idempotency key incorporates it and the provider to prevent duplicate charges on retries.

Links

Discussion