This page explains how to add PaySafeCard to your existing iOS Components integration.
Requirements
Select the server-side flow that your integration uses:
Requirement | Description |
---|---|
Integration type | Make sure that you have built a Sessions flow iOS Components integration. |
Setup steps | Before you begin, contact our Support Team to add PaySafeCard in your Customer Area. |
API reference
Select which endpoint you are using:
This is the default with Components v5.0.0 or later.
Parameter name | Required | Description |
---|---|---|
shopperReference | ![]() |
Your reference to uniquely identify this shopper, for example user ID or account ID. |
For a full list of optional fields that you can send for all payment methods, see /sessions.
curl https://checkout-test.adyen.com/checkout/v69/sessions \ -H 'x-api-key: ADYEN_API_KEY' \ -H 'content-type: application/json' \ -d '{ "merchantAccount": "ADYEN_MERCHANT_ACCOUNT", "reference": "YOUR_ORDER_NUMBER", "paymentMethod": { "type": "paysafecard" }, "amount": { "currency": "EUR", "value": "1000" }, "shopperLocale": "de_DE", "countryCode": "DE", "shopperReference": "YOUR_UNIQUE_SHOPPER_ID", "returnUrl": "https://your-company.com/checkout?shopperOrder=12xy.." }'
Component configuration
v5.0.0 or later
If your integration uses iOS Components v5.0.0 or later, configure and create an instance of the PaySafeCard Component:
let paymentMethods = session.sessionContext.paymentMethods // Check that the payment method is supported before showing the Component. guard let paymentMethod = paymentMethods.paymentMethod(ofType: .other("paysafecard")) else { return } let component = InstantPaymentComponent(paymentMethod: paymentMethod, context: context, order: nil) self.currentComponent = component // Set the session as the delegate. component.delegate = session component.initiatePayment()
v4.x.x
If your integration uses an earlier version of iOS Components:
// Check that the payment method is supported before showing the Component. guard let paymentMethod = paymentMethods.paymentMethod(ofType: PaySafeCardPaymentMethod.self) else { return } let style = FormComponentStyle() let component = PaySafeCardComponent(paymentMethod: paymentMethod, apiContext: context, style: style) present(component)
There are no configuration steps specific to PaySafeCard required for Components.
Test and go live
Before you go live, test your integration using the following credentials:
- 16-digit code: 0000 0000 0990 3417
Check the status of test payments in your Customer Area > Transactions > Payments.
Before you can accept live payments, contact our Support Team to add PaySafeCard in your live Customer Area.