How do I implement a cloud payment sistem in Flutter?

Hi everyone! I’m Pedro and I’m tryng to implement a payment sistem that keeps the money safe when someone buys a product in my app.

Example: I buy a product → the money stands on cloud. If the product reachs me, the money goes to the seller. If the product does not comes to me, my money comes back to me.

Does anybody knows how to implement a system like that in Flutter? Is there a library to implement that does exactly this?

I hope you can help me,
Thanks!