Skip to content

Unable to access owner_customer when trying to get a marketplace's bank account. #54

@jrthib

Description

@jrthib

The example provided at the following links:
https://github.com/balanced/balanced-node/blob/master/snippets/order-credit-marketplace.js
https://docs.balancedpayments.com/1.1/guides/orders/credit-marketplace/

These examples show how to retrieve a marketplace's bank account, however in my trials, balanced.marketplace.owner_customer returns as undefined from balanced.marketplace.

After further investigation, I realized the promise for balanced.marketplace had to be resolved first and came to this example:

balanced.marketplace.then(function(marketplace) {
    marketplace.owner_customer.bank_accounts.get(0).then(function(bankAccount) {
        console.log(bankAccount);
    });
});

The code above, works for me. Is this how it is actually supposed to work, which means the examples are off, or am I not using the module correctly?

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