#jwerre

1 messages · Page 1 of 1 (latest)

placid lindenBOT
true copper
#

Do you have a request where you pass tax_ids to create a Customer?

grand sequoia
#

I'm creating the customer with this data:

{
  email: 'billing-lg2qllh4@surveyplanet.com',
  address: {
    line1: '123 Palm St.',
    state: 'FL',
    city: 'Orlando',
    postal_code: '32789',
    country: 'US'
  },
  tax_id_data: [ { type: 'us_ein', value: '12-3456789' } ],
  tax_exempt: 'reverse',
  tax: { ip_address: '192.168.0.1' },
  name: 'Acme Inc.',
  phone: '5555555555',
  metadata: {
    'user-id': '642c8e25822d23f8594febc3',
    'user-email': 'lg2qllh4@surveyplanet.com'
  }
}

But the result is:

{
  id: 'cus_Nea0Cz92r1hrxd',
  object: 'customer',
  address: Object {
    city: 'Orlando',
    country: 'US',
    line1: '123 Palm St.',
    line2: null,
    postal_code: '32789',
    state: 'FL'
  },
  balance: 0,
  created: 1680641574,
  currency: null,
  default_source: null,
  delinquent: false,
  description: null,
  discount: null,
  email: 'billing-lg2qllh4@surveyplanet.com',
  invoice_prefix: 'D1942D32',
  invoice_settings: Object {
    custom_fields: null,
    default_payment_method: null,
    footer: null,
    rendering_options: null
  },
  livemode: false,
  metadata: Object {
    'user-email': 'lg2qllh4@surveyplanet.com',
    'user-id': '642c8e25822d23f8594febc3'
  },
  name: 'Acme Inc.',
  next_invoice_sequence: 1,
  phone: '5555555555',
  preferred_locales: Array [],
  shipping: null,
  tax_exempt: 'reverse',
  test_clock: null
}
true copper
#

Nevermind, I got it. Looking now

#

So you need to expand the tax_ids hash in order to get this information back. It is not included by default.

https://stripe.com/docs/expand

Learn how to reduce the number of requests you make to the Stripe API by expanding objects in responses.

grand sequoia
#

req_zNoTUPutVCzxp4

#

He is the request id

#

can you expand when creating?