Submit a ticket My Tickets
Login  Sign up
Open navigation

PagSeguro Payment Gateway

Pro Trainer
Learning Center
High Volume & Corporate

Existing vs New PagSeguro Customers

In mid-June 2023, the PagSeguro API made drastic changes that won’t allow new PagSeguro customers to use the provider with LearnWorlds. 

Boleto in LearnWorlds was supported through our integration with PagSeguro, however for new LearnWorlds customers, if you wish to provide your learners with the Boleto payment option, LearnWorlds supports Boleto payments via the Stripe Payment Gateway

For existing PagSeguro LearnWorlds users, Boleto will still be supported with Pagseguro.

In this article, you will learn how to connect the PagSeguro payment gateway to your school and which payment methods are offered to your future students after setting it up.

How to Set up PagSeguro as Your Payment Gateway

Pagseguro works only with Brazilian Real (BRL) hence in order to use this gateway change the school's currency to BRL in Financial Settings

1. Navigate to Settings → Financial →  Currency and select Brazilian Real.

2. Open your PagSeguro account page in a different tab in your browser and navigate to Minha Conta → Preferências → Integrações → Gerar Token. Copy the respective API token.

3. Go to Settings → Financial → Payment Gateway, select the PagSeguro gateway, and paste the copied API token, as well as the Pagseguro account email into the respective fields.

If you would like you can also sell your courses with PayPal & Stripe as well, and have all three payment gateways enabled in your school simultaneously.

The Sandbox option must be deactivated when the school goes live, to avoid paid course access without payment since when in sandbox mode, no credit cards will actually be processed. This model is offered only to test the payment flow and generate sample invoices.

Payment Process

These are the steps that your users need to follow to complete their purchase. 

1. The user navigates to the Payment page and selects to pay with the Pagseguro gateway:

2. When the user selects Buy with PagSecuro a pop-up window will open, where the user can find information about their transaction.

In that window, the email field is auto-completed with the user’s email which can be also replaced. If the mail is not already registered in Pagseguro, the user is requested to enter their information.

3. The user will need to select a payment method, among Credit Card, Boleto, or others by clicking on Todas as formas de pagamento (to see all the available installments by Pagseguro).


Then fill in all the rest of the required data.

4. Finalize payment. 

Payment Options

Credit Card: The user enters their credit card info and selects a way to pay e.g. the whole amount or installments. These options have been already set by the admin in the PagSeguro system.

In the end, the system grants access to the product(s) and generates an invoice for the transaction.

Boleto: Boleto is created in PagSeguro. When the user takes the Boleto code, then they can postpone the payment for about 3 days, and pay later using that code.

In that case, the transaction will be in Awaiting Payment state and found in the Reports Center →  Orders→ Awaiting payments as shown below.

When the product will be paid in PagSecuro the system will automatically give access to the user in LearnWorlds and will issue the respective invoice.

The invoice can be found in your LearnWorlds school in Reports Center →  Orders.

In case the payment eventually is canceled/not completed in PagSecuro then the transaction will disappear in your LearnWorlds school.

As mentioned above, there are more payment methods available in Pagseguro (by clicking on Todas as formas de pagamento.)

Online Debit (TEF)

Deposit account

...or Balance Insurance.

To sum up, the PagSeguro payment gateway supports the following paying methods:

  • Credit Card:  the payment is processed immediately or within a few hours, depending on your risk rating.

  • Boleto: This type of payment is usually confirmed one to two days after the ticket-boleto payment. The ticket maturity is 3 days.

  • Online Debit (TEF): This type of payment is usually confirmed within a few hours.

  • Balance Insurance: The buyer had sufficient balance in his Pagseguro account and paid in full for the transaction using their balance.

  • Deposit account: The transaction will be confirmed only after the completion of this process, which can take from 2 to 13 business days.

You can find out more on how to create Promotions (Coupons), here.

Did you find it helpful? Yes No

Send feedback
Sorry we couldn't be helpful. Help us improve this article with your feedback.