Skip to content

How to only save instance of a class once Checkout Fulfilled (One-time payment) #517

Answered by cjavilla-stripe
SuDa2103 asked this question in Q&A
Discussion options

You must be logged in to vote

Since the webhook is asynchronous, the approach I would take is track the status of the Job instead of waiting to save it.

  1. Create and save the Job with status = :pending
  2. Send customer through Checkout
  3. In FulfillCheckout, if the payment_status of the Checkout Session is paid, update the status = :paid

Replies: 1 comment 4 replies

Comment options

You must be logged in to vote
4 replies
@SuDa2103
Comment options

@cjavilla-stripe
Comment options

@SuDa2103
Comment options

@felipecerda
Comment options

Answer selected by SuDa2103
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants