# PagBrasil

{% hint style="info" %}
This gateway supports payments by credit card, Boleto Flash, PEC Flash, and PIX

More information about the checkout flow for each option can be found at <https://pbdocs.pagbrasil.com/>
{% endhint %}

{% hint style="info" %}
Customer tax Id is required for all transactions. For a new sale pass the Id using the custom5 parameter
{% endhint %}

{% hint style="info" %}
Recurring payments are disabled by default at PagBrasil. If you want to use recurring payments, please contact PagBrasil for further information. Recurring payments are supported on credit cards only.
{% endhint %}

{% hint style="danger" %}
PagBrasil supports only full refunds. Partial refunds will be rejected.
{% endhint %}

{% hint style="info" %}
Installments can be passed to PagBrasil using the custom4 parameter on Import Order API.  Send a number between 1 and 12.

If using CheckoutChamp pages then this can be accomplished with either an input or a select.
{% endhint %}

**Step 1:**

Go to **Merchants** → **Gateway Integrations** and activate the PagBrasil tile with the “**+ Activate**” button

<figure><img src="https://3790748257-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FT43PzcNjyZtWby9yrGd3%2Fuploads%2FKwGZeecKKDUBx1daSV1v%2Fimage.png?alt=media&#x26;token=1ca39e91-b152-4918-8205-89683e4258ab" alt=""><figcaption></figcaption></figure>

**Step 2:**

Enter the **token** and **secret** from your PagBrasil account.

Choose to use the PagBrasil test server. Be sure to uncheck **useTestServer** before starting live traffic.

Press the green “Create Gateway” button to create your PagBrasil gateway.

<figure><img src="https://3790748257-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FT43PzcNjyZtWby9yrGd3%2Fuploads%2FOZKmYbhPDFGJdAKpq0az%2FUntitled.png?alt=media&#x26;token=9e6a35be-e3fa-41b6-9793-7cdde13cffcf" alt=""><figcaption></figcaption></figure>

**Step 3:**

Apply the gateway to your offers and upsells within the campaign.

**Step 4:**

Implement the following requirements for each of the payment options when using the [Import Order API](https://apidocs.checkoutchamp.com/#275a54c6-b4b0-414c-819b-7387e9a81f58)

* Credit cards
  * Pass full card information as documented in Import Order API
  * custom5 = \[consumer’s tax id]
* Boleto Flash
  * paySource = PREPAID
  * prepaidType = PAGBRASIL\_BOLETO
  * custom5 = \[consumer’s tax id]
  * After successful checkout the Boleto consumer URL is available in CRM in the Transactions panel on the customer and order detail pages (Show Txn Additional Data)
* PEC Flash
  * paySource = PREPAID
  * prepaidType = PAGBRASIL\_PEC
  * custom5 = \[consumer’s tax id]
  * After successful checkout the PEC consumer data is available in CRM in the Transactions panel on the customer and order detail pages (Show Txn Additional Data)
* PIX
  * paySource = PREPAID
  * prepaidType = PAGBRASIL\_PIX
  * custom5 = \[consumer’s tax id]
  * Ensure that the checkout page supports [basic 3DS redirect functionality](https://help.checkoutchamp.com/crm/gateway-setup/direct-api-3ds-instructions) so the QR code is automatically displayed to the consumer

**Step 5:**

Login to your PagBrasil account

Go to Account → Settings → Main

Set IPN URL to **<https://api.checkoutchamp.com/billers/pagbrasil/notification/>**

This step is required to properly receive completed payment notifications from PagBrasil
