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:

  • 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·
required
application/json

Extended model with account_id for creating credentials

  • account_id
    Type: string | null · Account Id
  • code
    Type: string | null · Code
    min length:  
    12
    max length:  
    12
  • pin
    Type: string | null · 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": null,
  "pin": null
}'
{
  "account_id": "string",
  "code": "string",
  "created_at": "2026-07-10T18:41:46.930Z",
  "id": "string",
  "is_active": true,
  "pin": "string"
}