---
title: "Generate Apple Digitization Data"
method: POST
path: "/sc/v2/sc_generate_apple_digitization_data/"
tags: ["Card PaySecure WS V2"]
---

# Generate Apple Digitization Data

`POST /sc/v2/sc_generate_apple_digitization_data/`

<ul>
<li class="docBullet">This web service allows to get the digitization data 
from the provided token to be used in Apple Pay in-app provisioning verification.</li>
<li class="docBullet">The ephemeral public key and encryptedCardData is used 
by Apple Wallet to authorize the provisioning process. The TAV (tokenization authentication 
value), also known as, activationData or cryptographic OTP, is used by Mastercard to 
permit the provisioning flow.</li>
</ul>

## Request body

- GenerateAppleDigitizationDataModel
  - `appleLeafCertificate` string, required — Apple leaf certificate (header and footer are stripped out)
  - `appleNonce` string, required — Apple generated nonce
  - `appleNonceSignature` string, required — Apple signed nonce
  - `client_id` integer, required — Unique identifier for the client which Paymentology will provide at outset
  - `tavDataFields` string, required — Concatenation of field names separated by '|' delimiter. The applicable values are: dataValidUntilTimestamp, accountNumber, accountExpiry
  - `tavFormat` integer, required — Currently 3 is the only supported format.
  - `tavSigned` boolean, required — When false, the TAV signature is not signed.
  - `tavSigningAlgorithm` integer, required — 1 for RSA-SHA256. Currently this is the only supported algorithm.
  - `token` integer, required — Public token for the card.

## Response `200`

Successful Response

- GenerateAppleDigitizationDataResponse
  - `header` GenerateAppleDigitizationDataHeader
    - `error_id` integer — error id
    - `error_desc` string — error message
  - `body` GenerateAppleDigitizationDataBody
    - `clientId` integer — Client id
    - `token` integer — Public token
    - `tav` string — Base64 encoded TAV. The Base64 decoded TAV is a JSON structure. Here is one example with a "partially" signed signature. The signature in this case is a Hex-encoded SHA-256 digest of the original signature which is the first step of the signing process: { "version" : "3", "signatureAlgorithm" : "Unsigned", "dataValidUntilTimestamp" : "2022-12-29T22:21:18Z", "includedFieldsInOrder" : "dataValidUntilTimestamp|accountNumber|accountExpiry", "signature" : "10684e9e8a7c570f162e2208357687565c81bb4dddf53e6961df833444d70f77" } Here is another example with a signed signature (The SHA256withRSA algorithm is applied with the client's private key). The signature in this case is Base64-encoded: { "version" : "3", "signatureAlgorithm" : "RSA-SHA256", "dataValidUntilTimestamp" : "2022-12-29T22:21:18Z", "includedFieldsInOrder" : "dataValidUntilTimestamp|accountNumber|accountExpiry", "signature" : "Hj6oQ7hkt1snPbxtfVVGPJ6K7qprE9eYY73ozdw/ENPiGvckzPy23ia6m+X9I+eFPhTG+IVn14cgQ/D+I1N5YOS3p1iZraUpTsaPGpA2FHTrFC9jKlBOROcmeVjwami6lSXZGkX3aruCWIwqGjONCer8qTMfCyLzq+5ZvAqknEzB0HZIlZUlsvkWFqEAmHQI3kJkY8ILKvjtUJTYskX8a4fhKEDDUa6VNOYHmXk8f3RyWAvZ2udSpq3juhiW9QnzuYsGjnhjSQUpbQLNpRP0kp+AMnHBggV2QawchQDnyWVdBimjVQLLEHdbHKNMHOLqkgnommmr5Fp9uNSEtdzb1Q==" } In order to complete the signing of the partially signed signature (i.e., the "Unsigned" case above), the client should apply the correct padding before applying RSA algorithm. Please talk to Paymentology if you need more information on this.
    - `encryptedCardData` string — Base64 encoded encrypted card data. The raw card data is a JSON structure. Here is one example: { "version" : "1", "primaryAccountNumber" : "5119163115511522", "expiration" : "08/25", "name" : "John Doe", "productType" : "DEFAULT_MASTERCARD", "nonce" : "someNonce" "nonceSignature" : "someNonceSignature" }
    - `ephemeralPublicKey` string — Base64 encoded ephemeral public key

## Other responses

- `404` — Webservices does not exist
- `500` — Internal Server error

---

[API](https://skmtc.net/paymentology/apis/payapi-docs.md) · [All operations](https://skmtc.net/paymentology/apis/payapi-docs/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/paymentology/payapi-docs/revisions/a675891b0365/schema)
