Create Account Credential

Create a new account credential. If no data is provided, a random code and PIN will be generated.

  • If account_id is provided in request body, creates credentials for that account
  • If no account_id is provided, creates credentials for the authenticated account

Authorization rules:

  • Admin accounts can create credentials for any account
  • PSP accounts can create credentials for their merchant children
  • Merchant accounts can only create credentials for themselves

NOTE: The PIN will only be returned once during creation.

Headers
  • Accept
    enum
    const:  
    application/json
    required

    Response format. Must be application/json.

    values
    • application/json
  • Content-Type
    enum
    const:  
    application/json
    required

    Request payload format. Must be application/json when a body is sent.

    values
    • application/json
Body·CredentialCreateWithAccount
required
application/json

Extended model with account_id for creating credentials

  • account_id
    Type: string | null · Account Id
  • code
    Type: string · Code
    min length:  
    12
    max length:  
    12
  • pin
    Type: string · Pin
    min length:  
    6
    max length:  
    6
Responses
  • application/json
  • application/json
Request Example for post/v1/accounts/credentials
curl https://api.uat.koard.com/v1/accounts/credentials \
  --request POST \
  --header 'Accept: application/json' \
  --header 'Content-Type: application/json' \
  --header 'x-koard-apikey: YOUR_SECRET_TOKEN' \
  --data '{
  "account_id": null,
  "code": "",
  "pin": ""
}'
{
  "account_id": "string",
  "code": "string",
  "created_at": "2026-04-20T15:32:06.309Z",
  "id": "string",
  "is_active": true,
  "pin": "string"
}