Credit Card - Shopify

Install Asaas Credit Card on Shopify

Use the Asaas Credit Card App to receive card payments directly in the Shopify checkout, without redirecting the buyer to an external page.

The app lets you configure installments of up to 12 and a minimum amount per installment.

Before you start

You need:

  • a Shopify store;
  • an Asaas account;
  • a Production API key;
  • optionally, a Sandbox account and API key for testing;
  • to configure customer contact on Shopify to email only.

On Shopify, go to:

Settings > Checkout > Customer contact method

Select Email only.

❗️

Caution

Credit card payments may show inconsistencies at checkout if the store allows contact methods other than email.

See the Shopify integration general settings.

1. Install the Asaas Credit Card App

Go to Credit Card - Asaas on the Shopify App Store.

With your store logged in, click Install.

Review the permissions requested by the app and click Install again to continue.


2. Configure the API keys

Enter:

  • Production API key: used for real transactions;
  • Sandbox API key: used for testing.

Production and Sandbox have independent accounts and keys. Use the credential that matches the configured environment.

You can use the same API key in the different Asaas Apps for Shopify. To make identification and maintenance easier, prefer creating identifiable keys, for example:

Chave API Shopify Cartão

🚧

Attention

  • A Production API key is required.
  • The Sandbox API key is optional.
  • If both are provided, you can switch between Production and Sandbox using the Test mode option in the app settings.
  • The API key is displayed only once, when it is created.
  • If it is lost, you will need to generate a new key.

See how to create and manage API keys.

3. Configure installments

Define:

  • maximum number of installments, limited to 12;
  • minimum amount per installment.

The number of installments displayed at checkout is calculated from the total purchase amount and these two settings.

For example, even if the limit is 12 installments, a purchase may display fewer installments when the other options do not reach the configured minimum amount.

After configuring, click Save.

Changes to the installment rules affect only new purchases. Orders and payments already processed are not recalculated.

4. Choose the environment and activate the app

Use Test mode to define which environment will process new transactions:

SettingEnvironment used
Test mode enabledSandbox
Test mode disabledProduction

To use the Sandbox, provide a Sandbox key before enabling Test mode.

Changing this setting affects only new transactions.

After defining the environment, activate the Asaas Credit Card App and click Save.

Expected result

The Credit Card option should be available in the Shopify checkout.

Before operating in Production, make a test purchase and confirm:

  • the installments are displayed correctly;
  • the payment is processed;
  • the order is updated after an approved transaction.

Payment flow

%%{init: {"flowchart": {"nodeSpacing": 18,"rankSpacing": 24,"diagramPadding": 4,"padding": 7}}}%%
flowchart TD
A["Start checkout"] --> B["Select Credit Card"]
B --> C["Enter the card details"]
C --> D["Send the payment to Asaas"]
D --> E["Approve the transaction"]
E --> F["Confirm the order on Shopify"]

classDef inicio fill:#DBEAFE,stroke:#2563EB,color:#1E3A8A,stroke-width:3px
classDef validacao fill:#E0F2FE,stroke:#0284C7,color:#0C4A6E,stroke-width:2px
classDef sucesso fill:#DCFCE7,stroke:#16A34A,color:#14532D,stroke-width:3px

class A inicio
class B,C,D,E validacao
class F sucesso

linkStyle default stroke:#94A3B8,stroke-width:2px

Common errors

If the payment does not work as expected, check that:

  • the customer contact method is set to email only;
  • the API key is active and belongs to the selected environment;
  • Test mode is consistent with the configured key;
  • the minimum amount per installment is not reducing the expected installment options;
  • the app is active on Shopify.

For other scenarios, see the Shopify integration FAQ.

Next steps


Did this page help you?