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

# Postman 集合

使用 Localpayment 官方 Postman 集合，简化您的 API 测试和集成流程。这个全面的集合提供了所有接口的预配置请求，让您无需编写任何代码即可轻松探索、测试和了解我们的 API。

## 什么是 Postman？

> [card] API 开发平台
>
> Postman 是一个用于 API 开发的协作平台，它简化了 API 的构建、测试和文档编写。

> [card] 无代码测试
>
> 使用预构建的请求、环境和自动化工作流程，以可视化的方式测试 API endpoint

### Postman 主要功能

* **集合**：将 API 请求整理到文件夹中，并与您的团队共享。
* **环境**：使用变量管理不同的配置（测试环境与生产环境）。
* **自动化测试**：编写并运行测试以自动验证 API 响应

> [!NOTE]
>
> **Postman 新手？**
>
> 免费[下载 Postman](https://www.postman.com/downloads/)，并访问其[学习中心](https://learning.postman.com/)获取全面的教程。

***

## Postman 集合入门指南

### 下载集合

获取我们最新版的 Postman 集合：

> [card] [Postman 集合](https://cdn.localpayment.com/public_docs/Postman/Postman%20Collection20241017.postman_collection)

### 导入到 Postman

**选项 1：直接导入**

* 点击上方的“在 Postman 中运行”按钮。
* Postman 将打开并提示您导入集合

**选项 2：手动导入**

1. 打开 Postman
2. 点击左上角的 **导入** 按钮
3. 将下载的 JSON 文件拖放到指定位置，或者从您的计算机中选择该文件。
4. 点击 **导入** 按钮，将该集合添加到您的工作区。

### 设置环境

导入我们预先配置好的环境模板：

[下载环境模板](https://cdn.localpayment.com/public_docs/Postman/V3%20-%20Enviroment-%20STAGE.postman_environment)

这包括使用 Localpayment API 进行测试所需的所有变量。

***

## 环境配置

Localpayment 环境包含一些必要的变量，需要根据您的测试场景进行配置。请在发送请求之前，在 Postman 环境中更新这些值。

### 环境变量

| 变量 | 说明 | 示例值 | 必需的 |
| - | - | - | - |
| `accountNumber` | 进行操作的 Localpayment 账号 | `3.203.200.000.001` | 是的 |
| `baseUrl` | API 环境 URL（测试环境或生产环境） | `https://api.stage.localpayment.com` | 是的 |
| `userName` | 用于令牌生成请求的用户名 | `your_username` | 是的 |
| `password` | 用于令牌生成请求的密码 | `your_password` | 是的 |
| `accessToken` | 用于 API 身份验证的 Bearer 令牌（从令牌请求自动填充） | `Bearer eyJhbGciOiJ...` | 否 |
| `refreshToken` | 用于获取新访问令牌的刷新令牌 | `eyJhbGciOiJ...` | 否 |
| `country` | 运营国家代码（ISO 3166-1 alpha-3） | `MEX` | 是的 |
| `externalId` | Postman 自动生成的 UUID4 标识符 | `f47ac10b-58cc-4372-a567-0e02b2c3d479` | 否 |
| `internalId` | 内部交易标识符（由 API 响应自动填充） | `0dcf3970-006a-46e8-b914-f3853abc3cf3` | 否 |
| `currency` | 交易货币代码（ISO 4217） | `MXN` | 是的 |
| `conceptCode` | 来自 Localpayment 概念列表的预定义概念代码 | `0001` | 是的 |

### 配置您的环境

1. 在 Postman 中，点击侧边栏中的 **环境** 选项。
2. 选择 **Localpayment 环境**
3. 请使用您的实际凭据更新每个变量的 **当前值**。
4. 请确保已在右上角的下拉菜单中选择环境。

***

## 集合结构

我们的 Postman 集合按产品和功能进行分类，方便浏览：

```
Localpayment API
├── Before a payment
│ ├── Authentication
│ ├── Validation Services
│ └── Resources
├── Payins
│ ├── Cards
│ ├── Virtual Accounts
│ └── Subscriptions
├── Payouts
└── Treasury & FX
  ├── FX Services
  ├── Reports
  └── Transactions
```

***

## 更多资源

> [card] [API 参考](https://docs.localpayment.com/zh/reference)
>
> 完整的 endpoint 文档，包含请求/响应示例和参数

> [card] [Webhooks](https://docs.localpayment.com/zh/docs/webhooks.md)
>
> 设置并验证用于实时事件通知的 webhook endpoint

> [card] [Postman 学习中心](https://learning.postman.com/)
>
> Postman 官方文档、教程和 API 测试最佳实践


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