Integration GuideAPI Reference
Integration Guide
📘

"paymentMethodName": "PIX"

Payment Method Features

FeatureValue
CountryBrazil
Processing CurrenciesBRL
PaymentsYes
-- Min per transaction amount0.10 BRL, unless another limit is defined in your contract
-- Max per transaction amount50,000.00 BRL, unless another limit is defined in your contract
RefundsFull & Partial
-- Full RefundYes
-- Partial RefundYes
-- Multiple Partial Refunds
ChargebacksNo

Workflow: Payments

  1. Create an Intent containing one PIX payment.
  2. The platform validates the request and creates the payment.
  3. The synchronous response contains the PIX Copy and Paste payload and a Base64-encoded QR image.
  4. Display the QR code to the payer or provide a button for copying the PIX payload.
  5. The payer scans the QR code or pastes the payload into a PIX-enabled banking or wallet application and confirms the payment.
  6. Wait for the payment webhook. A successful PIX payment reaches the CAPTURED status.
⚠️

The synchronous Intent response confirms that the PIX payment was created; it does not confirm that the payer completed the transfer. Treat the payment as successful only after its status becomes CAPTURED.


List of used API Requests

RequestEndpointDescription
Intent CreationPOST /processing/api/v1/intentsCreates a new Intent with a PIX payment. The response contains the payment identifier, current status, PIX Copy and Paste payload, and QR image.
Refund CreationPOST /api/v1/refundsCreates a full or partial refund for a previously captured PIX payment. The refund is returned to the original payment source.

Intent Creation Request/Response

📓

Request specifics

  • Endpoint: POST /processing/api/v1/intents
  • Purpose: Creates an Intent and a PIX Payment.
  • Structure: The standard Intent request is used.
  • For PIX:
    • paymentMethodName must be set to PIX.
    • submittedAmount.currency can be BRL or another supported currency when FX conversion is used.
    • authCurrencyCode must be BRL.
    • incomingDetails.documentType and incomingDetails.documentNumber must contain the payer's valid CPF or CNPJ details.
    • payer.firstname, payer.lastname, and payer.merchantPayerReference are required for PIX processing.
    • payer.email and payer.phone are optional and should be sent only when available.
    • Provide a meaningful description either at the Intent level or in the Payment object. The Payment-level value takes precedence. If both descriptions are omitted, the platform sends a generic static description to the payment partner; the reduced transaction context may negatively affect payment conversion.

Intent Request: Example

{
  "clientReferenceId": "order-123456789",
  "useCheckoutForm": false,
  "payments": [
    {
      "payer": {
        "firstname": "Maria",
        "lastname": "Oliveira",
        "merchantPayerReference": "customer-123456"
      },
      "paymentInstrument": {
        "paymentMethodName": "PIX",
        "incomingDetails": {
          "documentType": "CPF",
          "documentNumber": "52998224725"
        }
      },
      "submittedAmount": {
        "value": 100.00,
        "currency": "BRL"
      },
      "authCurrencyCode": "BRL",
      "description": "Order 123456789",
      "webhookUrl": "https://merchant.example.com/webhooks/payments"
    }
  ]
}

Intent Request: Fields Description

Top-Level Request Parameters
ParameterTypeRequiredDescription
clientReferenceIdStringRequiredOrder or Intent reference in the merchant system.
useCheckoutFormBooleanOptionalDetermines whether the platform Checkout form is used. For a direct server-to-server PIX integration, set this field to false. If omitted, it is treated as false.
paymentsArray of ObjectsRequiredList of payments to create within the Intent. For the flow described on this page, include one PIX payment.
descriptionStringOptionalIntent-level description. It may be used as a fallback when the payment-level description is omitted.
merchantObjectOptionalMerchant information associated with the request.
extensionAttributesObjectOptionalAdditional key-value attributes forwarded to the payment partner as agreed with our integration team. Do not use this object to send ordinary PIX or payer parameters.
payment
ParameterTypeRequiredDescription
clientReferenceIdStringOptionalMerchant reference for this individual payment. It must be unique per settlement account. When supplied, it is returned as clientReferenceTransactionId. Maximum length: 2,048 characters.
payerObjectRequiredPayer information required to create the PIX payment.
paymentInstrumentObjectRequiredPayment method and method-specific input.
submittedAmountObjectRequiredPayment amount in BRL or another supported submitted currency when FX conversion is enabled.
authCurrencyCodeStringRequiredAuthorisation currency. For PIX, use BRL.
descriptionStringOptionalPayment reason or order title. Maximum 128 characters for PIX. If omitted, the platform uses the Intent description or a platform-generated fallback when creating the partner payment.
webhookUrlStringRequiredHTTPS URL to which payment status change webhooks will be sent.
clientDataObjectOptionalMerchant-defined data stored and returned without affecting PIX processing.
payer
ParameterTypeRequiredDescription
firstnameStringRequiredPayer's first name.
lastnameStringRequiredPayer's last name.
emailStringOptionalPayer's email address, for example [email protected].
phoneStringOptionalPayer's phone number in international format, for example +5511999999999.
merchantPayerReferenceStringRequiredStable identifier of the payer in the merchant system. It is used as the payer identifier for PIX processing. Do not send random or fictitious values in production.
paymentInstrument
ParameterTypeRequiredDescription
paymentMethodNameStringRequiredPayment method name. For this flow, use PIX.
incomingDetailsObjectRequiredPIX-specific payer identification details.
incomingDetails
ParameterTypeRequiredDescription
documentTypeStringRequiredBrazilian tax document type. Possible values: CPF or CNPJ.
documentNumberStringRequiredValid document number matching documentType, containing digits only: 11 digits for CPF or 14 digits for CNPJ.
submittedAmount
ParameterTypeRequiredDescription
valueNumberRequiredPayment amount.
currencyStringRequiredPayment currency in ISO 4217 alpha-3 format. Use BRL when no FX conversion is required; another supported currency may be used when FX is enabled.
merchant
ParameterTypeRequiredDescription
nameStringOptionalStore or merchant name.
websiteStringOptionalStore or merchant website.
extensionAttributes

A free-form set of key-value attributes that the platform forwards to the payment partner as agreed with our integration team.

  • Send this object only when its use has been explicitly agreed for your account.
  • Do not place CPF/CNPJ, payer name, amount, payment reference, or webhook URL in this object. Use the standard fields documented above.
  • The object is not returned in Intent or Payment responses and is not included in webhooks.
ParameterTypeRequiredDescription
{attributeName}StringOptionalAttribute name and value supplied by our integration team.

Presenting PIX to the Payer

Payer environmentRecommended experience
DesktopRender qrBase64 as an image and also provide the value from url behind a Copy PIX code button.
MobileProvide a Copy PIX code button using url. The payer can paste the value into a PIX-enabled banking or wallet application.
App-to-appDo not prepend an invented URI scheme to url. The EMV payload is not itself a universal deep link. Use a bank-specific or an approved app-picker flow only when separately agreed and documented.
📘

The QR image and the Copy and Paste value represent the same PIX payment. Do not alter the payload, amount, CRC, or any character inside it.


Payment Statuses

StatusMeaningMerchant action
AUTHORIZATION_REQUESTEDThe PIX payment was created and is waiting for the payer to complete the transfer.Display the QR code or Copy and Paste payload and wait for a webhook.
CAPTUREDThe PIX transfer was successfully completed.Fulfil the order.
DECLINEDThe payment was rejected.Do not fulfil the order. A new payment may be created if the payer wants to try again.
CANCELLEDThe payment was expired before completion.Do not fulfil the order.
ERRORA technical or processing error prevented the payment from completing.Do not fulfil the order. Use the error fields for diagnostics and create a new payment only when appropriate.

Refunds

PIX refunds are returned to the payer's original payment source.

To initiate a full or partial refund, send a separate request to Create Refund.

⚠️

A refund can be created only for a payment in the CAPTURED status. The synchronous refund response confirms that the refund was accepted for processing; wait for the refund webhook or retrieve the refund by ID to obtain its final status.


Full Refund Request

{
  "paymentId": 232510340646563840,
  "partial": false,
  "reason": "Customer requested a refund",
  "webhookUrl": "https://merchant.example.com/webhooks/refunds",
  "clientReferenceId": "refund-20260909-0001"
}

For a full refund, partial may be set to false or omitted. Do not send paymentSubmittedAmount or paymentAuthAmount; the platform calculates the remaining refundable amount.

Partial Refund Request

{
  "paymentId": 232510340646563840,
  "partial": true,
  "paymentSubmittedAmount": {
    "value": 5.00,
    "currency": "BRL"
  },
  "reason": "Partial return of the order",
  "webhookUrl": "https://merchant.example.com/webhooks/refunds",
  "clientReferenceId": "refund-20260909-0002"
}

Use exactly one amount object for a partial refund. Use paymentSubmittedAmount to define the refund in the original submitted currency, or paymentAuthAmount to define it in the PIX authorisation currency (BRL). If the original payment involved FX, the platform calculates the other amount using the exchange rate stored for the original payment.

Refund amount rules
RuleDescription
Eligible paymentThe original payment must have status CAPTURED and must belong to the settlement account making the refund request.
Full refundSet partial to false or omit it. Do not send an amount object. The remaining refundable amount is refunded.
Partial refundSet partial to true and provide one positive refund amount using either paymentSubmittedAmount or paymentAuthAmount.
Mutually exclusive amount objectsDo not send paymentSubmittedAmount and paymentAuthAmount in the same PIX refund request.
CurrencyEach refund amount currency must match the corresponding currency of the original payment. The authorised currency for PIX is BRL; the submitted currency may differ when FX was used.
Maximum refundable amountThe requested amount plus previous active or successful refunds must not exceed the amount of the original payment.
Multiple partial refundsNot yet confirmed for PIX through Pagsmile. Do not rely on multiple partial refunds until this capability is enabled for your account and documented in the final integration guide.
Refund destinationFunds are returned to the original PIX payment source. Do not send recipientPhone or recipientBankCode; those fields are not part of the PIX refund flow.
IdempotencySupply a unique clientReferenceId for every refund. Reusing the same value for the same settlement account results in HTTP 409 Conflict, including when the previous refund ended unsuccessfully.
Top-Level Refund Request Parameters
ParameterTypeRequiredDescription
paymentIdint64RequiredIdentifier of the original captured PIX payment. Use the payments[].id returned by the Intent response.
partialBooleanOptionalSet to true for a partial refund. Set to false or omit for a full refund.
paymentSubmittedAmountObjectConditionalPartial refund amount in the original submitted currency. Its currency must match submittedAmount.currency of the original payment. Required when partial = true and this representation is selected. Do not send with paymentAuthAmount.
paymentAuthAmountObjectConditionalPartial refund amount in the authorised currency. For PIX, the currency must be BRL. Required when partial = true and this amount representation is selected. Do not send with paymentSubmittedAmount.
reasonStringOptionalFree-form refund reason used for informational and audit purposes.
webhookUrlStringOptionalHTTPS URL to which refund status change webhooks will be sent. Supplying it is strongly recommended.
clientReferenceIdStringOptionalMerchant's unique refund reference and idempotency key. Maximum length: 2,048 characters. Supplying it is strongly recommended. It is returned as clientReferenceTransactionId.
paymentSubmittedAmount
ParameterTypeRequiredDescription
valueNumberRequiredPositive partial refund amount.
currencyStringRequiredRefund currency in ISO 4217 alpha-3 format. It must match the submitted currency of the original payment.
paymentAuthAmount
ParameterTypeRequiredDescription
valueNumberRequiredPositive partial refund amount.
currencyStringRequiredRefund currency in ISO 4217 alpha-3 format. For PIX, use BRL.

Refund Statuses

StatusFinalMeaning
ACCEPTEDNoThe refund request was accepted by the platform.
REFUND_REQUESTEDNoThe refund was created and queued or submitted for processing.
REFUNDEDYesThe refund completed successfully and the funds were returned to the original payment source.
DECLINEDYesThe refund request was declined before successful completion.
ERRORYesA technical or processing error prevented the refund from completing.

Webhooks

🔗

More about Payment and Refund Webhooks is available on the dedicated Webhook Overview page.

  • A payment webhook is sent when the PIX payment status changes. Fulfil the order only when the payment status is CAPTURED.
  • A refund webhook is sent when the refund reaches a webhook-triggering status. Treat the refund as successful only when the status is REFUNDED.
  • Webhooks may be delivered more than once. Process them idempotently using the platform transaction ID or your clientReferenceTransactionId.
  • If a webhook is delayed or missed, retrieve the current refund status with GET /api/v1/refunds/{id}.


Did this page help you?