Skip to main content

Use a credit card test certificate

This guide provides information on using Shopify test certificates to test a credit card payments apps extension.

Note

You should only use this test certificate for non-production credit card payments apps extensions.



Anchor to Using the test certificateUsing the test certificate

To use Shopify's test certificate, set the value of the encryption_certificate_fingerprint field to Test Certificate in your credit card payment extension then, deploy and release the extension.

encryption_certificate_fingerprint = "Test Certificate"

With the test certificate configured, Shopify will always send the same static test payload data in the payment_method hash for every payment session request.


The private key which is used to decrypt the encrypted payload.

-----BEGIN EC PRIVATE KEY-----
MHcCAQEEIPdk1Yrjq9UNZBPRFfY2/JFiNXVWbKNwkhqADTm46XUyoAoGCCqGSM49
AwEHoUQDQgAEPwwyTcNvVwInu9COj3WZooI+Aj1/KRolD6u7XmjpuBXlHq2nopJh
qkKwdrnUzWjkiJuY1qrUucT2mH+VkUGBSA==
-----END EC PRIVATE KEY-----

The test certificate which is used to encrypt the test payload.

-----BEGIN CERTIFICATE-----
MIIBvTCCAWMCCQCvVT/6sodnSjAJBgcqhkjOPQQBMGcxCzAJBgNVBAYTAkNBMQsw
CQYDVQQIDAJPTjEPMA0GA1UEBwwGT3R0YXdhMRAwDgYDVQQKDAdTaG9waWZ5MSgw
JgYDVQQDDB9TaG9waWZ5UGF5bWVudHNQYXJ0bmVyc1BsYXRmb3JtMB4XDTIzMDYw
OTE1NTgxM1oXDTI0MDYwODE1NTgxM1owZzELMAkGA1UEBhMCQ0ExCzAJBgNVBAgM
Ak9OMQ8wDQYDVQQHDAZPdHRhd2ExEDAOBgNVBAoMB1Nob3BpZnkxKDAmBgNVBAMM
H1Nob3BpZnlQYXltZW50c1BhcnRuZXJzUGxhdGZvcm0wWTATBgcqhkjOPQIBBggq
hkjOPQMBBwNCAAQ/DDJNw29XAie70I6PdZmigj4CPX8pGiUPq7teaOm4FeUeraei
kmGqQrB2udTNaOSIm5jWqtS5xPaYf5WRQYFIMAkGByqGSM49BAEDSQAwRgIhAPIA
kL2hr+QMnhvKSFJjsQPyUj8FEogfjBECPjlXbAtoAiEA9D6Ub/wCCfsbjcz89k4W
Xill1yq6fp9cHlnIpGQfVpw=
-----END CERTIFICATE-----

This section details the payloads you'll receive, which depends on the API version of your payments app extension.

Encrypted message contents

d2Zlzlt2ePtL8wB0AeiAdEfD2L+vt8evkaVki7Y9qMHVN8EAbNQjTdLvZoAjUd9Mbo2Zt0BnJaHleKZUF7aGIvQ+LIAiuJFt2GNKtBbmArA9FLoEu5ltteKRtNyXeJiUqjP6LOK3XT6rhSGlhA6nAhXqi7r5RE2z55cZtRqaE1WdQ/E66XHYv+DRv6cMVwES1A==
mz3MA17RMq/OpuppvzBrd8C47DgH4LBHbyT9E+o9Z3/IxUP1UhC+PAd/UW+PjfiA+IXeqyoxFuuynW9Sntr1iiA4qjXJlsTUmZepIJoXhfAW5ZgjemViB1+Cs6roKAonREupFh6xznPyFilYZ6v3sSHIeArD8MHp2+WJb2Rj
XQ3BAPK0UieJOObj05TCU/HvBmDhesiHbV/VCG43F2xWEmQRTPPDNiP8fBpGHNlobybZQpUt8fTnVhP151aAxKzjFWHAW2Oz2DEtVc0N3YG3Af7mwsXtQXXUY/nddldoVf2V4t18SAiJuof8TrgO76T1wydb
[object Object]

Decrypted message contents

{
"type": "card",
"data": {
"full_name": "Percy Parker",
"pan": "4242424242424242",
"month": 12,
"year": 2050,
"verification_value": "123",
"network": "visa"
}
}
{
"type": "card",
"data": {
"full_name": "Percy Parker",
"pan": "4242424242424242",
"month": 12,
"year": 2050,
"verification_value": "123"
}
}
{
"type": "card",
"full_name": "Percy Parker",
"pan": "0123456789012345",
"month": 12,
"year": 2050,
"verification_value": "123"
}
[object Object]
[object Object]

Was this page helpful?