> ## Documentation Index
> Fetch the complete documentation index at: https://doc.haipay.net/llms.txt
> Use this file to discover all available pages before exploring further.

# 测试卡号

> 测试卡号文档，涵盖模拟成功支付、模拟拒付、模拟争议及接口对接规范。

> [!TIP]
>
> 以下页面引用了本测试卡号文档：
>
> * [VISA/MASTER 支付接口](https://doc.haipay.net/zh/history/V20260628/api/version2/creditcard.md)
> * [商户发起交易 MIT](https://doc.haipay.net/zh/history/V20260628/payments/cards/merchant-initiated-transactions.md)
> * [订阅支付](https://doc.haipay.net/zh/history/V20260628/api/version2/Subscription.md)

> [!WARNING]
>
> **只能在测试环境使用**

## 模拟成功支付

使用以下测试卡号，输入任意 CVC（3 位数字）和有效期（未来日期）来模拟支付成功：

| 卡品牌 | 卡号 | CVC | 有效期 |
| :- | :- | :- | :- |
| Visa | 4242424242424242 | 任意 3 位 | 任意未来日期 |
| Mastercard | 5555555555554444 | 任意 3 位 | 任意未来日期 |
| American Express | 378282246310005 | 任意 4 位 | 任意未来日期 |

## 模拟拒付

使用以下测试卡号模拟发卡行拒付，返回对应的错误码：

| 场景 | 卡号 | 错误码 | 拒付码 |
| :- | :- | :- | :- |
| 余额不足 | 4000000000009995 | card\_declined | insufficient\_funds |
| 通用拒付 | 4000000000000002 | card\_declined | generic\_decline |
| 挂失卡 | 4000000000009987 | card\_declined | lost\_card |
| 被盗卡 | 4000000000009979 | card\_declined | stolen\_card |

## 模拟争议

使用以下测试卡号模拟交易后产生争议，支付成功后被持卡人发起争议：

| 争议类型 | 卡号 | 说明 |
| :- | :- | :- |
| 欺诈（Fraudulent） | 4000000000000259 | 支付成功后被争议为欺诈交易 |
| 未收到货（Not Received） | 4000000000002685 | 支付成功后被争议为未收到商品 |

## 相关主题

* [前置组件](https://doc.haipay.net/zh/history/V20260628/payments/cards/payment-element.md)
* [支付链接](https://doc.haipay.net/zh/history/V20260628/api/version2/payment-link.md)
* [商户发起交易 (MIT)](https://doc.haipay.net/zh/history/V20260628/payments/cards/merchant-initiated-transactions.md)
* [核对上线检查清单（IP 白名单与生产配置）](https://doc.haipay.net/zh/history/V20260628/testing/go-live-checklist.md)


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.