Search code examples
http-redirectbalanced-payments

Time lag creating merchant accounts via Balanced API


I just set up our first live merchant on Balanced Payments and am looking to credit them. In the account creation process, I received the redirect request in my code, I followed that.

I entered in the merchant data and account information, and was successfully redirected back to my site with the account URI and email.

I can successfully retrieve the account via the API, but I do not see it listed in the accounts list page on my balanced dashboard. Is there possibly some lag time before a new live merchant account would show up?


Solution

  • When Balanced creates a merchant for you via the KYC process, you're not passing any authentication information to the API which means Balanced does not have the ability to create objects within your account. This is important to note because:

    Balanced will create a Merchant which represents an identity within the Balanced system (this identity is not associated to any particular marketplace), but it doesn't create the actual Account on your marketplace.

    The documentation notes that it is the URI of this Merchant which is returned to you, however you will need to then use this identity to create an Account within your marketplace. You are able to do this as you have an API key to authenticate the request.

    Here is an example of creating the account using the Balanced Ruby client:

    # URL looks like https://yoursite.com/kyc/complete?email_address=merchant@exam
    # ple.org&merchant_uri=/v1/merchants/MR3KJZgnQcg8OX8FrTWlRszn
    merchant_uri = params[:merchant_uri]  # alter to your framework for GET params
    email_address = params[:email_address]
    
    merchant = Balanced::Marketplace.my_marketplace.create_merchant(
        email_address,
        merchant_uri
    )