Outbound REST API

Save to Pay uses the outbound REST API to send notifications to your server. Samsung sends notifications for key card provisioning events; for example, when Samsung Wallet is ready for provisioning, and when the provisioning completes successfully.

Save to Pay uses the base URL that you provided to Samsung during Save to Pay service registration to send API requests.

Notify about status update

Notifies your server about card provisioning status updates from Save to Pay.

Endpoint

POST /notifications

Request parameters

Parameter

Name
Type

Required/Optional

Description

Header

Request-Id

String

Required

Unique request ID.

Header

Partner-Id

String

Required

Unique partner ID, provided by Samsung during onboarding.

Request body (JSON)

Field
Type

Required/Optional

Description

event

Object

Required

Event information, including the associated registration session ID.

event.regId

String

Required

Unique registration session ID associated with the event.

event.type

Enum

Required

Event type.
The possible values are:
  • WA_READY: Samsung Wallet is ready for card provisioning.
  • WA_PROVISIONED: Card provisioning was successful.
  • WA_PROVISION_FAILURE: Card provisioning failed, either for an unknown reason (if the error parameter is absent) or because the card is already present (if the error parameter is CARD_ALREADY_PRESENT).

event.error

Enum

Required

Additional error reason, used when the event type is WA_PROVISION_FAILURE.
The possible value is:
  • CARD_ALREADY_PRESENT

event.desc

String

Optional

Event description.

emailMatches

Boolean

Conditional

Whether the email provided in the POST /registrations operation matches the email address associated with the Samsung Wallet account. Required only is the email was provided in the POST /registrations operation.

phoneMatches

Boolean

Conditional

Whether the phone number provided in the POST /registrations operation matches the phone number associated with the Samsung Wallet account. Required only is the phone number was provided in the POST /registrations operation.

user

Object

Required

Customer information.

user.id

String

Required

Customer's Samsung Account ID.

device

Object

Required

Device information.

device.id

String

Required

Unique device ID.

device.imeiLast4

String

Optional

Last 4 digits of the device IMEI number.

device.serialLast4

String

Optional

Last 4 digits of the device serial number.

device.locale.country

String

Optional

Device's country code in the ISO 3166-1 alpha-2 format.

wallet

Object

Required

Wallet information.

wallet.id

String

Required

Unique wallet ID.

Response header

Name
Type

Required/Optional

Description

Response-Id

String

Required

Unique response ID that echoes back the Request-Id header from the request.

Response body (JSON)

Field
Type

Required

Description

card.data.encryptedData

String

Conditional

Provisioning data (encrypted card information), required when responding to the WA_READY event.

Example

Request:

{
    "event": {
        "regId": "395ce2e29485442cbd9bacdc77105126",
        "type": "WA_READY"
    },
    "emailMatches": true,
    "phoneMatches": true,
    "user": {
        "id": "RcSm3gWJT9mXgFWy5sG123"
    },
    "wallet": {
        "id": "GpcCUgejS9GIiH8zch1111"
    },
    "device": {
        "id": "MTUxMTE5MDAwMjAwMDM1N999",
        "imeiLast4": "6166",
        "locale": {
            "country": "US"
        },
        "serialLast4": "4934"
    }
}

200 OK response:

{
    "card": {
        "data": {
            "encryptedData": "*****"
        }
    }
}