On my client, I have an order which has the items I want to buy. When I "checkout" the order, I send a request to my firebase cloud function and the function responds with a link to the online payment transaction. After the customer completes the transaction, a request from the company (who serves the online payment service) is being dispatched to one of my cloud functions who shall process the payment.
After I validate the payment, I want to store the new data of my payment to the order (e.g. status, completion date etc...).
How can I store my new data? I know that with firestore I can simply use the .set(..)
method.
admin.firestore()
to get access to you database. Also you can handle different events on your documents. For more read this. And very simple example here