> ## Documentation Index
> Fetch the complete documentation index at: https://docs.gnosispay.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Create Apple Pay Provisioning Data

> Creates the encrypted Apple Pay payload required by PassKit. The card must
belong to the authenticated user's cardholder.



## OpenAPI

````yaml https://core.prod.gnosispay.com/user-api/openapi.json post /cards/{cardId}/apple-pay/provisioning
openapi: 3.1.0
info:
  title: User Service
  version: 0.0.0
servers:
  - url: https://core.prod.gnosispay.com/user-api
    description: Production
    variables: {}
  - url: https://core.sandbox.gnosispay.in/user-api
    description: Sandbox
    variables: {}
security: []
tags:
  - name: Auth
  - name: User
  - name: Terms
  - name: Source of Funds
  - name: Phone
  - name: User Account
  - name: Cards
  - name: User Movements
  - name: KYC
  - name: PCI
  - name: 3DS
  - name: Health
paths:
  /cards/{cardId}/apple-pay/provisioning:
    post:
      tags:
        - Cards
      summary: Create Apple Pay Provisioning Data
      description: >-
        Creates the encrypted Apple Pay payload required by PassKit. The card
        must

        belong to the authenticated user's cardholder.
      operationId: Cards_provisionApplePay
      parameters:
        - name: cardId
          in: path
          required: true
          schema:
            $ref: '#/components/schemas/uuid'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ApplePayProvisioningRequest'
      responses:
        '200':
          description: The request has succeeded.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApplePayProvisioningResponse'
        '400':
          description: The server could not understand the request due to invalid syntax.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '401':
          description: Unauthorized - Invalid JWT
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '404':
          description: The server cannot find the requested resource.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '409':
          description: The request conflicts with the current state of the server.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '502':
          description: Server error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '503':
          description: Service unavailable.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        default:
          description: An unexpected error response.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
      security:
        - BearerAuth: []
components:
  schemas:
    uuid:
      type: string
      format: uuid
    ApplePayProvisioningRequest:
      type: object
      required:
        - certificates
        - nonce
        - nonce_signature
        - device_type
        - app_version
      properties:
        certificates:
          type: array
          items:
            $ref: '#/components/schemas/ApplePayCertificate'
          minItems: 2
          maxItems: 2
          description: >-
            Apple-provided leaf and sub-CA certificates, in that order. The
            Apple

            Root CA G3 is downloaded separately and is not sent by the client.
        nonce:
          type: string
          minLength: 1
        nonce_signature:
          type: string
          minLength: 1
        device_type:
          $ref: '#/components/schemas/ApplePayDeviceType'
        app_version:
          type: string
          minLength: 1
        product_type:
          type: string
          minLength: 1
    ApplePayProvisioningResponse:
      type: object
      required:
        - activation_data
        - encrypted_pass_data
        - ephemeral_public_key
      properties:
        activation_data:
          type: string
        encrypted_pass_data:
          type: string
        ephemeral_public_key:
          type: string
    Error:
      type: object
      required:
        - success
        - error
      properties:
        success:
          type: boolean
          enum:
            - false
        error:
          type: string
    ApplePayCertificate:
      type: string
      minLength: 1
      description: A non-empty Base64-encoded DER certificate supplied by PassKit.
    ApplePayDeviceType:
      type: string
      enum:
        - mobile_phone
        - watch
      description: Device types supported for Apple Pay push provisioning.
  securitySchemes:
    BearerAuth:
      type: http
      scheme: Bearer

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.