Skip to content

Instantly share code, notes, and snippets.

@adamjstevenson
Created October 20, 2017 23:13
Show Gist options
  • Save adamjstevenson/d5ca80c5c8a84de42c8d65922a1cf80d to your computer and use it in GitHub Desktop.
Save adamjstevenson/d5ca80c5c8a84de42c8d65922a1cf80d to your computer and use it in GitHub Desktop.
Create Stripe account
# Creates a Stripe account with some minimal account information submitted from a form
stripe_account = Stripe::Account.create(
type: "custom",
legal_entity: {
first_name: account_params[:first_name].capitalize,
last_name: account_params[:last_name].capitalize,
type: account_params[:account_type],
dob: {
day: account_params[:dob_day],
month: account_params[:dob_month],
year: account_params[:dob_year]
}
},
tos_acceptance: {
date: Time.now.to_i,
ip: request.remote_ip
}
)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment