#mkoenke-standard-onboard

1 messages · Page 1 of 1 (latest)

tacit sonnet
unkempt raven
#

to be more specific on the first call we need to be able to pass a bunch of params with the api_key such as StripeAccountCreator.new(@company, params[:stripe_bank_raw], stripe_acct_data, api_key)

tacit sonnet
#

Hi there! Give me a moment to look into how to accomplish this.

unkempt raven
#

thank you!!

reef bronze
#

hello, I can look one sec

unkempt raven
#

ok thank you!

reef bronze
#

yeah not sure how the "named parameters" approach with passing something from the options hash works, might ask internally

reef bronze
#

in the meantime, I assume you know how it works with passing a params hash and an options hash separately? (still unclear on the named params approach)

unkempt raven
#

we send it like this (params hash, options hash)

#

right?

reef bronze
#

you were sending the "named parameters" approach in the example above

but with the (params, options) approach is simple

you want

Stripe::AccountLink.create({
  account: 'acct_10333333333333333',
  refresh_url: 'https://example.com/reauth',
  return_url: 'https://example.com/return',
  type: 'account_onboarding',
}, {
  api_key: 'sk_test_123',
}) 
#

for per-request api keys

unkempt raven
#

got it thank you!!

#

can we do the same for Stripe::File.create({ purpose: 'identity_document', file: File.new('/path/to/a/file.jpg'), }, { stripe_account: '{{CONNECTED_STRIPE_ACCOUNT_ID}}', })