Once the customer approves the payment request by verifying the selected payment method and, if applicable, the shipping option, the show() method's promise resolves and returns a PaymentResponse object, which includes the following fields:
methodName: String indicating the selected payment method
details: Object containing Samsung Pay–specific payment and credential data
shippingAddress: Customer's shipping address, if requested
shippingOption: Identifier of the selected shipping option, if requested
payerEmail: Payer’s email address, if requested
payerPhone: Payer’s telephone number, if requested
payerName: Payer’s name, if requested
Samsung Pay payment details
For Samsung Pay transactions, the payment data is included in the PaymentResponse.details object, which contains the following child objects:
paymentCredential object contains the payment credential data required by the payment gateway (PG) to authorize and process the transaction.
In the network token mode, the paymentCredential object contains the following fields:
type: Credential type. For Samsung Pay network tokens, this value is always "S".
version: Authentication payload schema version. This value is set to 1.0.0, which corresponds to the standard 3D Secure authentication data format used by card networks (for example, Mastercard SecureCode, Verified by Visa, and American Express SafeKey).
data: Encrypted payload value.
In the gateway token mode, the paymentCredential object contains the following fields:
reference: Token ID reference.
status: Transaction status, such as authorized or rejected.
card_last4digits: Last 4 digits of the card’s DPAN.
cardBrand: Card brand, such as MasterCard or Visa.
orderNumber: Merchant-defined external reference ID provided in the request.
billingAddress object contains the cardholder’s billing address and related attributes, which can include:
country: ISO 3166 alpha-2 country code (uppercase), for example, "US".
addressLine[n]: One or more address lines representing the most specific parts of the address, such as street name, house number, apartment number, or post office box.
region: Top-level administrative subdivision, such as a state or province.
city: City or town.
dependentLocality: Sublocality within a city, such as a neighborhood or district.
postalCode: Postal or ZIP code.
sortingCode: Bank sorting code, where applicable.
languageCode: BCP 47 language tag indicating the language used to format the address.
organization: Organization or company name at the address.
recipient: Name of the recipient or contact person.
phone: Phone number of the recipient or contact person.
NoteFor transactions made using browser-saved cards (when basic-card is included within supportedMethods in your PaymentRequest object), the PaymentResponse.details object contains raw card fields (cardholderName, cardNumber, expiryMonth, expiryYear, and cardSecurityCode), along with the billingAddress object described above.
Completing the payment flow
Once payment information is received from Samsung Pay, submit the data to the PG in accordance with the PG's integration mode and APIs. For network token integrations, you can directly pass the encrypted payload to the PG, which handles decryption as part of its processing flow. The exact handling of network tokens varies by PG. Refer to your PG’s documentation for specific requirements.
While the payment is being processed by your PG, display a loading indicator to inform the customer that the transaction is in progress. Once a response is received from the PG, call the complete() method to close the payment UI. The website can then display an order confirmation or order completion page.
The following code snippet is an example of the returned payment data and the completion of the payment flow:
We use cookies to improve your experience on our website and to show you relevant
advertising. Manage you settings for our cookies below.
Essential Cookies
These cookies are essential as they enable you to move around the website. This
category cannot be disabled.
Company
Domain
Samsung Electronics
developer.samsung.com, .samsung.com
Analytical/Performance Cookies
These cookies collect information about how you use our website. for example which
pages you visit most often. All information these cookies collect is used to improve
how the website works.
Company
Domain
Samsung Electronics
.samsung.com
Functionality Cookies
These cookies allow our website to remember choices you make (such as your user name, language or the region your are in) and
tailor the website to provide enhanced features and content for you.
Company
Domain
Samsung Electronics
developer.samsung.com, google.account.samsung.com
Preferences Submitted
You have successfully updated your cookie preferences.