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

# Pakistan — Collection Application

> Pakistan — Collection Application (POST /pkr/collect/apply): Use the appId corresponding to PKR. After successful user payment, the PKR balance will be increased. Key request parameters include orderId, name, phone, email.

> [!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

* [Pakistan API](https://doc.haipay.net/en/payments/local/pakistan.md)
* [HaiPay API Reference Overview](https://doc.haipay.net/en/api-reference/overview.md)
* [HaiPay Configuration and Signature Guide](https://doc.haipay.net/en/get-started/configuration-and-signatures.md)
* [Pakistan — Collection Query (POST /pkr/collect/query)](https://doc.haipay.net/en/api-reference/pkr/collect-query.md)
* [Handle Asynchronous Notifications and Verify Signatures](https://doc.haipay.net/en/operations/callback.md)
* [Look Up API Response Structure and Error Codes](https://doc.haipay.net/en/resources/error-responses.md)
* [Look Up Collection Payment Types and Codes (payType)](https://doc.haipay.net/en/resources/cashin-code-list.md)


## OpenAPI

````yaml docs/en/V20260701/api-reference/pkr/pkr.openapi.json POST /pkr/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:
  /pkr/collect/apply:
    post:
      tags: []
      summary: PKR Collection Application
      description: >-
        Use the appId corresponding to PKR. After successful user payment, the
        PKR balance will be increased.
      parameters: []
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                appId:
                  type: integer
                  description: >-
                    Business ID (obtained from the backend, must pass the
                    corresponding business ID according to the currency in URL)
                orderId:
                  type: string
                  description: Merchant Order Number
                  maxLength: 48
                name:
                  type: string
                  description: Recipient's Name
                phone:
                  type: string
                  description: Real Mobile Number
                email:
                  type: string
                  description: Real Email
                  format: email
                amount:
                  type: string
                  description: >-
                    Transaction Amount (accurate to two decimals; no punctuation
                    allowed, e.g., “,” is forbidden)
                payType:
                  type: string
                  description: Transaction Type
                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 Note (transaction title, product name, reason for
                    payment)
                body:
                  type: string
                  description: Note Details
                idCard:
                  type: string
                  description: ID card number, required for JAZZCASH
                partnerUserId:
                  type: string
                  description: >-
                    Unique user identifier (e.g., userId), used for risk control
                    system, must be valid, otherwise it will affect the
                    transaction. Format: digits, 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
              name: Muhammad Ali Khan
              phone: '03012345678'
              email: muhammad.khan@gmail.com
              amount: '15000.00'
              payType: ONLINE_BANKING
              inBankCode: JAZZCASH
              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
              idCard: '0000000000000'
              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'
                    default: '1'
                  error:
                    type: string
                    description: Error code
                    default: '00000000'
                  msg:
                    type: string
                    description: Error description
                    default: ''
                  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 URL
                      qrCode:
                        type: string
                        description: QR Code content – can generate QR by yourself
                      sign:
                        type: string
                        description: Signature
                    additionalProperties: false
                    default: {}
                additionalProperties: false
              examples:
                success:
                  summary: Success
                  value:
                    status: '1'
                    error: '00000000'
                    msg: ''
                    data:
                      orderId: M233323000059
                      orderNo: '6023071013539074'
                      payUrl: https://pay.haipay.asia/cashier/1L9zQS2
                      qrCode: 00020101021228760011ph.ppmi.p2m
                      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.