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

> Use the appId corresponding to TRY. After successful user payment, the TRY balance will be increased.

<div class="flex flex-col gap-4">
  <div class="api-section-heading flex flex-col gap-y-4 w-full">
    <div class="flex items-baseline border-b pb-2.5 border-gray-100 dark:border-gray-800 w-full">
      <h4 class="api-section-heading-title flex-1 mb-0">Secret Key & Private Key (Generate Signature)</h4>
    </div>

    <div />
  </div>

  <input id="secret-key" placeholder="Secret Key" class="px-3 py-2 border rounded-md" />

  <input id="private-key" placeholder="Private Key" class="px-3 py-2 border rounded-md" />
</div>

## Related Topics

* [Turkey Payment API](/docs/en/api/version2/Turkey)
* [HaiPay API Reference Overview](/docs/en/api-reference/overview)
* [HaiPay Configuration and Signature Guide](/docs/en/guide/config_settings_and_signature_rules_guide)


## OpenAPI

````yaml docs/en/V20260701/api-reference/try/try.openapi.json POST /try/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:
  /try/collect/apply:
    post:
      tags: []
      summary: TRY Collection Application
      description: >-
        Use the appId corresponding to TRY. After successful user payment, the
        TRY balance will be increased.
      parameters: []
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                appId:
                  type: integer
                  description: >-
                    Business ID (obtained from the backend; must match the
                    currency in the URL)
                orderId:
                  type: string
                  description: Merchant Order ID
                  maxLength: 48
                name:
                  type: string
                  description: Payee Name
                phone:
                  type: string
                  description: Valid phone number
                email:
                  type: string
                  description: Valid email
                  format: email
                amount:
                  type: string
                  description: Transaction amount (in local currency)
                  pattern: ^\d+\.\d{2}$
                currency:
                  type: string
                  description: Currency (TRY)
                payType:
                  type: string
                  description: Transaction Type PAYMENT_GATEWAY
                inBankCode:
                  type: string
                  description: ''
                callBackUrl:
                  type: string
                  description: Redirect URL after successful payment
                  format: uri
                callBackFailUrl:
                  type: string
                  description: Redirect URL after failed payment
                  format: uri
                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
                  format: uri
                subject:
                  type: string
                  description: >-
                    Payment remark (transaction title, product name, or payment
                    reason)
                body:
                  type: string
                  description: Remark details
                partnerUserId:
                  type: string
                  description: >-
                    Unique user identifier (e.g., userId), required for risk
                    control. Must be valid; otherwise it may affect the
                    transaction. Format: numbers, letters, or symbols
                    `-~!@#$%&*()_`.
                  pattern: ^[A-Za-z0-9\-~!@#$%&*()_]+$
                sign:
                  type: string
                  description: Signature
              required:
                - appId
                - orderId
                - name
                - phone
                - email
                - amount
                - payType
                - inBankCode
                - callBackUrl
                - callBackFailUrl
                - partnerUserId
                - sign
            example:
              appId: 1054
              orderId: M233323000059
              amount: '300'
              phone: '09230219312'
              email: 23423@qq.com
              name: test
              inBankCode: GPay
              payType: PAYMENT_GATEWAY
              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 order number (must be unique)
                      orderNo:
                        type: string
                        description: Platform order number
                      payUrl:
                        type: string
                        description: Payment link
                      sign:
                        type: string
                        description: Signature
              example:
                status: '1'
                error: '00000000'
                msg: ''
                data:
                  orderId: M233323000059
                  orderNo: '6023071013539074'
                  payUrl: ''
                  sign: >-
                    YEoA8Y2JzQFGVzwJSqmemm1Kfv/bfyIfCqv2dp7RNzT5B72AQvdD+nt2nR4sL1HWscvmNHyVt5ovAi7MMhy3ziih/sMph+wPx4YjH3W1h5DyBvSlWvaKfKrK5ViomZ0pPYWydwRHnnRnicxToHK9S6qtSy7Q73O0hdz4hJ9p41Th3ycBl2Q9SeqSZYSY1ohcPDhdyRf2y0prb8rHgpBKzxZ5BKX/1bsE9OmsSEHAEYT8OGgko6aNe8XPAhr4G48cpWTftvnGQuzh0O65nuZRI/PF+Axt2zJCVbFHDDSREI9NlAT82ebDqhlVdxQzKE67D1nxgjb3dPmDUYHOBpmwxQ==
      deprecated: false
      security: []

````