Set PIN for Payment Card

Set or update the PIN for a payment card by providing the card ID and new PIN with confirmation.

Set PIN for Payment Card

The Set PIN endpoint allows users to securely set a new PIN or update the existing PIN for a payment card. The request requires both the new PIN and a confirmation value to prevent errors during the update. All PIN changes are subject to security validation to ensure compliance with PIN complexity and length requirements.

Endpoint

POST /api/paymentCards/setPinForPaymentCard

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 cardholder needs to set a PIN on a newly issued card before first use, or when they want to change an existing PIN for security purposes. This applies to physical, virtual, and burner payment cards that support PIN-based transactions. Integrating this endpoint into your card management flow ensures cardholders can independently manage their card security at any time.

Request Body

FieldTypeRequiredDescription
paymentCardIdstringYesUnique identifier of the payment card for which the PIN is being set
newPinstringYesThe new PIN to assign to the card. Must be 1 to 4 digits in length
pinConfirmstringYesConfirmation of the new PIN. Must exactly match newPin to prevent accidental changes
{
  "paymentCardId": "card_a1b2c3d4e5f6",
  "newPin": "7492",
  "pinConfirm": "7492"
}

Response

200 OK

A 200 response indicates the PIN was successfully set or updated. The response body on success is empty.

{}

Error Codes

CodeWhen it happens
400Missing required fields, PIN and confirmation do not match, or PIN does not meet length requirements
401Token missing, expired, or invalid
403Insufficient permissions to update the card PIN
404Payment card not found for the provided paymentCardId
500Internal server error

Common Mistakes

  • Sending a newPin and pinConfirm that do not match — both fields must be identical or the request will be rejected with a 400 error.
  • Providing a PIN longer than 4 characters — the newPin and pinConfirm fields each enforce a maximum length of 4 characters.
  • Using an expired or missing Bearer token — ensure the token is refreshed before making requests, as the token lifetime is only 10 minutes.
  • Passing an incorrect or non-existent paymentCardId — verify the card ID belongs to the authenticated user's account before submitting.

Related Endpoints

  • POST /api/paymentCards/createPaymentCard — create a new physical, virtual, or burner payment card
  • GET /api/paymentCards/getPaymentCards — retrieve a list of payment cards associated with a customer
  • POST /api/paymentCards/lockPaymentCard — lock a payment card to temporarily prevent transactions
  • POST /api/paymentCards/unlockPaymentCard — unlock a previously locked payment card

Example

curl -X POST https://api.banking.netevia.dev/api/paymentCards/setPinForPaymentCard \
  -H "Authorization: Bearer YOUR_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "paymentCardId": "card_a1b2c3d4e5f6",
    "newPin": "7492",
    "pinConfirm": "7492"
  }'
Body Params
string
required
length ≥ 1
string
required
length between 1 and 4
string
required
length between 1 and 4
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!