> For the complete documentation index, see [llms.txt](https://doc.tokenpay.me/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://doc.tokenpay.me/tutorials/how-does-a-website-access-api-payments.md).

# How does a website access API payments?

Payment functions can be integrated into your application or website by accessing the API. The API interface also provides real-time access to payment-related data and reports, including transaction records, payment status, and fund flows, helping you with real-time monitoring and management.

### Before accessing the API payment, you need to complete the registration operation.

* **Click "Application"**

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

* **Select API access to payments and click "Access"**

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

* **Click "Add application"**

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

* **Fill in the App name, Callback address, etc. and click "Submit".**

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

* **After successful creation, we can see the newly added API application and will produce APP\_ID and APP\_SECRET for API calls, and then refer to the API documentation for operation. Tip: APP\_ID and APP\_SECRECT are very important, please don't show them in any web code, URL parameter!**

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


---

# 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://doc.tokenpay.me/tutorials/how-does-a-website-access-api-payments.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.
