#Durrell - Issuing

1 messages ยท Page 1 of 1 (latest)

rotund sonnet
#

HI ๐Ÿ‘‹

night lichen
#

Hi the request_id is: req_MbTzlmEVgr2hCF

rotund sonnet
#

Oh, it's a connect situation... ๐Ÿค”

#

I don't see any code snippet that calls this specific method. Can you tell me which step you are hitting this error on?

night lichen
rotund sonnet
#

How was the account in question created?

night lichen
#

I made this call (test data):

stripe_account = Stripe::Account.create(
              country: "US",
              type: "custom",
              business_type: "company",
              capabilities: {
                card_payments: { requested: true },
                transfers: { requested: true }
              },
              email: "durrellc@gmail.com",
              company: {
                address: {
                  city: "Chino",
                  country: "US",
                  line1: "4403 Kennedy St",
                  postal_code: 91710,
                  state: "CA"
                },
                name: fleetio_account.name.presence,
                phone: 9092718500,
                structure: "private_corporation",
                tax_id: "1234567890000000"
              },
              business_profile: {
                mcc: 7623,
                name: "Jean Genie",
                product_description: "Cars",
                support_address: {
                  city: "Chino",
                  country: "US",
                  line1: "4403 Kennedy St",
                  postal_code: 91710,
                  state: "CAP"
                },
                support_email: "durrellc@gmail.com",
                support_phone: "9095913306",
                support_url: "https://ebay.com",
                url: "https://gole.coasdfads"
              },
              settings: {
                card_issuing: {
                  tos_acceptance: {
                    date: Time.now.to_i,
                    ip: "136.52.47.132",
                    user_agent: "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36"
                  }
                }
              },
              default_currency: "USD"
            )
rotund sonnet
#

Did you use the Dashboard or the API?

night lichen
#

API

rotund sonnet
#

Okay, the API.

#

And this request was made with your test key?

night lichen
#

correct

rotund sonnet
#

Okay wait...damn can't believe I missed this

#

Your method call to create/update the person needs to include the Account ID. Without it you are trying to create/update the Person record on the platform which is only available in Live mode

#

Based on your code above, you need to use stripe_account.id to specify the Account on which you are creating/editing the person.

night lichen
#

I believe that is what I'm doing:

          person = Stripe::Account.create_person(
            stripe_account.id,
            { first_name: "Jane", last_name: "Diaz",
              id_number: params["pii"],
              address: {
              city: "Chino",
              country: "US",
              line1: "4402 Kennedy St",
              postal_code: 91710,
              state: "CA"
            },
              dob: {
              day: 1,
              month: 2,
              year: 1970
            },
              email: "durrell.chamorro@gmail.com",
              phone: 9092708500,
              relationship: {
              owner: true,
              percent_ownership: 25,
              representative: true,
              title: "CEO"
            } }
          )
rotund sonnet
#

The requests you made did not include the account id. They were occurring on the platform

night lichen
#

according to the docs here: https://stripe.com/docs/api/persons/create it looks like the first argument to that create_person method is the account id right? That's what I'm doing with:

person = Stripe::Account.create_person(
            stripe_account.id,
...
rotund sonnet
#

I realize that is what you code is showing but that ID is not present in the API requests being made

night lichen
#

I get the same error when I hard code the account_id string:

person = Stripe::Account.create_person(
  "acct_1KvsJ6Hzbp866E2u",
...
)
rotund sonnet
#

That account ID is for the Platform

#

The ID for this account is "acct_1LFKABQb2SY0LqL1". If you wish to create a Person on that account you need to use that ID

quick vale
#

@night lichen Did you still need help?

night lichen
#

I think Snufkin figured out the problem. I'm just testing my code right now. I kept the chat open in case I had another question.

quick vale
#

๐Ÿ‘

night lichen
#

thank you @rotund sonnet That worked! Really appreciate it! ๐Ÿ˜„