How to Fully Automate Future Captures Against Billing Agreements?


#1

I am working on integrating amazon pay for billing agreements. To my understanding amazon requires me to call their api, authorize, and capture each time I want to charge a buyer with whom I have a billing billing agreement.

For instance, if a buyer has agreed to a monthly payment, I need to call the amazon api each month to make that transaction.

I was wondering if there is a guide on managing subscriptions and automating fund capturing against billing agreements. If not, I was wondering what would be the best way to do system design wise?

A brute force solution I could think of is to query my donation database daily and find records that I have captured funds from a month ago( for monthly subscriptions). Then make a list and call amazon pay api with certain interval for authorization and capture.

It seems to be an app of its own.

Any feedback or recommendations are welcome.