Initial Settings

With the Asaas Plugin, WooCommerce, and the Brazilian Market on WooCommerce installed on your site, your store will be ready to be configured.

You can now activate the payment methods you wish to offer.

To configure this, just access the WooCommerce > Settings menu. On the page, go to the "Payments" tab, and you will find all available payment methods, which you can activate as needed.

Each payment method has its own settings, which can be deactivated or performed independently.

Environments and API Key

Before starting the configuration of payment methods, you will need to connect your WordPress store to your Asaas account.

If you first want to test the integration, you can create an account in the Asaas Development (Sandbox) environment. To do this, visit https://sandbox.asaas.com and create your account.

The production environment is accessed via https://api.asaas.com/

It is important to note that, although the Sandbox environment is identical to the Asaas production environment, each environment will have its own credentials and API Key.

After defining the environment, you will need to generate the API key for it.

To do this, access your Asaas account (in the required environment), and in the user menu, go to the "Integrations" option. On this screen, click on "Generate new API Key", and copy the entire content of the displayed key.

After copying your API Key, access the management page of any payment method provided by Asaas, through the WooCommerce Payments menu. With the page open, navigate to the "API" section.

  • Endpoint: Here you will inform the environment you wish to connect with your store. If you have created your key already in production, inform the value "https://api.asaas.com/v3". If you are testing in Sandbox and have created your key there, inform the value "https://sandbox.asaas.com/api/v3".
  • API Key: Paste here the entire content copied from the Asaas API Key, including special characters.

After informing the Endpoint and your API Key, you can save the changes.

Configuration of Webhooks

Webhooks are triggers sent by Asaas to your site whenever a charge undergoes any status update on Asaas. The purpose is to update the order status in your store according to the payment situation.

To configure the webhook, still in the "API" section of the payment method management page, you will see the label "Webhook".

Below, you will see a step-by-step description of how to perform this configuration within Asaas.

In Asaas, go to the user menu and under Integrations, access the "Webhooks" tab and choose the "Webhook for charges" option.

Check "Yes" in the option "Activate Webhook".

Then, just follow the step-by-step instructions displayed in the Webhook section of the payment method and inform the respective fields in Asaas as instructed.

The configurable fields are:

  • Webhook activated?: Option to keep the Webhook synchronization active or deactivate it. If the option is "No", no event will be created or queued.
  • URL: This field is for informing the URL of your store that will be responsible for receiving and processing events triggered by Asaas. To verify the URL, just check step 3 of the webhook section in the payment method settings.
  • Email: If there is any interruption or failure in the webhook synchronization, an alert email will be sent to the recipient configured in this field.
  • API Version: For integrations with WordPress, always use v3.
  • Authentication Token: To add an extra layer of security, you can add an authentication token that will be sent as an authenticator of all requests from Asaas to your application. Therefore, the token informed in Asaas also needs to be informed in the webhook settings in the payment method definitions. If the authentication token is different in Asaas and in the store (Access Token field), the webhooks will not be synchronized.
  • Synchronization queue activated?: If there is any interruption in the queue due to errors in processing your application, the synchronization queue will automatically be stopped. If this happens, you can analyze the webhook LOGs to understand the reason for the interruption, and after treating the failure, reactivate your queue again by marking the option "Active" and saving the configuration. While the queue status is "Interrupted", events will continue to be generated normally and will remain in queue until it is reactivated again.

After completing the settings, just save the changes in Asaas and in the payment method settings for them to take effect.

The API and Webhook configuration will be present in all payment methods, but this configuration is shared among them all, so it is not necessary to configure each one individually.

Configuring Bank Slip

In the management options for the "Bank Slip" payment method, you will find the following configuration options:

Enable/Disable

Activate to offer payment via Bank Slip to your customer.

Title

This field controls the title of the payment method on the checkout screen.

Description

Information that will be viewed just below the title of the payment method on the checkout screen.

Installments

Inform the limit of installments allowed for Bank Slip. Accepted values between 0 to 60.

Interest per installment

If you have informed a limit of installments in the previous field, additional fields will open for you to inform the interest configuration for each installment option.

Minimum installment value

Defines the minimum allowed value for each installment.

Validity days

Number of days that the bank slip is valid after the purchase.

Validity period

Number of days that the bank slip will be kept in Asaas after its expiration. At the end of this period, the bank slip will be removed. It will be kept if the field is left blank.

Split

If you need to pay commissions or perform divisions of the balance to be received in your charges, you can use the Payment Split in WooCommerce. The functionality is available to all WooCommerce user clients, starting from the Asaas plugin version 2.2.0. See more below in the Split session.

Notifications between Asaas and the customer

Allows Asaas to send email and SMS about the purchase to your customer and notify them periodically while the purchase is not paid. This option is shared with other Asaas payment methods.

API

If you have already configured following the flow of the "Environments, API Key, and Webhook Settings" section, it will not be necessary to configure again.

Configuring PIX

In the management options for the "Pix" payment method, you will find the following configuration options:

Enable/Disable

Activate to make the Pix payment available to your customer.

Title

This field controls the title of the payment method on the checkout screen.

Description

Information that will be viewed right below the payment method title on the checkout screen.

Validity Days

Number of days the Pix is valid after purchase. At the end of this period, the Pix will be removed.

Copy and Paste

If this option is active, the Copy and Paste Pix will be displayed at checkout. If it is disabled, only the QRCode will be displayed.

Split

If you need to pay commissions or perform divisions of the balance to be received on your charges, you can use the Payment Split in WooCommerce. The feature is available to all WooCommerce user clients, starting from the Asaas plugin version 2.2.0. See more below in the Split section.

Notifications between Asaas and the customer

Allows Asaas to send email and SMS about the purchase to your customer and notify them periodically while the purchase is not paid. This option is shared with other Asaas payment methods.

API

If you have already configured following the flow of the section "Environments, API Key, and Webhook Settings", it will not be necessary to configure again.

Configuring Credit Card

In the management options for the "Credit Card" payment method, you will find the following configuration options:

Enable/Disable

Activate to make the Credit Card payment available to your customer.

Title

This field controls the title of the payment method on the checkout screen.

Description

Information that will be viewed right below the payment method title on the checkout screen.

Minimum Total Order

Defines the minimum order value to make the Credit Card payment method available. If you enter the value "0", the payment method will be fully available.

Installments

Inform the limit of installments allowed for Credit Card. Accepted values from 0 to 12.

Interest per Installment

If you have informed a limit of installments in the previous field, additional fields will be opened for you to inform the interest configuration for each installment option.

Minimum Installment Value

Defines the minimum allowed value for each installment.

Split

If you need to pay commissions or perform divisions of the balance to be received on your charges, you can use the Payment Split in WooCommerce. The feature is available to all WooCommerce user clients, starting from the Asaas plugin version 2.2.0. See more below in the Split section.

Notifications between Asaas and the customer

Allows Asaas to send email and SMS about the purchase to your customer and notify them periodically while the purchase is not paid. This option is shared with other Asaas payment methods.

API

If you have already configured following the flow of the section "Environments, API Key, and Webhook Settings", it will not be necessary to configure again.

Subscriptions

If you have the WooCommerce Subscriptions Plugin in your store, you can use it in conjunction with Asaas to create and manage your bank slip and credit card charges in a recurrence/subscriptions format.

The Asaas gateway supports recurrences in the following cycles: MONTHLY, BIWEEKLY, BIMONTHLY, QUARTERLY, SEMIANNUAL, ANNUAL.

To create and manage your subscriptions, just access the menu WooCommerce > Subscriptions.

In the menu, you can follow the status of all your already created subscriptions, besides creating new subscriptions.

With the Asaas plugin, you can create subscriptions with a trial period, in addition to also charging registration fees.

All orders created within a subscription will be linked to it as a "child-order", and can be viewed within the subscription management panel, in the "Related Purchases" field.

It is also possible to determine an end date for the subscription directly in its settings, and this setting will be sent to Asaas to determine the end of the charges.

Payment Split

If you need to pay commissions or perform divisions of the balance to be received on your charges, you can use the Payment Split in WooCommerce. The feature is available to all WooCommerce user clients, starting from the Asaas plugin version 2.2.0.

At the moment, it is possible to configure percentage splits individually for credit card, bank slip, and Pix, allowing you to set up different splits for each payment method.

Configuring the Split

First, you need the WalletId of the wallet that will receive the commission.

Your commissionee needs to access the Asaas account and the WalletId will be located in the Integrations menu.

With the WalletId, you can now configure the Payment Split. For this, go to your store and access the menu WooCommerce > Settings > Payments and select the Asaas payment method for which you want to configure the split.

When selecting the desired payment method, navigate to the Split section. Then, you will define in Quantity the number of commissioned wallets. After saving, the wallet index will be displayed. Now, you can put a Nickname (of your choice, to easily identify in the order logs), the Wallet ID (which is the WalletId provided by your partner) and the Percentage that the commissionee will receive. In total, it should not exceed 100%.

After that, just save the changes and repeat the process in the other payment methods, if necessary.

❗️

Attention

  • Subscriptions are not yet compatible, but we will work on it soon.
  • The split settings are not shared between payment methods, being necessary to configure separately for Pix, Bank Slip, and Card.

Possible Errors

If you enter a value above 100%, when saving the changes, you will receive the following exception:

Split: The sum of the wallets cannot exceed 100%.

If you enter an invalid wallet, you will receive the following exception:

Wallets without nickname, invalid ID, or percentage equal to zero will not be processed at checkout. The wallet $nickname contains an invalid ID format.