Airwallex logo

Desktop/Mobile Website Browser

Copy for LLMView as Markdown

Accept Paysafecard payments on your website by redirecting shopper to Paysafecard payment page. See checkout process below:

  1. The shopper selects to pay with a Paysafecard voucher
  2. The shopper is redirected to Paysafecard payment page where they enter the 16-digit voucher code and submit the payment
  3. Alternatively, if the shopper has a Paysafecard account, they can also top up their account using this voucher. Upon redirection, they can choose to log in to their Paysafecard account and approve the payment from there
  4. The payment is confirmed
  5. The merchant is notified of the payment status

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: AUD, CAD, CHF, EUR, GBP, NOK, PLN, RON, SEK, USD.

Shell
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": 500,
7 "currency": "EUR",
8 "merchant_order_id": "85d7b0e0-7235-11ea-862e-9f6aa1adfca6",
9 "return_url": "https://www.airwallex.com"
10 }'

Step 2. Redirect to Paysafecard to complete payment

When a shopper selects to pay with Paysafecard on their desktop browser, call the following API endpoints to get a URL, which you can redirect the shopper to Paysafecard payment page to complete payment.

  1. Obtain URL from Airwallex and redirect shopper to Paysafecard payment page

    Supported countries: AT, AU, BE, BG, CA, CH, CY, CZ, DE, DK, ES, FI, FR, GB, GR, GE, GI, HR, HU, IE, IT, LI, LT, LU, MT, MX, NL, NO, NZ, PE, PL, PT, RO, SE, SI, SK, UY.

    Request:

    Shell
    1curl -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": "paysafecard",
    8 "paysafecard": {
    9 "shopper_name": "first_name last_name",
    10 "country_code": "NL"
    11 }
    12 }
    13 }'

    Response: Render the value of url to redirect shoppers to Paysafecard.

    JSON
    1{
    2 "next_action": {
    3 "type": "redirect",
    4 "method": "GET",
    5 "url": "https://r3.girogate.de/ti/simpaysafecard?tx=957019525&rs=BTLmGjNW5NYvrKHlhjb51HcsWAHn9WNX&cs=b810245f25042a1ad5401c693aee06d336dce28e54d172f97ecc51e80168871b"
    6 }
    7}
  2. 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.succeeded which indicates that the shopper has successfully paid for the order via Paysafecard.

  3. 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}

Was this page helpful?