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

# Quick Start

> Send your first payment request using QFPay OpenAPI.

## Overview

This quick start walks you through creating a payment request and receiving a payment notification.

***

## Step 1 — Prepare credentials

> [accordion] View required credentials
>
> To use the QFPay OpenAPI, you need:
>
> * `app_code`
> * `client_key`
> * `mchid` (if provided)
>
> If you do not have credentials, contact QFPay support.

## Step 2 — Prepare request parameters

> [accordion] View example request parameters
>
> ```text theme={null}
> {
>   "app_code": "YOUR_APP_CODE",
>   "out_trade_no": "ORDER_1001",
>   "total_fee": "100",
>   "pay_type": "801",
>   "notify_url": "https://example.com/callback"
> }
> ```

## Step 3 — Generate request signature

> [accordion] How to generate the signature
>
> Sign all request parameters using your `client_key`.
>
> See **Signature Generation** for full instructions.

## Step 4 — Send payment request

> [accordion] API request example
>
> ```text theme={null}
> POST https://api.qfapi.com/trade/v1/payment
> Content-Type: application/json
> ```

## Step 5 — Handle the response

> [accordion] Successful response example
>
> ```text theme={null}
> {
>   "respcd": "0000",
>   "pay_url": "https://..."
> }
> ```
>
> Use the returned URL or QR code to complete payment.

## Step 6 — Receive payment notification

> [accordion] Payment notification details
>
> QFPay sends an asynchronous notification to your `notify_url` when payment is completed.
>
> Ensure your endpoint:
>
> * accepts POST requests
> * returns HTTP 200 upon success
> * verifies the signature

## Optional: Test locally

> [accordion] Expose your callback URL
>
> Use ngrok or similar tools to receive notifications:
>
> ```text theme={null}
> ngrok http 8080
> ```

> [accordion] Test with Postman
>
> Import the [Postman collection](https://qf-static.s3.ap-east-1.amazonaws.com/sdk/qfpay_openapi_payment_request.postman_collection.json) to send test requests

***

## Next Steps

> [card] [Authentication & Signing](https://sdk.qfapi.com/integration/preparation/authentication-and-signature.md)
>
> Learn how to sign requests securely.

> [card] [Async Notifications](https://sdk.qfapi.com/integration/common-api/async-notifications.md)
>
> Handle payment status updates.

> [card] [Payment Types](https://sdk.qfapi.com/integration/api-reference/paytypes.md)
>
> View supported payment codes.

> [card] [Testing & Environments](https://sdk.qfapi.com/integration/preparation/environments.md)
>
> Use sandbox for testing.


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