I am implementing a payment provider and I need some info from the card (such as VAT total) to properly initiate payment. What is the best way to add this info to the InitiatePaymentInput ? I understand that I could send this info from the front-end, but it doesn't look safe. On the other end, I cannot see any option to hook the createPaymentSessionsWorkflow. What do you suggest ? Thanks
#cart iformation within InitiatePaymentInput
2 messages · Page 1 of 1 (latest)
You can store whatever information you might need inside the initiatePayment of your payment provider when creating the payment session for the collection from your storefront.
You can pass any arbitrary information through the data property: https://docs.medusajs.com/api/store#payment-collections_postpaymentcollections
The createPaymentSessionWorkflow is called when you create the payment collection