New Payment
In this section, we will learn how new payment processing works on Fynd Commerce and how to create initiatePaymentSession and getPaymentStatus APIs for forward flow.
📄️ Create API to Initiate Payment Session
When a customer initiates a payment on the storefront’s checkout page, the storefront sends a payment request to Fynd Commerce. Upon receiving this request, Fynd Commerce generates a gid (a unique transaction identifier) and a fyndplatformid (a unique order identifier associated with the payment). To process the payment, Fynd Commerce calls the initiatePaymentSession API of the Payment Extension, providing essential payment details such as customer information, transaction amount, currency, and supported payment methods.
📄️ Initiate Payment Session
📄️ Create API to Get Payment Status
The getPaymentStatus API needs to be developed to retrieve the current status and details of a payment session or transaction. By using the gid, the platform tracks whether a payment has been successfully processed, is still pending, or has failed. This API ensures that payment transactions are accurately recorded and updated in the system, preventing discrepancies in order and payment records.