#bart-subscription-id

1 messages · Page 1 of 1 (latest)

brazen solsticeBOT
regal current
#

bart-subscription-id

#

Hey @honest shore ! The id doesn't change between cycles! A new Invoice in_123 is created each cycle to accept a payment for that specific cycle/period but the Subscription id sub_123 stays the same

honest shore
#

thank you!

#

one quick question

#
    if err != nil {
        log.Fatalf("Error retrieving subscription: %v", err)
    }

    fmt.Println("Subscription Information:")
    fmt.Println("ID:", subscription.ID)
    fmt.Println("Customer ID:", subscription.Customer.ID)
    fmt.Println("Status:", subscription.Status)```
#

how can i get the phone number the user inputed?

regal current
#

What's the context? Like how do you collect the phone number in the first place?

honest shore
#

so in my subscription link

#

i request phone number

#

how can i get the phone number that was entered in the subscripton

regal current
#

what does that mean "my subscription link".

honest shore
#

i generated that subscription link

#

from the website

#

and in that subscription link i request the users phone number

regal current
#

Okay so you use PaymentLinks.

honest shore
#

yes

regal current
#

So that PaymentLink plink_123 will be associated with a Checkout Session cs_test_123 for that specific payment by a Customer. And that will be associated to the created Subscription sub_123

honest shore
#

so its saved in the customerID?

#

cus_NGe6nFafmyeK76

regal current
#

yes, look at it in the Dashboard or the API and you should see it

honest shore
#

i got it! thank you so much