0

To create a card the documentation says we should strt with

balanced.init('${REPLACE_THIS_WITH_YOUR_MARKETPLACE_URI}') 

yet the only examples point to v1/marketplaces/. Error: uncaught exception: Invalid marketplace uri stipulates we should look in our dashboard to get the right URI. I'm working on a test marketplace and in my Settings page the Domain URL: says Test, yet if I try to init with /test, and various combinations thereof with no success. So I've fallen back to the fiddler example of v1/marketplaces which doesn't fail on init. But when I use this initialization I'm getting a 404 error.

The response is:

{"status":404,"error":{"status":"Not Found","category_code":"not-found","category_type":"request","description":"

The requested URL was not found on the server.

If you entered the URL manually please check your spelling and try again.

Your request id is ####.","request_id":"###","status_code":"404"}}

Is v1/marketplaces the proper URI for testing, and if not, where do we find it (cause it's certainly not apparent in the dashboard settings page.

Community
  • 1
  • 1
JohnL
  • 13,682
  • 4
  • 19
  • 23

1 Answers1

2

With the most recent version of balanced.js for the v1.1 of the api you actually do not need to initialize to a marketplace. Credit cards and bank accounts (funding instruments) are now tokenized at the root level (/cards and /bank_accounts) and no longer under marketplaces. You can learn more on our guide to balanced.js. I'd also suggest checking our example jsFiddle example.

Also, in that example for the old balanced.js, it was asking for your URI (uniform resource identifier), not your URL. The marketplace URI is '/v1/marketplaces/' + marketplace ID (eg: /v1/marketplaces/TEST-MPJ1TvJrxnGlUGPG0Fpa0ey). For v1.1 we now use HREF instead (eg: /marketplaces/TEST-MPJ1TvJrxnGlUGPG0Fpa0ey).

Remear
  • 1,927
  • 12
  • 19
rserna2010
  • 449
  • 3
  • 9