انتقل إلى المحتوى الرئيسي

Order With Switch Payment

we used Copy and Pay method.
see https://hyperpay.docs.oppwa.com/integrations/widget for more info

1 - Preparing payment

The client sends a request to /e-payment/switch/start see Switch start endpoint.
This endpoint will do some checks and create a new transaction and send a prepare request to switch api see Switch prepare endpoint.
After the response returns all the required info to create the payment form will be send back to the client.

2 - Complete Payment

In the client a new form will be displayed to the user, also this form can be customized see COPYandPAY Customization.
After the payment is completed by the user, it should return the user to a frontend url sent in the first step.

3 - Check payment status

The frontend should see the result of the action by sending a request to Switch result endpoint.
This endpoint will use Get the payment status in switch api.

SwitchPaymentProcess