Quickstart
Launch Beam's Cashout Form and authenticate your user into Beam
Step 1: Create a Beam Developer Account
If you don't already have an API key, submit a typeform request.
For Production, you will need to add your IP addresses to our allowlist by messaging us on slack or sending an email, see more information here.
Step 2: Onboard your first Account
Onboard your first account using Beam by make a POST request to create an account. You can either create an account for an Individual or a Business
Step 3: Host Beam's Cashout Form
The response from Step 2 is the onboardingUrl
. Use the onboardingUrl
in your iframe to host the embedded form that launches the UI and authenticates the user into Beam.
<iframe title="Cashout Form" src={onboardingUrl} ></iframe>
Step 4: Listen for Beam Close Event
// Listen for close event
window.onmessage = function (e) {
// Close iframe and perform action on iframe event
console.log(e.data.eventName === 'beamIframeCloseOnSuccess');
// Save User's Unique Beam Token
console.log(e.data.publicToken === "BEAM_INDIVIDUAL_OR_BUSINESS_ID");
};
Step 5: Save User's Beam Token
For Individuals: Once the user has completed KYC, agreed to Beam's Terms, and entered their preferred payment method, the dialog will close and you will be given the Individual's unique id which can be used to query for wallet addresses(one per asset).
For Businesses: Once the user has completed KYB, agreed to Beam's Terms, and entered their preferred payment method, the dialog will close and you will be given the businesses unique id. KYB can be instant or can take upwards of a few days to complete. Once KYB has been completed you will receive a webhook notification.
You're all set!
Learn more about creating business logic around Beam events using webhooks here
Updated 5 months ago