> ## 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 icon="key" title="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.
</Accordion>

## Step 2 — Prepare request parameters

<Accordion icon="list" title="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"
  }
  ```
</Accordion>

## Step 3 — Generate request signature

<Accordion icon="lock" title="How to generate the signature">
  Sign all request parameters using your `client_key`.

  See **Signature Generation** for full instructions.
</Accordion>

## Step 4 — Send payment request

<Accordion icon="send" title="API request example">
  ```text theme={null}
  POST https://api.qfapi.com/trade/v1/payment
  Content-Type: application/json
  ```
</Accordion>

## Step 5 — Handle the response

<Accordion icon="check-circle" title="Successful response example">
  ```text theme={null}
  {
    "respcd": "0000",
    "pay_url": "https://..."
  }
  ```

  Use the returned URL or QR code to complete payment.
</Accordion>

## Step 6 — Receive payment notification

<Accordion icon="bell" title="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
</Accordion>

## Optional: Test locally

<AccordionGroup>
  <Accordion icon="globe" title="Expose your callback URL">
    Use ngrok or similar tools to receive notifications:

    ```text theme={null}
    ngrok http 8080
    ```
  </Accordion>

  <Accordion icon="flask" title="Test with Postman">
    Import the Postman collection to send test requests:

    [https://sdk.qfapi.com/assets/files/qfpay\_openapi\_payment\_request.postman\_collection-c8de8c8fe69f3fcd5a7653d41c289a29.json](https://sdk.qfapi.com/assets/files/qfpay_openapi_payment_request.postman_collection-c8de8c8fe69f3fcd5a7653d41c289a29.json)
  </Accordion>
</AccordionGroup>

***

## Next Steps

<CardGroup cols={2}>
  <Card icon="lock" href="/integration/preparation/authentication-and-signature" title="Authentication & Signing">
    Learn how to sign requests securely.
  </Card>

  <Card icon="bell" href="/integration/common-api/async-notifications" title="Async Notifications">
    Handle payment status updates.
  </Card>

  <Card icon="list" href="/integration/api-reference/paytypes" title="Payment Types">
    View supported payment codes.
  </Card>

  <Card icon="flask" href="/integration/preparation/environments" title="Testing & Environments">
    Use sandbox for testing.
  </Card>
</CardGroup>
