# 快速开始

您创建 MoneyCollect 帐户后即可开始将 MoneyCollect 集成到您的应用程序或网站中，需要四个步骤:

1. [注册](#step-1-zhu-ce-zhang-hu) MoneyCollect 帐户。
2. [获取您的 API 密钥](#bu-zhou-2-huo-qu-api-mi-yao)，以便 MoneyCollect 可以验证您的集成的 API 请求。
3. 将您的 [API 密钥输入](#bu-zhou-3-ji-cheng-qian-shi-yong-moneycollect-huo-dong-api-can-kao-jin-xing-ce-shi) MoneyCollect API 并与 MoneyCollect API 交互。
4. [发送测试 API ](#bu-zhou-4-fa-song-ce-shi-api-qing-qiu-bing-huo-de-dong-tai-xiang-ying)请求以确认一切正常运行。

## **步骤 1: 注册账户**

从Portal后台创建 MoneyCollect 帐户，供您和您的团队成员进行测试和开发。 注册时您将被授予所有者角色，然后您可以邀请团队中的其他成员以其他用户角色访问该帐户。

每个帐户都有两对密钥：一对用于测试，一对用于运行线上交易。 所有 API 请求都需要指定测试或线上模式。

{% hint style="info" %}
只有 3 个角色可以访问 API 密钥：所有者/管理员/开发人员。
{% endhint %}

{% hint style="warning" %}
创建 MoneyCollect 帐户后，您就可以开始在测试模式下与该帐户进行交互，但在激活该帐户之前，您无法接受真实付款。
{% endhint %}

## **步骤2: 获取API密钥**

访问您的测试 API 凭据以开始进行测试交易。

1. 具有管理员/开发人员权限的用户可以通过导航到 [MoneyCollect 后台](https://portal.moneycollect.com)的开发人员部分并单击 API 密钥来访问 MoneyCollect 帐户的 API 密钥。 您的 API 密钥可在仪表板中找到，您可以复制公钥和私钥以用于下一步。 请注意，私钥用于服务器到服务器的身份验证，它们只会公开一次，需要保密。
2. 配置您的系统以安全地存储 API 密钥。 如果您的任何私钥丢失或泄露，您需要将其删除并生成新的。

{% hint style="info" %}
如果您在仪表板中看不到您的私人API密钥，这意味着您无法访问它们。请联系您的MoneyCollect账户的<mark style="color:orange;">所有者</mark>，并请求将您作为<mark style="color:orange;">开发者</mark>添加到您的团队中。
{% endhint %}

{% hint style="danger" %}
**只使用您的测试API密钥进行测试和开发**。这可以确保您不会意外修改您的线上账户配置信息。
{% endhint %}

## **步骤 3：集成前使用 MoneyCollect 活动 API 参考进行测试**

使用[MoneyCollect 活动 API 参考](https://mc-api.stoplight.io/docs/api-v1/b3A6MjI1NTQ0Njc-retrieve-balance)并将您的 API 密钥粘贴到 MoneyCollect 的 API 端点之一，如下面所示的屏幕截图。（记住在您的 API 密钥前面加上“无记名”）

<figure><img src="/files/RMtQ25ERtYgEgvig8JxS" alt=""><figcaption></figcaption></figure>

## **步骤 4：发送测试 API 请求并获得动态响应**

使用正确的 API 密钥单击“发送请求”按钮，然后您可以实时获得动态响应。

<figure><img src="/files/LDaYIgCr6yTLdSIOuIXW" alt=""><figcaption></figcaption></figure>


---

# Agent Instructions: 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:

```
GET https://docs.moneycollect.com/docs/guidelines_zh/zai-xian-zhi-fu/kuai-su-kai-shi.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
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.
