> For the complete documentation index, see [llms.txt](https://prepaidify.gitbook.io/docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://prepaidify.gitbook.io/docs/physical-card/api-integration/bank-card-replacement.md).

# Bank Card Replacement

### POST Bank Card Replacement

POST /api/mastercard/changeCard.html

Replace a bank card. Note: After a successful card replacement, the old card will be frozen, and the new card will be automatically activated using the cardholder information from the old card. The balance from the old card will be transferred to the new card within 24 hours. During this period, please ensure the security of the card to prevent any user losses.

> Request Body

```
```

```json
{
  "cardId": "card123",
  "cardNo": "**** **** **** 1234",
  "cvv": "123",
  "oldCardId": "old_card123",
  "oldCardNo": "**** **** **** 5678",
  "randomStr": "abcdef1234567890"
}
```

#### Request Parameters

| Name      | Type   | Required | Base64 Encoded | Description                                              |
| --------- | ------ | -------- | -------------- | -------------------------------------------------------- |
| cardId    | string | false    | none           | cardId or cardNo must be filled in at least              |
| cardNo    | string | false    | none           | cardId or cardNo must be filled in at least              |
| cvv       | string | false    | none           | CVV will be validated if provided                        |
| oldCardId | string | true     | none           | Either oldCardId or oldCardNo must be filled in at least |
| oldCardNo | string | true     | none           | Either oldCardId or oldCardNo must be filled in at least |
| randomStr | string | true     | none           | 32-digit random string                                   |

> Example Response
>
> 200 Response

```
```


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://prepaidify.gitbook.io/docs/physical-card/api-integration/bank-card-replacement.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
