---
title: "Create account"
method: POST
path: "/pty/account/v1/pws_create_account"
tags: ["Ledger API - Accounts"]
---

# Create account

`POST /pty/account/v1/pws_create_account`

## Request

- Base URL: `https://api.uat.paymentology.com`
- URL: `https://api.uat.paymentology.com/pty/account/v1/pws_create_account`
- Auth: HTTP bearer

<ul>
<li class="docBullet">Ledger API version of the PWS <a href="https://developer.paymentology.com/bankinglive/reference/v2_pws_create_account">Create account V2</a> call. Request and response use the same format, served by the Ledger API.</li>
<li class="docBullet">All accounts sit in an account hierarchy: <code>ac_parent_id</code> is required and the new account becomes its child.</li>
<li class="docBullet">Use <code>program_code</code> to assign the account to a program.</li>
</ul>

## Request body

- LedgerCreateAccountRequest
  - `ac_bill_ccy` string, required: Billing currency (Three digit ISO-4217 currency code, e.g. 048=BHD, 060=BMD, 036=AUD)
  - `ac_parent_id` integer, required: Parent account. Newly created accounts under a parent account will have parent-child hierarchy.
  - `ac_set_ccy` string, required: Settlement currency (Three digit ISO-4217 currency code, e.g. 048=BHD, 060=BMD, 036=AUD)
  - `account_name` string, required: Account holder name
  - `api_call_unique_identifier` string, required: Unique number that must be passed at each API request. Identifier to make each API request unique
  - `client_id` integer, required: Unique identifier for the client which Paymentology will provide at outset
  - `user_id` string: User Id of the Customer who triggered the API request.
  - `remarks` string: Remarks for API request
  - `ac_desc` string: Description for the account holder.
  - `ac_ext_ref` string: Account external reference.
  - `crd_prdct_id` integer: Card product id. Must be a correct product id so the account inherits required properties and links with business.
  - `ac_level` 2 | 3 | 4 | 5 | 6: Account hierarchy level (charge card programs only): 2=Master client account level 3=Corporate parent account 4=Department account 5=Customer parent account 6=Customer account
  - `cu_id` integer: Customer Id to link the newly created account to the provided customer. You can get customer id after creating customer using pws_create_customer
  - `branch_name` string: Branch name
  - `program_code` string: Program code for the account. When provided, program_id is ignored. Defaults to the configured default program code if neither is provided.
  - `program_id` integer: Deprecated. Use program_code instead. Ignored when program_code is provided. Program ID for the account. Must be one of the configured program IDs.

## Response `200`

Request processed. Check `header.error_id`: `0` means success. Any other value is a business error, reported with HTTP 200 and an empty `body`. Common codes: 992 (invalid account id), 993 (invalid card token), 995 (validation failed), 1043 (account does not belong to the client), 1055 (invalid program_code), 1531 (invalid customer id).

- LedgerCreateAccountResponse
  - `header` LedgerApiHeader, required
    - `error_id` integer, required
    - `error_desc` string, required
  - `body` object, required
    - `ac_id` integer, required: Newly Created account ID.

## Other responses

- `400`: Request validation failed (missing or invalid fields, unknown fields, malformed JSON, or `client_id` not matching the access token). `header.error_id` is 400 and `header.error_desc` describes the failure.
- `401`: Missing or invalid access token. Empty body.
- `403`: Access token rejected by the API gateway (for example, expired).
- `413`: Request body too large. `header.error_id` is 413.
- `500`: Unexpected error. `header.error_id` is 900.

---

[API](https://skmtc.dev/paymentology/apis/ledger-api.md) - [All operations](https://skmtc.dev/paymentology/apis/ledger-api/llms.txt) - [OpenAPI document](https://skmtc.dev/paymentology/apis/ledger-api/revisions/a5700c501bee?raw)
