---
title: "Link Card And account"
method: POST
path: "/pws/v2/pws_link_card_acc/"
tags: ["Card V2"]
---

# Link Card And account

`POST /pws/v2/pws_link_card_acc/`

This web service allows to link card, account and cardholder.  
  
Supports idempotency.

## Request body

- LinkAccountCardModelV2
  - `action` integer, required — <p>action type :</p> <ul> <li class="docBullet">0 ==&gt; Link card and account or customer</li> <li class="docBullet">1 ==&gt; Unlink card and account or customer (Pending for development)</li> <li class="docBullet">2 ==&gt; Link card for replacement purpose</li> </ul>
  - `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
  - `token` integer, required — Public token for the card
  - `user_id` string — User Id of the Customer who triggered the API request.
  - `remarks` string — Remarks for API request
  - `old_token` integer — <p>Existing public token</p> <ul> <li>Linking existing token with new blank token will serve as replacement.</li> <li>Required when action = 2</li> </ul> <p>&nbsp;</p>
  - `ac_id` integer — <p>Account id</p> <ul> <li>Client can link account and customer id during account creation itself and pass while linking with card.</li> <li>Required when action = 0</li> <li>Pass customer also id if an account is not linked to any customer yet</li> </ul>
  - `ac_ext_ref` string — <p>Account external reference</p> <ul> <li>Client can link ac_ext_ref/account and customer id during account creation itself and pass while linking with card.</li> <li>Required when action = 0</li> <li>Client should use unique ac_ext_ref while linking with card</li> <li>Pass customer id also if an ac_ext_ref/account is not linked to any customer yet</li> </ul>
  - `cu_id` integer — <p>Customer id</p> <ul> <li>Client need to pass valid customer id otherwise linking with account or token will be skipped internally</li> <li>Client need to make sure account and customer id is already linked if not passed during link account card</li> </ul>
  - `inherit_rules` integer — <p>Inherit existing card rules. Based on value provide, it will either inherit existing rules or skip.&nbsp;</p> <ul> <li>0 ==&gt; Inherit</li> <li>1 ==&gt; Donot inherit</li> </ul> <p>Default value is 0 i.e. always inherit</p>

## Response `200`

Successful Response

- LinkAccountCardResponseModel
  - `header` LinkAccountCardResponseModelHeader
    - `error_id` integer — error id
    - `error_desc` string — error message
  - `body` LinkAccountCardResponseModelBody
    - `token` integer — Public token
    - `ac_id` integer — account id

## Other responses

- `404` — Webservices does not exist
- `500` — Internal Server error

---

[API](https://skmtc.net/paymentology/apis/payapi-docs.md) · [All operations](https://skmtc.net/paymentology/apis/payapi-docs/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/paymentology/payapi-docs/revisions/a675891b0365/schema)
