More info on tracking one-time charges #938
Unanswered
harrison-broadbent
asked this question in
Q&A
Replies: 1 comment 4 replies
-
Yeah, although webhooks aren't reliable so you could end up in a situation where the user is redirected before the fulfillment happens. I also use the redirect_url from the checkout session to call |
Beta Was this translation helpful? Give feedback.
4 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Hey!
I'm curious what the recommended way to handle one-time purchases through
pay
is. Specifically, I'm looking at Section 8 of the Stripe docs (https://github.com/pay-rails/pay/blob/main/docs/stripe/8_stripe_checkout.md#fulfilling-orders-after-checkout-completed) where there's some information on fulfilling orders after a checkout.I'm struggling to figure out what should go in the
# Handle fulfillment
section of the given code example —I'm wondering if I should manually create a
Pay::Subscription
here to indicate that the User (who just purchased access or whatever) now has access to the product.Does this seem right, or am I missing something? I'm wondering if there's a state on
Pay::Customer
I should set here instead; I've gone through thePay::Customer
code at https://github.com/pay-rails/pay/blob/main/app/models/pay/customer.rb but nothing stood out to me.Thanks!
Beta Was this translation helpful? Give feedback.
All reactions