#jack11sparrow

1 messages · Page 1 of 1 (latest)

twin muskBOT
silver burrow
#

On your first question, can you add more details? What integration are you using?

short narwhal
#

using gosdk and webhooks
we have both subscriptions and one time payments
so want to know if one time payment also have invoice including events like invoice.paid

#

will check the receipt link
can you just tell does stripe provide functionality to send invoice email to customer?

silver burrow
short narwhal
#

doing something like
paymentIntentParams := &stripe.PaymentIntentParams{
Description: stripe.String(description),
Amount: stripe.Int64(amount),
Customer: stripe.String(customerID),
Currency: stripe.String(string(stripe.CurrencyUSD)),
}
paymentIntentParams.AddExpand("payment_method")

pi, err := paymentintent.New(paymentIntentParams)
if err != nil {
    if stripeErr, ok := err.(*stripe.Error); ok {
        logger.Logger.Error(stripeErr.Msg, zap.Any("paymentIntent", err))
        return nil, common.NewError(strconv.Itoa(stripeErr.HTTPStatusCode), stripeErr.Msg)
    } else {
        logger.Logger.Error("Some internal server error occurred", zap.Any("coupon", err))
        return nil, common.NewError("500", "Error creating payment intent")
    }
}
silver burrow
#

I see, in this case, we do not support this functionality. I'm happy to provide this feedback to the team. Are you able to share your specific business use case of needing to send invoices for one off payments?

short narwhal
#

when you say send invoices
does that mean email to user
or the invoice events that gets triggered usually with subscription?

#

usecase -> we depend on webhooks to know the payment details, right now for subscription we are listening to invopice.paid, so wanted to know if we can do the same for one off payments
anyways i think we can use payment events like payment.succeeded

one clarification we are using our own mailing functionality instead of stripe and planning to use stripe instead
can you confirm if all payments made the way showed in the above format, will send email to user on successful payment for both subscription and one off payments

twin muskBOT