Desktop/Mobile Website Browser
Accept Skrill payments on your website by redirecting shopper to Skrill pages. See checkout process below:
- The shopper selects Skrill payment option on checkout page
- The shopper is redirected to Skrill checkout page with payment details
- The shopper enters required information and confirms the payment
- The shopper is redirected to the confirmation page containing the payment result
Step 1. Initialize a Payment Intent
Create a PaymentIntent object with a request_id, amount, currency and a merchant_order_id from your backend server. Supported currencies: EUR, GBP, USD.
1curl -X POST https://api-demo.airwallex.com/api/v1/pa/payment_intents/create \2 -H 'Content-Type: application/json' \3 -H 'Authorization: Bearer {{ACCESS_TOKEN}}' \4 -d '{5 "request_id": "ed11e38a-7234-11ea-aa94-7fd44ffd1b89",6 "amount": 20,7 "currency": "EUR",8 "merchant_order_id": "85d7b0e0-7235-11ea-862e-9f6aa1adfca6",9 "return_url": "https://www.airwallex.com"10 }'
Step 2. Redirect to Skrill to complete payment
When a shopper selects to pay with Skrill on their desktop/mobile browser, call the following API endpoints to get the URL which you can use to redirect the shopper to Skrill payment page to complete the payment.
-
Obtain URL from Airwallex and redirect shopper to Skrill
The
country_codefield accepts an Alpha-2 country code according to ISO 3166.Request:
Shell1curl -X POST https://api-demo.airwallex.com/api/v1/pa/payment_intents/{{PAYMENT_INTENT_ID}}/confirm \2 -H 'Content-Type: application/json' \3 -H 'Authorization: Bearer {{ACCESS_TOKEN}}' \4 -d '{5 "request_id": "ed11e38a-7234-11ea-aa94-7fd44ffd1b89",6 "payment_method": {7 "type": "skrill",8 "skrill": {9 "shopper_name": "xxxxxx",10 "shopper_email": "[email protected]",11 "country_code": "AU"12 }13 }14 }'Response: Render the value of
urlto redirect shoppers to Skrill.JSON1{2 "next_action": {3 "type": "redirect",4 "method": "GET",5 "url": "https://r2.girogate.de/skrill/T1069/I?tx=946001329&rs=PpRx4KawQpYlXP991Nx9PM2uNje3tqHR&cs=c54ab68084c1e125a1060370a2788b58f2f424ea0cc320b697248d437b105a59"6 }7} -
Wait for notification from Airwallex
Airwallex will notify you on the payment result asynchronously via the webhook API. Please refer to webhook documentation to set up your webhook accordingly. Although subscribing to different events is optional, it is recommended to at least subscribe to the
payment_intent.succeededwhich indicates that the shopper has successfully paid for the order via Skrill. -
Query the PaymentIntent status
You may also query the status of a payment anytime via the PaymentIntents API
GET /api/v1/pa/payment_intents/{id}