Everything you need to take Samsung Pay payments via an app:
How it works
Your app initiates the Samsung Pay wallet
Samsung Pay returns the encrypted payload following shopper authentication
You send the encrypted payload to your server
You send an XML Direct request to Worldpay containing the encrypted Samsung Pay data
We send you the payment response
You inform the shopper of the outcome
A Direct integration to Worldpay
A Samsung Pay Developer account
Worldpay to enable Samsung Pay on your account
Set up Samsung Pay
Configure your IDE project before integrating Samsung Pay into your app.
Configure your IDE to integrate to Samsung Pay SDK.
Best practice: Samsung Pay recommend using the Android Studio IDE.
The Samsung Pay SDK explains how to integrate Samsung Pay in to your app.
Configuring your app to use Samsung Pay requires a Certificate Sign Request (CSR) and a Service ID.
Generate a CSR
Note: It is possible to request a CSR from Samsung Pay, however this will not be compatible with your Worldpay configuration.
Generate the Service ID property
The Samsung Pay SDK requires you to set a Service ID when you configure the
PartnerInfo object. To do this you will need to add a Service to your app in the Samsung Pay portal. When the new Service is created you will be provided with a Service ID and will be asked to upload the CSR provided by Worldpay.
Set the allowedCardBrands property
Worldpay only supports Samsung Pay payments with Visa, Mastercard, and American Express (Amex).
allowedCardBrands property of the request object to only receive card networks Worldpay support. See the
brandList ArrayList lines in the example below.
Set the paymentProtocol property
Worldpay only supports the
PROTOCOL_3DS parameter for the
paymentProtocol with Samsung Pay.
paymentProtocol property of the request object to
PROTOCOL_3DS as shown in the example below.
Collection<Integer> brandList = new ArrayList<Integer>();
brandList.add(WalletConstants.CardNetwork.VISA); // Only use the cards listed here
PaymentInfo paymentReq = new PaymentInfo.Builder()
.setPaymentProtocol(PaymentProtocol.PROTOCOL_3DS) //Worldpay only support PROTOCOL_3DS
.setAllowedCardBrands(brandList) //add Worldpay supported card brands here
Once a consumer authenticates themselves your app will receive a callback via the
onSuccess() method. This method will provide 3 arguments, a
PaymentInfo object, a
String and a
String is a string representation of a JSON object containing the encrypted payment credentials, below is an example of this JSON object:
This JSON object can be used to map data to Worldpay’s XML in the following way:
|Samsung Pay field||Worldpay XML field|
If you are also collecting address data from the Samsung Pay wallet, you can either use the
billingAddress elements of the above JSON but you may find it easier to use the strongly typed
Address objects which represent
shippingAddress which can be found within the
The Samsung Address object contains the following fields which can be mapped to the corresponding fields for
<shippingAddress> elements of Worldpay’s XML:
|Samsung Pay field||Worldpay XML field||Notes|
||Samsung provide the
The Samsung request code can be found in the latest Samsung SDK.
Prerequisite: You've successfully integrated Samsung Pay in to your app, and can generate a payment encrypted payload.
When you've obtained an the data required from successful transaction callback method and have passed this to your server, send the payload to us within
Example XML request
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE paymentService PUBLIC "-//WorldPay//DTD WorldPay PaymentService v1//EN"
<paymentService version="1.4" merchantCode="YOUR_MERCHANT_CODE">
<amount value="100" currencyCode="USD" exponent="2"/>
The response message is the same as our standard XML responses.
Samsung Pay supports both debug and release modes.
Worldpay's test environment is designed to work in tandem with debug mode and production will work with release mode.
Details of the above are included in the Samsung Pay SDK documentation.
Some links to Samsung Pay websites.
Software development links
Problems? Try Troubleshoot