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

# Payment Integration Steps

> Understand the Direct API integration flow, including payment method display, parameter handling, callback processing, and compliance requirements.

If you are integrating the HaiPay Direct API, the core workflow is: create an order, return payment details, receive asynchronous notifications, and validate parameters and signatures correctly.

Merchants who want to display payment methods to users and accept payments on their own checkout page can integrate HaiPay using a pure API (Direct API) approach.

For Direct API interfaces, merchants must have PCI-DSS certification if they handle card number information themselves.

## 1. Collection Process

```mermaid theme={null}
sequenceDiagram
    participant C as Customer Client
    participant M as Merchant Server
    participant H as HaiPay Server
    participant B as Wallet/Bank

    C->>C: 1. User places order, enters checkout, fills in payment info
    C->>M: 2.1 Initiate payment request
    M->>H: 2.2 Send Request to HaiPay
    H->>B: 2.3 Process Request Result
    B-->>H: 2.4 Return response
    H-->>M: 2.5 Return response
    M-->>C: 2.6 Return response

    B-->>H: 3.1 Async notify payment result
    H-->>M: 3.2 Async notify payment result
    M->>M: 3.3 Notification acknowledged
    H->>H: 3.4 Notification acknowledged
```

## 2. Payment Process

```mermaid theme={null}
sequenceDiagram
    participant M as Merchant Server
    participant H as HaiPay Server
    participant B as Wallet/Bank

    M->>H: 1.1 Initiate payout request
    H->>B: 1.2 Process Request Result
    B-->>H: 1.3 Return response
    H-->>M: 1.4 Return response

    B-->>H: 2.1 Async notify result
    H-->>M: 2.2 Async notify result
    M->>M: 2.3 Notification acknowledged
    H->>H: 2.4 Notification acknowledged
```

## 3. API Parameters

For details, please refer to: [API Description](https://doc.haipay.net/en/history/V20260701/get-started/api-conventions.md)

## 4. End-to-End Testing

For details, please refer to: [End-to-End Testing](https://doc.haipay.net/en/history/V20260701/testing/end-to-end.md)

## Related Topics

* [HaiPay Integration Process Guide](https://doc.haipay.net/en/history/V20260701/get-started/integration-process.md)
* [HaiPay Configuration and Signature Guide](https://doc.haipay.net/en/history/V20260701/guide/config_settings_and_signature_rules_guide.md)
* [HaiPay API Description and Common Rules](https://doc.haipay.net/en/history/V20260701/get-started/api-conventions.md)
* [Handle Asynchronous Notifications and Verify Signatures](https://doc.haipay.net/en/operations/callback.md)
* [Review the Go-Live Checklist (IP Whitelist and Production Setup)](https://doc.haipay.net/en/history/V20260701/testing/go-live-checklist.md)


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