payment_source_typeattribute value from the payment method associated with the order first.
GETrequest to the
/api/orders/:idendpoint, including the associated payment method, and read its
payment_source_typeattribute value from the response.
POSTrequest to an endpoint that is different for each payment source. That means you need to dynamically build the request URL based on the
payment_source_typeattribute value of the selected payment — i.e.
/api/:payment_source_type— and fill the request payload with the specific attributes required by each payment gateway and the relationship with the order.