Skip to content

Needing to call AbacatePay.default and not AbacatePay when using JS #5

@ChristoPy

Description

@ChristoPy

We where live with a client that was having issues integrating. Turns out they where using a pure JS nextjs backend.

In the end, we had to change the code from the snippet in our doc from:

import AbacatePay from 'abacatepay-nodejs-sdk';

// Initialize the SDK with your API key
const abacate = AbacatePay('your_api_key');

to:

import AbacatePay from 'abacatepay-nodejs-sdk';

// Initialize the SDK with your API key
const abacate = AbacatePay.default('your_api_key');

The VSCode was not showing the autocompletions correctly from the AbacatePay import, when console.log the import, this was the result:
{AbacatePayError, default}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions