#victorconnexion

1 messages · Page 1 of 1 (latest)

strong swallowBOT
coarse garden
static trail
#

Can you share the customer ID (cus_xxx)?

coarse garden
#

cus_P2v6QBqJ8YQzTI

#

under stripe account : acct_1NYl90EDHsfYjXUP

static trail
#

The default payment method is set under default_source instead of invoice_settings.default_payment_method

coarse garden
#

thanks

static trail
#

No problem! Happy to help 😄

coarse garden
#

question , why default_source is incorrect?

now they both refer to the different id

default_source: 'card_1OFrJ8EDHsfYjXUPkuiWZyCw',

invoice_settings: {
custom_fields: null,
default_payment_method: 'pm_1OEpNPEDHsfYjXUPHxxdGZ6e',
footer: null,
rendering_options: null
},

{
id: 'cus_P2v6QBqJ8YQzTI',
object: 'customer',
address: null,
balance: 0,
created: 1700555111,
currency: 'usd',
default_source: 'card_1OFrJ8EDHsfYjXUPkuiWZyCw',
delinquent: false,
description: null,
discount: null,
email: 'portatest@gmail.com',
invoice_prefix: 'B5D97FE9',
invoice_settings: {
custom_fields: null,
default_payment_method: 'pm_1OEpNPEDHsfYjXUPHxxdGZ6e',
footer: null,
rendering_options: null
},
livemode: false,
metadata: {},
name: 'CXZ:117184:FC9CA381',
next_invoice_sequence: 2,
phone: null,
preferred_locales: [],
shipping: null,
tax_exempt: 'none',
test_clock: null
}

static trail
#

What do you mean by default_source is incorrect? Can you share what you're trying to achieve here?

coarse garden
#

I want to find out the correct default payment id

static trail
#

When Stripe attempt to charge to a customer on his/her default payment method, it will look at invoice_settings.default_payment_method first, then default_source

#

In this case, we will look at the one on invoice_settings.default_payment_method which is pm_1OEpNPEDHsfYjXUPHxxdGZ6e

coarse garden
#

what is the different between two ?

#

why there are two value ?

static trail
#

default_source is the older integration and some interfaces on Stripe still uses it. So it's possible to have two different values. The order will be invoice_settings.default_payment_method first, then default_source

coarse garden
#

ok, thanks