Add payment card to Apple wallet

Add Payment Card to Apple Wallet

This endpoint provisions a Netevia payment card into Apple Wallet using the Apple Pay in-app provisioning flow. The caller supplies the payment card identifier along with the cryptographic certificates, nonce, and nonce signature generated by the PassKit framework on the device. Netevia forwards these values to the card network to complete the tokenization handshake.

Endpoint

POST /api/paymentCards/addToAppleWallet

Authentication

Bearer token required. Obtain via:

POST https://api.banking.netevia.dev/api/auth/v2

Include in header: Authorization: Bearer {token}
Token lifetime: 10 minutes. Refresh via POST /api/auth/refresh.

When to use

Use this endpoint when a mobile application user initiates an "Add to Apple Wallet" action for one of their Netevia payment cards. It should be called after the iOS PassKit framework returns the leaf and sub-CA certificates, nonce, and nonce signature from PKAddPaymentPassViewController. This applies to Physical, Virtual, and Burner card types.

Request Body

FieldTypeRequiredDescription
paymentCardIdstringYesUnique identifier of the Netevia payment card to be provisioned into Apple Wallet. Minimum length: 1.
sertificatesarray of stringsYesArray of Base64-encoded DER certificate strings provided by the iOS PassKit framework (leaf certificate and sub-CA certificate).
noncestringNoBase64-encoded nonce value returned by PassKit during the provisioning request.
nonceSignaturestringNoBase64-encoded signature of the nonce, returned by PassKit during the provisioning request.
{
  "paymentCardId": "card_a1b2c3d4e5f6g7h8",
  "sertificates": [
    "MIICxDCCAaygAwIBAgIIVqpBMEGKfmwwDQYJKoZIhvcNAQELBQAwIzEhMB8GA1UE...",
    "MIIBwjCCAWigAwIBAgIIR5VqBNEGKfmwwCgYIKoZIzj0EAwIwIzEhMB8GA1UE..."
  ],
  "nonce": "bm9uY2VWYWx1ZUhlcmU=",
  "nonceSignature": "c2lnbmF0dXJlVmFsdWVIZXJl"
}

Response

200 OK

A 200 response indicates the provisioning request was successfully submitted to the card network. The response body confirms success and may contain the encrypted pass data required to complete the PassKit provisioning flow on the device.

FieldTypeDescription
(response payload)objectEncrypted card provisioning data returned by the card network, to be passed back to the PassKit framework to complete Apple Wallet provisioning.
{
  "success": true
}

Error Codes

CodeWhen it happens
400Missing required fields (paymentCardId or sertificates), invalid certificate format, or validation error
401Token missing, expired, or invalid
403Caller does not have permission to provision the specified card
404Payment card not found for the given paymentCardId
500Internal server error or card network provisioning failure

Common Mistakes

  • Misspelling the sertificates field — the schema uses sertificates (not certificates); sending the correct spelling will cause the field to be ignored and return a 400 error.
  • Sending an empty array for sertificates — at least the leaf certificate and sub-CA certificate from PassKit must be included.
  • Calling this endpoint before the iOS PassKit framework has returned the certificates, nonce, and nonce signature; collect all values from PKAddPaymentPassViewControllerDelegate first.
  • Using a card ID that belongs to a different customer's account — the token's identity must match the cardholder who owns the specified paymentCardId.

Related Endpoints

  • POST /api/paymentCards/addToGoogleWallet — Provision a payment card into Google Wallet
  • GET /api/paymentCards/{paymentCardId} — Retrieve details and current status of a payment card
  • POST /api/paymentCards — Create a new Virtual or Burner payment card

Example

curl -X POST https://api.banking.netevia.dev/api/paymentCards/addToAppleWallet \
  -H "Authorization: Bearer YOUR_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "paymentCardId": "card_a1b2c3d4e5f6g7h8",
    "sertificates": [
      "MIICxDCCAaygAwIBAgIIVqpBMEGKfmwwDQYJKoZIhvcNAQELBQAwIzEhMB8GA1UE...",
      "MIIBwjCCAWigAwIBAgIIR5VqBNEGKfmwwCgYIKoZIzj0EAwIwIzEhMB8GA1UE..."
    ],
    "nonce": "bm9uY2VWYWx1ZUhlcmU=",
    "nonceSignature": "c2lnbmF0dXJlVmFsdWVIZXJl"
  }'
Body Params
string
required
length ≥ 1
sertificates
array of strings
required
sertificates*
string | null
string | null
Headers
string
enum
Defaults to application/json

Generated from available request content types

Allowed:
Response
200

Success

Language
Credentials
Bearer
JWT
LoadingLoading…
Response
Click Try It! to start a request and see the response here!