#jack11sparrow

1 messages · Page 1 of 1 (latest)

covert elkBOT
glad belfry
#

Hi, can you share more details here? What are you exactly trying to do?

last arrow
#

i am trying to use webhook to know which product is this subscription related to

#

for which i received the checkout.complete event

#

so that i can update my db accordingly

glad belfry
last arrow
#

yes, i am doing like
params := &stripe.CheckoutSessionParams{
LineItems: []*stripe.CheckoutSessionLineItemParams{{
Price: stripe.String(priceId),
Quantity: stripe.Int64(1),
}},
SuccessURL: stripe.String(successUrl),
CancelURL: stripe.String(cancelUrl),
AllowPromotionCodes: stripe.Bool(true),
BillingAddressCollection: stripe.String("required"),
}

#

so i just just need this price/plan
do i need to use metadata here or is there any other better way

glad belfry
last arrow
#

ohkk, thanks

#

one more thing

#

what will happen if i do add expand on subscriptionparams as
subscriptionParams.AddExpand("discount.coupon")
and there is no discount present

glad belfry
glad belfry
last arrow
#

isn't every * (pointer) field in struct is expandable ?

glad belfry