> ## 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.

# Collection Application

> Create collection order

> [!NOTE]
>
> All example requests on this page are based on the **sandbox (test) environment**. Please be careful to distinguish it from the production environment.

#### Secret Key & Private Key (Generate Signature)

## Related Topics

* [Credit Card (VISA/MASTER CARD) Payment API](https://doc.haipay.net/docs/en/V20261001/api/version2/creditcard.md)
* [HaiPay API Reference Overview](https://doc.haipay.net/docs/en/api-reference/overview.md)
* [HaiPay Configuration and Signature Guide](https://doc.haipay.net/docs/en/guide/config_settings_and_signature_rules_guide.md)


## OpenAPI

````yaml docs/en/V20260701/api-reference/card/card.openapi.json POST /usd/collect/apply
openapi: 3.0.1
info:
  title: 默认模块
  description: ''
  version: 1.0.0
servers:
  - url: https://uat-interface.haipay.asia
    description: 测试-interface
security: []
tags: []
paths:
  /usd/collect/apply:
    post:
      tags: []
      summary: Credit Card Collection Application
      parameters: []
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                appId:
                  type: integer
                  description: >-
                    Business ID (obtained from backend, must pass corresponding
                    business ID based on currency in URL)
                orderId:
                  type: string
                  description: Merchant refund application order number
                name:
                  type: string
                  description: >-
                    User name, recommended to use real name, format: firstName
                    and lastName separated by space, example: John Doe
                phone:
                  type: string
                  description: Real phone number
                email:
                  type: string
                  description: Real email address
                amount:
                  type: string
                  description: >-
                    Transaction amount (accurate to two decimal places; do not
                    add punctuation, e.g., ",")
                payType:
                  type: string
                  description: ''
                inBankCode:
                  type: string
                  description: ''
                clientIp:
                  type: string
                  description: Client IP address
                callBackUrl:
                  type: string
                  description: URL to redirect after successful payment
                callBackFailUrl:
                  type: string
                  description: URL to redirect after failed payment
                cancelUrl:
                  type: string
                  description: >-
                    Cancel payment redirect URL. If provided, users can click
                    back on the payment page and be redirected to this URL
                  format: uri
                notifyUrl:
                  type: string
                  description: Callback URL
                subject:
                  type: string
                  description: Payment remark
                body:
                  type: string
                  description: Remark details
                partnerUserId:
                  type: string
                  description: >-
                    Unique user identifier (e.g., userId), used for risk
                    control, must be real and valid, otherwise it will affect
                    transactions. Format requirements: digits, uppercase and
                    lowercase letters or common symbols -~!@#$%&*()_.
                sign:
                  type: string
                  description: Signature
              required:
                - appId
                - orderId
                - phone
                - amount
                - payType
                - inBankCode
                - callBackUrl
                - callBackFailUrl
                - subject
                - partnerUserId
                - sign
            example:
              appId: 1054
              orderId: M233323000059
              name: Robert Taylor
              phone: '+12025551234'
              email: robert.taylor@gmail.com
              amount: '299.99'
              payType: CREDIT_CARD
              inBankCode: CREDIT_CARD
              clientIp: 203.0.113.1
              callBackUrl: https://merchant.com/payment/success
              callBackFailUrl: https://merchant.com/payment/fail
              cancelUrl: https://merchant.com/payment/cancel
              notifyUrl: https://merchant.com/api/notify
              subject: Payment for order
              body: Premium subscription
              partnerUserId: '149597870'
              sign: >-
                af0gAHkUOyYHu9owQp8NJ4mPEeUW4vuJcjdxqLIzrVw8AvpLSjD1DXupReSG/CyuSkFRyiIvCp5u703AuGGmfgD2gKDH3Ywau41bAbG2jnHJ8mtjiSJ5iWUzanyd4Kr7d1+rETbzUl7/BkW3t0X8UUFdqpxwG8DPUjAwUKfplWDHV7koG51Ozexd80DCsmW6eWdouAZ1uNXGLYmV3ftE3BmfNRtuv1C5bfTJWrTEIOxbF6g2uYOFZTlIgrQgd7/2PsAYwQQXNz8Q8CYl4OxqCv4pXJxaLWPbR5tqZu9og5kn32C9aHW/NlU1y39vzz+4ef81yPAqUV9oHlSMSPrMmw==
        required: true
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                type: object
                properties:
                  status:
                    type: string
                    description: '1: Normal, 0: Exception'
                  error:
                    type: string
                    description: Error code
                  msg:
                    type: string
                    description: Error description
                  data:
                    type: object
                    properties:
                      orderId:
                        type: string
                        description: Merchant application order number
                      orderNo:
                        type: string
                        description: >-
                          Platform order number (original collection platform
                          order number)
                      payUrl:
                        type: string
                        description: Payment link
                      bankCode:
                        type: string
                        description: Payment Method Code
                      clientToken:
                        type: string
                        description: >-
                          Client token used in JavaScript Web SDK (see
                          [HaiPaySDK.js](#haipaycdn))
                      sign:
                        type: string
                        description: Signature
                    additionalProperties: false
                additionalProperties: false
              examples:
                success:
                  summary: Success
                  value:
                    status: '1'
                    error: '00000000'
                    msg: success
                    data:
                      orderId: M233323000059
                      orderNo: '6023071013539074'
                      payUrl: https://pay.haipay.asia/cashier/1L9zQS2
                      bankCode: PIX
                      clientToken: eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9
                      sign: >-
                        af0gAHkUOyYHu9owQp8NJ4mPEeUW4vuJcjdxqLIzrVw8AvpLSjD1DXupReSG/CyuSkFRyiIvCp5u703AuGGmfgD2gKDH3Ywau41bAbG2jnHJ8mtjiSJ5iWUzanyd4Kr7d1+rETbzUl7/BkW3t0X8UUFdqpxwG8DPUjAwUKfplWDHV7koG51Ozexd80DCsmW6eWdouAZ1uNXGLYmV3ftE3BmfNRtuv1C5bfTJWrTEIOxbF6g2uYOFZTlIgrQgd7/2PsAYwQQXNz8Q8CYl4OxqCv4pXJxaLWPbR5tqZu9og5kn32C9aHW/NlU1y39vzz+4ef81yPAqUV9oHlSMSPrMmw==
                param_error:
                  summary: Parameter validation failed
                  value:
                    status: '0'
                    error: '1001'
                    msg: orderId can not blank
                    data: null
                sign_error:
                  summary: Signature error
                  value:
                    status: '0'
                    error: '1002'
                    msg: Invalid request signature
                    data: null
          headers: {}
      deprecated: false
      security: []

````

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