I'm trying to build flutter e-commerce application backend node.js which has PayPal integration and I'm using the V2 version since v1 is deprecated and I don't know where to insert a unique identifier like its DB id for the user when I create the order then I will identify which user pay the payment when I capture the order I'm using the @paypal/checkout-server-SDK package to handle the backend. sorry for my English
1 Answer
If you need the information to be stored as part of the PayPal order record, you can specify a custom_id
when creating the order.
If you just need to keep track of the ID between creation and capture steps, there are many ways to store information temporarily in node, including in a web session, for instance using express-session
. There are many tutorials.
-
where to insert that custom_id in the request create order API in my server and does the PayPal API return that custom_id when the payment is captured– AmanCommented Jun 27, 2022 at 19:39
-
It goes in the purchase_unit developer.paypal.com/docs/api/orders/v2/… Commented Jun 27, 2022 at 19:43