> ## Documentation Index
> Fetch the complete documentation index at: https://docs.rc.cleverhub.co/llms.txt
> Use this file to discover all available pages before exploring further.

# Create Static PayID

> Creates a Static Open PayID that serves as a unique, reusable identifier linked to a customer’s information. This Static PayID can be used for multiple transactions, offering a persistent payment identifier that simplifies future payments and customer recognition.

When a Static PayID is created, it securely associates essential customer details like name, email, and optional address or phone number, ensuring a streamlined payment process for returning customers. Additionally, the `customer_notification` configuration allows for real-time updates on transaction status, providing merchants with immediate feedback on payment events through a secure callback mechanism.




## OpenAPI

````yaml /api/openapi/v1-reference.yaml post /v1/customers/create_static_open_payid
openapi: 3.0.3
info:
  title: Payment APIs (AUD only)
  description: >-
    ## Introduction

    The Payment API Solution (AUD) offers developers a comprehensive suite of
    API services to build innovative AUD payment solutions efficiently. These
    APIs enable seamless transactions using various payment methods and
    functionalities, ensuring a robust, reliable, and scalable payment
    infrastructure tailored for the Australian market.

    ### Key Features

    - **Payment Methods**:
      - **Payment Link**: Supports payments via card and PayID.
      - **PayID**: Provides instant payments using a unique identifier.
      - **PayTo**: Enables scheduled or recurring payments.
      - **BSB/Account Number**: Allows direct bank transfers.
      - **Payout**: Manage payouts to designated accounts.

    - **Additional Functionalities**:
      - **Balance Management**: Real-time balance inquiries and updates.
      - **Reporting Services**: Generate detailed transaction and payment reports.

    This documentation provides detailed guidance for integrating these
    capabilities into your application.
  termsOfService: https://helloclever.co/terms
  contact:
    email: support@helloclever.co
  version: 1.0.11
servers:
  - url: https://api.cleverhub.co/api
    description: Sandbox Environment
  - url: https://api-merchant.helloclever.co/api
    description: Production Environment
security: []
paths:
  /v1/customers/create_static_open_payid:
    post:
      tags:
        - AUD PayID
      summary: Create Static PayID
      description: >
        Creates a Static Open PayID that serves as a unique, reusable identifier
        linked to a customer’s information. This Static PayID can be used for
        multiple transactions, offering a persistent payment identifier that
        simplifies future payments and customer recognition.


        When a Static PayID is created, it securely associates essential
        customer details like name, email, and optional address or phone number,
        ensuring a streamlined payment process for returning customers.
        Additionally, the `customer_notification` configuration allows for
        real-time updates on transaction status, providing merchants with
        immediate feedback on payment events through a secure callback
        mechanism.
      operationId: createStaticPayId
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
                - name
                - email
                - prefix_static_payid
                - customer_notification
              properties:
                name:
                  type: string
                  description: >-
                    The full name of the customer for whom the Static PayID is
                    created.
                  pattern: ^(?![! ](?![!]*$))[a-zA-Z0-9 ]*(?![ ])$
                  example: John Doe
                email:
                  type: string
                  description: The email address associated with the Static PayID.
                  example: johndoe@example.com
                prefix_static_payid:
                  type: string
                  description: Prefix used to generate a unique PayID for the customer.
                  pattern: ^(?=.{3,35}$)[a-z0-9.]*
                  example: customer.prefix123
                address:
                  type: string
                  description: The full address associated with the Static PayID.
                  example: 123 Example Street
                phone:
                  type: string
                  description: >-
                    Phone number associated with the Static PayID, including
                    country code.
                  example: '+61412345678'
                city:
                  type: string
                  description: City where the customer resides.
                  example: Sydney
                zip_code:
                  type: string
                  example: '2000'
                  description: Postal code of the customer's location.
                state:
                  type: string
                  description: State where the customer resides.
                  example: NSW
                external_id:
                  type: string
                  description: >-
                    Custom identifier set by the merchant to reference the
                    Static PayID.
                  example: custom-id-67890
                customer_notification:
                  type: object
                  required:
                    - endpoint_url
                    - authorization_header
                  description: >-
                    Details for merchant callback notifications when the payment
                    status changes.
                  properties:
                    endpoint_url:
                      type: string
                      format: uri
                      description: >
                        A publicly accessible URL that Hello Clever will invoke
                        when the transaction status changes. 

                        The endpoint must support HTTPS with TLS 1.2 or higher
                        and have a valid certificate from a recognized
                        authority.
                      example: https://example.com/notification_callback
                    authorization_header:
                      type: string
                      description: >
                        The value for the Authorization header that Hello Clever
                        will include in the callback request for security
                        purposes.
                      example: Bearer your_custom_token
      responses:
        '200':
          description: Static Open PayID created successfully.
          content:
            application/json:
              schema:
                type: object
                properties:
                  name:
                    type: string
                    description: Name of the Static Open PayID.
                  email:
                    type: string
                    description: Email associated with the Static Open PayID.
                  address:
                    type: string
                    description: Address linked with the Static Open PayID.
                  phone:
                    type: string
                    description: Phone number associated with the Static Open PayID.
                  zip_code:
                    type: string
                    description: Postal code of the customer’s location.
                  city:
                    type: string
                    description: City associated with the Static Open PayID.
                  state:
                    type: string
                    description: State associated with the Static Open PayID.
                  external_id:
                    type: string
                    description: Custom identifier that can be used for future reference.
                  customer_notification:
                    type: object
                    description: Merchant Callback Details
                    properties:
                      endpoint_url:
                        type: string
                        format: uri
                        description: Callback URL for status notifications.
                      authorization_header:
                        type: string
                        description: Authorization header used in callback.
                  status:
                    type: string
                    enum:
                      - active
                      - expired
                    description: Current status of the Static PayID.
        '400':
          description: Bad Request.
        '401':
          description: Unauthorized.
        '422':
          description: Unprocessable Entity.
      callbacks:
        statusChange:
          '{$request.body#/customer_notification.endpoint_url}':
            post:
              summary: Callback when Static PayID status changes
              operationId: createStaticPayIDCallback
              requestBody:
                required: true
                content:
                  application/json:
                    schema:
                      $ref: '#/components/schemas/PayIDObject'
              responses:
                '200':
                  description: Callback received successfully.
                '400':
                  description: Bad request.
                '401':
                  description: Unauthorized access.
              method: post
              type: path
            path: '{$request.body#/customer_notification.endpoint_url}'
      security:
        - app-id: []
          secret-key: []
components:
  schemas:
    PayIDObject:
      type: object
      properties:
        id:
          type: integer
          description: >
            A unique identifier assigned to the payment request, used for
            tracking and referencing purposes within the system.
          example: 123456
        balance_id:
          type: string
          description: >
            The identifier of the balance associated with this payment request,
            allowing for account management and tracking of specific
            transactions.
          example: HDCHJSS
        name:
          type: string
          description: >
            The name of the individual or entity associated with the payment
            request. This helps identify the payer or payee involved.
          example: John Doe
        request_payid:
          type: string
          description: >
            The PayID generated for the payment request, used to uniquely
            identify and route the payment to the correct recipient.
          example: payid123@example.com
        merchant_name:
          type: string
          description: >
            The name of the merchant managing or handling the payment. This
            field is useful for recognising the party to whom the payment is
            being made.
          example: Merchant Co.
        gst:
          type: boolean
          description: >
            Indicates whether Goods and Services Tax (GST) applies to the
            transaction. A value of `true` means GST is included.
          example: true
        amount:
          type: string
          description: >
            The amount requested for the payment, excluding any applicable
            taxes. This field represents the base value of the transaction.
          example: '100.0'
        total:
          type: string
          description: >
            The total amount due, including all applicable taxes such as GST.
            This is the final amount the payer needs to pay.
          example: '110.0'
        gst_amount:
          type: string
          description: >
            The portion of the total amount that is attributable to GST. This
            helps in breaking down the tax components of the payment.
          example: '10.0'
        expired_at:
          type: string
          format: date-time
          description: >
            The expiration date and time of the PayID, indicating until when the
            PayID is valid for making the payment.
          example: '2024-12-31T23:59:59Z'
        external_id:
          type: string
          description: >
            A custom identifier provided for tracking purposes, such as an
            internal reference or an invoice number.
          example: custom-id-12345
        cashback_amount:
          type: string
          description: >
            The cashback amount, if applicable, that the payer is eligible to
            receive as part of the transaction.
          example: '5.0'
        pay_by:
          type: string
          format: date-time
          description: >
            The last date by which the payment must be made. This provides a
            clear deadline for the payer.
          example: '2024-12-30T23:59:59Z'
        paid_at:
          type: string
          format: date-time
          description: >
            The date and time when the payment was successfully completed. This
            is used for record-keeping and verification.
          example: '2024-12-25T12:34:56Z'
        status:
          type: string
          enum:
            - pending
            - received
            - expired
            - return_pending
            - return_received
            - return_expired
            - return_rejected
          description: |
            The current status of the payment request. Possible values include:
            - `pending`: The payment request is still open and awaiting payment.
            - `received`: The payment has been received.
            - `expired`: The payment request has expired.
            - `return_pending`: A return of funds is in process.
            - `return_received`: Returned funds have been received.
            - `return_expired`: The return process has expired.
            - `return_rejected`: The return request was rejected.
          example: pending
        description:
          type: string
          description: >
            A description accompanying the payment request, providing additional
            information such as the purpose of the payment or related invoice
            details.
          example: 'Payment for invoice #1234'
        nonce:
          type: string
          description: >
            A unique value used to validate the transaction, preventing replay
            attacks and ensuring the integrity of the payment request.
          example: unique_nonce_string
        stage:
          type: string
          enum:
            - overpaid
            - underpaid
            - unmatched_nonce
            - null
          description: >
            Represents the specific stage within the `pending` status. This
            value is `null` unless the transaction is flagged for being
            overpaid, underpaid, or having an unmatched nonce.
          example: overpaid
        refund_information:
          type: object
          description: >
            Details about any refunds that are associated with this payment.
            This includes information about the refund PayID, refund amount, and
            any reasons provided.
          properties:
            refund_payid:
              type: string
              description: >
                The PayID used to top up for a refund, if the refund is needed.
                This helps identify the source of refund.
              example: sample@payid.com
            refund_amount:
              type: number
              description: >
                The amount that is being refunded to the payer. This helps in
                tracking the value being returned.
              example: 0.1
            request_date:
              type: string
              format: date-time
              description: >
                The date and time when the refund was requested. This is
                important for record-keeping and verification purposes.
              example: '2024-12-31T23:59:59Z'
            reason:
              type: string
              description: >
                The reason provided for the refund, giving context to the
                request. This can include reasons such as product issues or
                cancellation.
              example: Broken product
        sender_details:
          type: object
          description: >
            Information about the sender of the payment, including reference
            details, bank information, and account holder's name.
          properties:
            reference:
              type: string
              description: >
                A reference provided by the sender for the transaction, used for
                identifying the purpose or source of the funds.
              example: SenderRef123
            description:
              type: string
              description: >
                Additional description provided by the sender, adding context to
                the payment.
              example: Payment from John Doe
            bsb:
              type: string
              description: >
                The Bank-State-Branch (BSB) number of the sender, which is used
                to identify the bank and branch involved in the transaction.
              example: '123456'
            account_number:
              type: string
              description: >
                The account number from which the payment is being sent, helping
                in tracing the source of the payment.
              example: '987654321'
            account_name:
              type: string
              description: >
                The name on the account from which the payment is being sent.
                This helps in verifying the identity of the sender.
              example: John Doe
        short_invoice_url:
          type: string
          format: uri
          description: >
            A shortened version of the invoice URL for convenience. This can be
            used to quickly share or access the invoice details. Note: this
            field is deprecated.
          example: https://short.example.com/invoice/123456
          deprecated: true
        invoice_url:
          type: string
          format: uri
          description: >
            The full URL of the invoice related to the payment request. This
            provides access to the detailed invoice online. Note: this field is
            deprecated.
          example: https://example.com/invoice/123456
          deprecated: true
        metadata:
          type: object
          description: Optional custom metadata to attach to the transaction.
          example:
            custom_note: Priority customer
  securitySchemes:
    app-id:
      type: apiKey
      in: header
      name: app-id
      description: |
        A unique identifier assigned to each application.
    secret-key:
      type: apiKey
      in: header
      name: secret-key
      description: |
        A secure token associated with the `app-id`.

````

## Related topics

- [Accept Instant Payments with AUD PayID](/developer-reference/api-use-cases/accept-instant-payments-with-aud-payid.md)
- [Get Static PayID List](/api/aud-payid/get-static-payid-list.md)
- [Create One-Time PayID](/api/aud-payid/create-one-time-payid.md)
