Hii Guys,
So I need to use this api "In-App Provisioning for Apple Pay" (https://sandbox.api.visa.com/inapp/provisioning/cardData/applePay)
And for authentication I am using x-pay-token flow. I have generated the x-pay-token using the java library Visa shared but using my api key and shared secret but its not working getting 401 unauthorized. I even tried there hello world java code with my creds and same issue.
x-pay-token:xv2:1721283396:7ed89fd0d84e13b9dd745fc7751ff1929288043453e2286b6258c21696e89fff
request body I have tried :
i @Ritesh2581, Thank you for reaching out. An agent is looking into this and will get back to you soon. Until then, if any community member knows a solution, please respond to this thread.
Hi @Ritesh2581,
As a first step, you need to enroll the card using the Universal Card enrollment API for getting the vCardId. You should be encrypting the card object using JWE Asymmetric encryption. Please refer to the attached Encryption Certificate and KID for encrypting the card object. Card Object details can be retrieved from the API Reference page.
Please find below the test data, along with the certificate that is attached to this email.
***************************************************************************************
Encryption Key
VisaPublicKey_ForEncryption_Sbx_Cert.pem |
Visa Public Key used in JWE Asymmetric Encryption. |
Q2AY3V5E3ICNBUU66D8K11hBmzqdXSvTiNzZ-YnpozWRXTo50 |
KID – To be used in JWE Header |
Test Data – VDP Sandbox (sandbox.api.visa.com)
Google Pay
PAN
|
X51X23XX20053999 – Replace X with 4 X51X231XX7208143 |
deviceID |
uztEQocBRFrbK5hCgcDbxqw_ |
Apple Pay
PAN
|
45X42344X3926268 – Replace X with 1 45X4236833852412 |
deviceCert |
MIID/TCCA6OgAwIBAgIIMq/qUa9Z2nMwCgYIKoZIzj0EAwIwgYAxNDAyBgNVBAMMK0FwcGxlIFdvcmxkd2lkZSBEZXZlbG9wZXIgUmVsYXRpb25zIENBIC0gRzIxJjAkBgNVBAsMHUFwcGxlIENlcnRpZmljYXRpb24gQXV0aG9yaXR5MRMwEQYDVQQKDApBcHBsZSBJbmMuMQswCQYDVQQGEwJVUzAeFw0xODA2MDEyMjAzMTBaFw0yMDA2MzAyMjAzMTBaMGwxNTAzBgNVBAMMLGVjYy1jcnlwdG8tc2VydmljZXMtZW5jaXBoZXJtZW50X1VDNi1TQU5EQk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99g9RJp4O1dgsZuVpUdlA7zPWqCDhVQo9Mxr1uPS6GVyjZYo3YElIhHRV4Mv3wEJ3hGOaxK1gResup88QWDK1fL0 |
nonce |
kauVuA== |
Sample Card Object
Card Object
{
"accountNumber": "451X234413926268",
"nameOnCard": "Google",
"expirationDate": {
"month": "12",
"year": "2022"
},
"cvv2": "533",
"billingAddress": {
"name": "shankar",
"line1": "12301 Research Boulevard",
"line2": "Research Boulevard",
"line3": "Visa USA",
"city": "Austin",
"state": "TX",
"countryCode": "US",
"postalCode": "78759"
}
}