> For the complete documentation index, see [llms.txt](https://partner.doc.bunq.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://partner.doc.bunq.com/documentation/bunq-as-a-service/chapter-6-cards/card-details-pan-cvc2.md).

# Card details (PAN, CVC2)

## Create Primary Account Number

> 🔒 \*\*Encrypted endpoint\*\* — the response is end-to-end encrypted. See the Encryption section.\
> \
> Generate the primary account number (PAN) for a card.<br>

```json
{"openapi":"3.1.0","info":{"title":"bunq Partner API","version":"1.0.0"},"tags":[{"name":"Card Management","description":"Credit and debit card creation and management"}],"servers":[{"url":"https://partner-api.sandbox.bunq.com","description":"Sandbox Partner API Server"},{"url":"https://api.partner.bunq.com","description":"Production Partner API Server"}],"security":[{"SessionAuth":[]},{"ClientSignature":[]}],"components":{"securitySchemes":{"SessionAuth":{"type":"apiKey","in":"header","name":"X-Bunq-Client-Authentication","description":"Session token received from POST /session-server"},"ClientSignature":{"type":"apiKey","in":"header","name":"X-Bunq-Client-Signature","description":"HMAC-SHA256 signature of request body using private key"}},"parameters":{"CacheControl":{"name":"Cache-Control","in":"header","required":false,"schema":{"type":"string","default":"no-cache"}},"UserAgent":{"name":"User-Agent","in":"header","required":false,"schema":{"type":"string"}},"BunqLanguage":{"name":"X-Bunq-Language","in":"header","required":false,"schema":{"type":"string","default":"en_US"}},"BunqRegion":{"name":"X-Bunq-Region","in":"header","required":false,"schema":{"type":"string","default":"NL"}},"BunqGeolocation":{"name":"X-Bunq-Geolocation","in":"header","required":false,"schema":{"type":"string"}},"BunqClientRequestId":{"name":"X-Bunq-Client-Request-Id","in":"header","required":false,"schema":{"type":"string"}},"BunqClientAuthentication":{"name":"X-Bunq-Client-Authentication","in":"header","required":true,"schema":{"type":"string","description":"Session token from POST /session-server"}},"BunqClientSignature":{"name":"X-Bunq-Client-Signature","in":"header","required":true,"schema":{"type":"string","description":"HMAC-SHA256 signature of request"}},"BunqClientEncryptionIv":{"name":"X-Bunq-Client-Encryption-Iv","in":"header","required":true,"description":"Encryption header (required on encrypted endpoints). Base64-encoded 16-byte AES initialization vector.\n","schema":{"type":"string"}},"BunqClientEncryptionKey":{"name":"X-Bunq-Client-Encryption-Key","in":"header","required":true,"description":"Encryption header (required on encrypted endpoints). Base64-encoded, RSA-encrypted AES key.\n","schema":{"type":"string"}},"BunqClientEncryptionHmac":{"name":"X-Bunq-Client-Encryption-Hmac","in":"header","required":true,"description":"Encryption header (required on encrypted endpoints). Base64-encoded HMAC-SHA1 of the IV concatenated with the ciphertext.\n","schema":{"type":"string"}}},"schemas":{"CardPrimaryAccountNumber":{"type":"object","properties":{"primary_account_number":{"type":"string","description":"The PAN of the card."}}}}},"paths":{"/user/{userId}/card/{cardId}/primary-account-number":{"post":{"tags":["Card Management"],"summary":"Create Primary Account Number","description":"🔒 **Encrypted endpoint** — the response is end-to-end encrypted. See the Encryption section.\n\nGenerate the primary account number (PAN) for a card.\n","parameters":[{"name":"userId","in":"path","required":true,"schema":{"type":"integer"}},{"name":"cardId","in":"path","required":true,"schema":{"type":"integer"}},{"$ref":"#/components/parameters/CacheControl"},{"$ref":"#/components/parameters/UserAgent"},{"$ref":"#/components/parameters/BunqLanguage"},{"$ref":"#/components/parameters/BunqRegion"},{"$ref":"#/components/parameters/BunqGeolocation"},{"$ref":"#/components/parameters/BunqClientRequestId"},{"$ref":"#/components/parameters/BunqClientAuthentication"},{"$ref":"#/components/parameters/BunqClientSignature"},{"$ref":"#/components/parameters/BunqClientEncryptionIv"},{"$ref":"#/components/parameters/BunqClientEncryptionKey"},{"$ref":"#/components/parameters/BunqClientEncryptionHmac"}],"responses":{"200":{"description":"Primary account number created successfully","content":{"application/json":{"schema":{"type":"object","properties":{"Response":{"type":"array","items":{"type":"object","properties":{"CardPrimaryAccountNumber":{"$ref":"#/components/schemas/CardPrimaryAccountNumber"}}}}}}}}}}}}}}
```

## Update Generated CVC2

> 🔒 \*\*Encrypted endpoint\*\* — the request body and response are end-to-end encrypted. See the Encryption section.\
> \
> Update a generated CVC2 code for a card.<br>

```json
{"openapi":"3.1.0","info":{"title":"bunq Partner API","version":"1.0.0"},"tags":[{"name":"Card Management","description":"Credit and debit card creation and management"}],"servers":[{"url":"https://partner-api.sandbox.bunq.com","description":"Sandbox Partner API Server"},{"url":"https://api.partner.bunq.com","description":"Production Partner API Server"}],"security":[{"SessionAuth":[]},{"ClientSignature":[]}],"components":{"securitySchemes":{"SessionAuth":{"type":"apiKey","in":"header","name":"X-Bunq-Client-Authentication","description":"Session token received from POST /session-server"},"ClientSignature":{"type":"apiKey","in":"header","name":"X-Bunq-Client-Signature","description":"HMAC-SHA256 signature of request body using private key"}},"parameters":{"CacheControl":{"name":"Cache-Control","in":"header","required":false,"schema":{"type":"string","default":"no-cache"}},"UserAgent":{"name":"User-Agent","in":"header","required":false,"schema":{"type":"string"}},"BunqLanguage":{"name":"X-Bunq-Language","in":"header","required":false,"schema":{"type":"string","default":"en_US"}},"BunqRegion":{"name":"X-Bunq-Region","in":"header","required":false,"schema":{"type":"string","default":"NL"}},"BunqGeolocation":{"name":"X-Bunq-Geolocation","in":"header","required":false,"schema":{"type":"string"}},"BunqClientRequestId":{"name":"X-Bunq-Client-Request-Id","in":"header","required":false,"schema":{"type":"string"}},"BunqClientAuthentication":{"name":"X-Bunq-Client-Authentication","in":"header","required":true,"schema":{"type":"string","description":"Session token from POST /session-server"}},"BunqClientSignature":{"name":"X-Bunq-Client-Signature","in":"header","required":true,"schema":{"type":"string","description":"HMAC-SHA256 signature of request"}},"BunqClientEncryptionIv":{"name":"X-Bunq-Client-Encryption-Iv","in":"header","required":true,"description":"Encryption header (required on encrypted endpoints). Base64-encoded 16-byte AES initialization vector.\n","schema":{"type":"string"}},"BunqClientEncryptionKey":{"name":"X-Bunq-Client-Encryption-Key","in":"header","required":true,"description":"Encryption header (required on encrypted endpoints). Base64-encoded, RSA-encrypted AES key.\n","schema":{"type":"string"}},"BunqClientEncryptionHmac":{"name":"X-Bunq-Client-Encryption-Hmac","in":"header","required":true,"description":"Encryption header (required on encrypted endpoints). Base64-encoded HMAC-SHA1 of the IV concatenated with the ciphertext.\n","schema":{"type":"string"}}},"schemas":{"CardGeneratedCvc2":{"type":"object","properties":{"id":{"type":"integer"},"created":{"type":"string","format":"date-time"},"updated":{"type":"string","format":"date-time"},"type":{"type":"string","enum":["STATIC","GENERATED"]},"cvc2":{"type":"string"},"status":{"type":"string","enum":["AVAILABLE","USED","EXPIRED","BLOCKED"]},"expiry_time":{"type":"string","format":"date-time","nullable":true}}}}},"paths":{"/user/{userId}/card/{cardId}/generated-cvc2/{generatedCvc2Id}":{"put":{"tags":["Card Management"],"summary":"Update Generated CVC2","description":"🔒 **Encrypted endpoint** — the request body and response are end-to-end encrypted. See the Encryption section.\n\nUpdate a generated CVC2 code for a card.\n","parameters":[{"name":"userId","in":"path","required":true,"schema":{"type":"integer"}},{"name":"cardId","in":"path","required":true,"schema":{"type":"integer"}},{"name":"generatedCvc2Id","in":"path","required":true,"schema":{"type":"integer"}},{"$ref":"#/components/parameters/CacheControl"},{"$ref":"#/components/parameters/UserAgent"},{"$ref":"#/components/parameters/BunqLanguage"},{"$ref":"#/components/parameters/BunqRegion"},{"$ref":"#/components/parameters/BunqGeolocation"},{"$ref":"#/components/parameters/BunqClientRequestId"},{"$ref":"#/components/parameters/BunqClientAuthentication"},{"$ref":"#/components/parameters/BunqClientSignature"},{"$ref":"#/components/parameters/BunqClientEncryptionIv"},{"$ref":"#/components/parameters/BunqClientEncryptionKey"},{"$ref":"#/components/parameters/BunqClientEncryptionHmac"}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"type":{"type":"string","enum":["STATIC","GENERATED"],"description":"The type of generated CVC2."}}}}}},"responses":{"200":{"description":"Generated CVC2 updated successfully","content":{"application/json":{"schema":{"type":"object","properties":{"Response":{"type":"array","items":{"type":"object","properties":{"CardGeneratedCvc2":{"$ref":"#/components/schemas/CardGeneratedCvc2"}}}}}}}}}}}}}}
```

## Get Generated CVC2 Details

> 🔒 \*\*Encrypted endpoint\*\* — the response is end-to-end encrypted. See the Encryption section.\
> \
> Get the details for a specific generated CVC2 code.<br>

```json
{"openapi":"3.1.0","info":{"title":"bunq Partner API","version":"1.0.0"},"tags":[{"name":"Card Management","description":"Credit and debit card creation and management"}],"servers":[{"url":"https://partner-api.sandbox.bunq.com","description":"Sandbox Partner API Server"},{"url":"https://api.partner.bunq.com","description":"Production Partner API Server"}],"security":[{"SessionAuth":[]},{"ClientSignature":[]}],"components":{"securitySchemes":{"SessionAuth":{"type":"apiKey","in":"header","name":"X-Bunq-Client-Authentication","description":"Session token received from POST /session-server"},"ClientSignature":{"type":"apiKey","in":"header","name":"X-Bunq-Client-Signature","description":"HMAC-SHA256 signature of request body using private key"}},"parameters":{"CacheControl":{"name":"Cache-Control","in":"header","required":false,"schema":{"type":"string","default":"no-cache"}},"UserAgent":{"name":"User-Agent","in":"header","required":false,"schema":{"type":"string"}},"BunqLanguage":{"name":"X-Bunq-Language","in":"header","required":false,"schema":{"type":"string","default":"en_US"}},"BunqRegion":{"name":"X-Bunq-Region","in":"header","required":false,"schema":{"type":"string","default":"NL"}},"BunqGeolocation":{"name":"X-Bunq-Geolocation","in":"header","required":false,"schema":{"type":"string"}},"BunqClientRequestId":{"name":"X-Bunq-Client-Request-Id","in":"header","required":false,"schema":{"type":"string"}},"BunqClientAuthentication":{"name":"X-Bunq-Client-Authentication","in":"header","required":true,"schema":{"type":"string","description":"Session token from POST /session-server"}},"BunqClientSignature":{"name":"X-Bunq-Client-Signature","in":"header","required":true,"schema":{"type":"string","description":"HMAC-SHA256 signature of request"}},"BunqClientEncryptionIv":{"name":"X-Bunq-Client-Encryption-Iv","in":"header","required":true,"description":"Encryption header (required on encrypted endpoints). Base64-encoded 16-byte AES initialization vector.\n","schema":{"type":"string"}},"BunqClientEncryptionKey":{"name":"X-Bunq-Client-Encryption-Key","in":"header","required":true,"description":"Encryption header (required on encrypted endpoints). Base64-encoded, RSA-encrypted AES key.\n","schema":{"type":"string"}},"BunqClientEncryptionHmac":{"name":"X-Bunq-Client-Encryption-Hmac","in":"header","required":true,"description":"Encryption header (required on encrypted endpoints). Base64-encoded HMAC-SHA1 of the IV concatenated with the ciphertext.\n","schema":{"type":"string"}}},"schemas":{"CardGeneratedCvc2":{"type":"object","properties":{"id":{"type":"integer"},"created":{"type":"string","format":"date-time"},"updated":{"type":"string","format":"date-time"},"type":{"type":"string","enum":["STATIC","GENERATED"]},"cvc2":{"type":"string"},"status":{"type":"string","enum":["AVAILABLE","USED","EXPIRED","BLOCKED"]},"expiry_time":{"type":"string","format":"date-time","nullable":true}}}}},"paths":{"/user/{userId}/card/{cardId}/generated-cvc2/{generatedCvc2Id}":{"get":{"tags":["Card Management"],"summary":"Get Generated CVC2 Details","description":"🔒 **Encrypted endpoint** — the response is end-to-end encrypted. See the Encryption section.\n\nGet the details for a specific generated CVC2 code.\n","parameters":[{"name":"userId","in":"path","required":true,"schema":{"type":"integer"}},{"name":"cardId","in":"path","required":true,"schema":{"type":"integer"}},{"name":"generatedCvc2Id","in":"path","required":true,"schema":{"type":"integer"}},{"$ref":"#/components/parameters/CacheControl"},{"$ref":"#/components/parameters/UserAgent"},{"$ref":"#/components/parameters/BunqLanguage"},{"$ref":"#/components/parameters/BunqRegion"},{"$ref":"#/components/parameters/BunqGeolocation"},{"$ref":"#/components/parameters/BunqClientRequestId"},{"$ref":"#/components/parameters/BunqClientAuthentication"},{"$ref":"#/components/parameters/BunqClientSignature"},{"$ref":"#/components/parameters/BunqClientEncryptionIv"},{"$ref":"#/components/parameters/BunqClientEncryptionKey"},{"$ref":"#/components/parameters/BunqClientEncryptionHmac"}],"responses":{"200":{"description":"Generated CVC2 details","content":{"application/json":{"schema":{"type":"object","properties":{"Response":{"type":"array","items":{"type":"object","properties":{"CardGeneratedCvc2":{"$ref":"#/components/schemas/CardGeneratedCvc2"}}}}}}}}}}}}}}
```

## Create Generated CVC2

> 🔒 \*\*Encrypted endpoint\*\* — the request body and response are end-to-end encrypted. See the Encryption section.\
> \
> Generate a new CVC2 code for a card.<br>

```json
{"openapi":"3.1.0","info":{"title":"bunq Partner API","version":"1.0.0"},"tags":[{"name":"Card Management","description":"Credit and debit card creation and management"}],"servers":[{"url":"https://partner-api.sandbox.bunq.com","description":"Sandbox Partner API Server"},{"url":"https://api.partner.bunq.com","description":"Production Partner API Server"}],"security":[{"SessionAuth":[]},{"ClientSignature":[]}],"components":{"securitySchemes":{"SessionAuth":{"type":"apiKey","in":"header","name":"X-Bunq-Client-Authentication","description":"Session token received from POST /session-server"},"ClientSignature":{"type":"apiKey","in":"header","name":"X-Bunq-Client-Signature","description":"HMAC-SHA256 signature of request body using private key"}},"parameters":{"CacheControl":{"name":"Cache-Control","in":"header","required":false,"schema":{"type":"string","default":"no-cache"}},"UserAgent":{"name":"User-Agent","in":"header","required":false,"schema":{"type":"string"}},"BunqLanguage":{"name":"X-Bunq-Language","in":"header","required":false,"schema":{"type":"string","default":"en_US"}},"BunqRegion":{"name":"X-Bunq-Region","in":"header","required":false,"schema":{"type":"string","default":"NL"}},"BunqGeolocation":{"name":"X-Bunq-Geolocation","in":"header","required":false,"schema":{"type":"string"}},"BunqClientRequestId":{"name":"X-Bunq-Client-Request-Id","in":"header","required":false,"schema":{"type":"string"}},"BunqClientAuthentication":{"name":"X-Bunq-Client-Authentication","in":"header","required":true,"schema":{"type":"string","description":"Session token from POST /session-server"}},"BunqClientSignature":{"name":"X-Bunq-Client-Signature","in":"header","required":true,"schema":{"type":"string","description":"HMAC-SHA256 signature of request"}},"BunqClientEncryptionIv":{"name":"X-Bunq-Client-Encryption-Iv","in":"header","required":true,"description":"Encryption header (required on encrypted endpoints). Base64-encoded 16-byte AES initialization vector.\n","schema":{"type":"string"}},"BunqClientEncryptionKey":{"name":"X-Bunq-Client-Encryption-Key","in":"header","required":true,"description":"Encryption header (required on encrypted endpoints). Base64-encoded, RSA-encrypted AES key.\n","schema":{"type":"string"}},"BunqClientEncryptionHmac":{"name":"X-Bunq-Client-Encryption-Hmac","in":"header","required":true,"description":"Encryption header (required on encrypted endpoints). Base64-encoded HMAC-SHA1 of the IV concatenated with the ciphertext.\n","schema":{"type":"string"}}},"schemas":{"CardGeneratedCvc2":{"type":"object","properties":{"id":{"type":"integer"},"created":{"type":"string","format":"date-time"},"updated":{"type":"string","format":"date-time"},"type":{"type":"string","enum":["STATIC","GENERATED"]},"cvc2":{"type":"string"},"status":{"type":"string","enum":["AVAILABLE","USED","EXPIRED","BLOCKED"]},"expiry_time":{"type":"string","format":"date-time","nullable":true}}}}},"paths":{"/user/{userId}/card/{cardId}/generated-cvc2":{"post":{"tags":["Card Management"],"summary":"Create Generated CVC2","description":"🔒 **Encrypted endpoint** — the request body and response are end-to-end encrypted. See the Encryption section.\n\nGenerate a new CVC2 code for a card.\n","parameters":[{"name":"userId","in":"path","required":true,"schema":{"type":"integer"}},{"name":"cardId","in":"path","required":true,"schema":{"type":"integer"}},{"$ref":"#/components/parameters/CacheControl"},{"$ref":"#/components/parameters/UserAgent"},{"$ref":"#/components/parameters/BunqLanguage"},{"$ref":"#/components/parameters/BunqRegion"},{"$ref":"#/components/parameters/BunqGeolocation"},{"$ref":"#/components/parameters/BunqClientRequestId"},{"$ref":"#/components/parameters/BunqClientAuthentication"},{"$ref":"#/components/parameters/BunqClientSignature"},{"$ref":"#/components/parameters/BunqClientEncryptionIv"},{"$ref":"#/components/parameters/BunqClientEncryptionKey"},{"$ref":"#/components/parameters/BunqClientEncryptionHmac"}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"type":{"type":"string","enum":["STATIC","GENERATED"],"description":"The type of generated CVC2."}}}}}},"responses":{"200":{"description":"Generated CVC2 created successfully","content":{"application/json":{"schema":{"type":"object","properties":{"Response":{"type":"array","items":{"type":"object","properties":{"CardGeneratedCvc2":{"$ref":"#/components/schemas/CardGeneratedCvc2"}}}}}}}}}}}}}}
```
