Skip to main content

Samsung Pay Certificate

Samsung Pay encrypts payment details on the customer's device using an RSA public key, and Moyasar decrypts them with the matching private key. As a platform, you can generate one certificate signing request (CSR) and use it for all of your merchants.

When a merchant under your platform accepts a Samsung Pay payment, Moyasar tries to decrypt the token with the merchant's own certificate, if one is set up, and your platform certificate. The first one that succeeds is used, so you don't need to set up a certificate for each merchant.

How Moyasar decrypts a Samsung Pay token

Setup overview​

How a platform sets up its Samsung Pay certificate

Generate the CSR​

POST /v1/platform/samsung_pay_certificate

The private key is generated and stored securely by Moyasar and is never returned. The response contains the CSR in PEM format:

{
"id": "e2c1f0c4-6a43-4b4c-9a35-2f0f7f2f6a10",
"certificate": "-----BEGIN CERTIFICATE REQUEST-----\n...\n-----END CERTIFICATE REQUEST-----\n",
"created_at": "2026-10-13T10:30:00.000Z"
}

If your platform already has a certificate, the existing one is returned instead of creating a new one.

Register the CSR with Samsung​

  1. Sign in to the Samsung Developer Portal with a Samsung Pay enabled account.
  2. Create a Service (web or in-app) and upload the CSR you received.
  3. Complete the service details and test accounts, then note the Service ID.
  4. Once testing is complete, contact Moyasar to have the Service ID approved by Samsung Pay.

Retrieve the certificate​

GET /v1/platform/samsung_pay_certificate

Returns the same response as above, or 404 if no certificate exists.

Delete the certificate​

DELETE /v1/platform/samsung_pay_certificate
warning

Do not delete the certificate while merchants are live. Tokens encrypted with the old CSR can no longer be decrypted, and those payments will fail until a new certificate is generated and registered with Samsung.