How To Verify Flutterwave Single Payment Transaction (Funding Wallet)

Ok so, basically I need a user to be able to fund their wallet.

Desired User Experience

  1. First a user goes to the account page and clicks “Fund Wallet” button which opens a pop up on which they have to input the amount they want to fund and press “Pay” button.

  2. They get sent to the flutterwave url where they can choose their desired payment method and complete their payment.

  3. After completing their payment, they get redirected back to account page. If the transaction was successful, they should see that the amount they paid has been added to their wallet balance.

So I have a work flow that goes…

When pay button is clicked

Step 1
Trigger flutterwave single payment with the following details
(transaction ID = random string)
(amount = input amount’s value)
(email = current user’s email)
Flutterwave sends a unique transaction url back specifically for this user’s transaction which I will use in step 2.

Step 2
Open external link
(destination = result of step 1’s link) so that user can go and complete their payment.

Step 3
Create a new thing in ‘Deposits’
(amount = input amount’s value)
(status = )
Apparently, I’d like keep a bubble database of all transactions (user, amount, and status)

Step 4
Trigger flutterwave verify payment
(path) transaction id = :face_with_monocle:?? (stuck here) should I put ‘result of step 1’s link’?

Step 5
Make changes to thing ‘Current User’
(balance = This user’s balance + input amount’s value)
Only when Result of step 4 flutterwave verify payment’s status = “successful”

Step 6
Make changes to thing in ‘Deposits’
Constraint ; Created by = Current User
(last item’s status = Result of step 4 flutterwave verify payment’s status)

The problems/errors

  1. (error) step 2 - Open external link must be the last step of the work flow. :weary: How then will the rest steps get the data they need to execute?

  2. To verify this specific user’s flutterwave transaction, what do I input for (path) transaction id ______?

  3. With this work flow, I’m not sure steps 3 to 6 will execute only after payment is complete, it seems to me like they will execute while the user is away on the external link. :thinking:

What am I missing?

help :disappointed_relieved: