-
In your form, gather email address, credit card, and amount
-
With balanced.js post the card data to Marketplace cards_uri
- response is unique card token URI
- response is never 409 Conflict ; passing the same card will always create a new token
-
In js callback, post the email address, card token and amount to your server
-
On your server, post the email plus card URI to the Marketplace accounts_uri to create buyer account.
- If account (identified by email address) doesn't exist, response includes URI
- If account exists, response is 409 Conflict.
{"status":"Conflict",
"category_code":"duplicate-email-address",
"category_type":"logical",
"additional":null,
"status_code":409,
"description":"Account with email address '[email protected]' already exists"}
- If 409, query the marketplace for the account URI associated with that email address, and associate the card uri with that account using the cards_uri
- Finally, use the account URI, the card token, and the amount to make a hold.