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

# Create A Subaccount

> This endpoint is used to create a subaccount. 

> **Notes:**
>
> 1. Please be advised that access to this API is available upon request. To initiate this process, kindly send an email to **support@payaza.africa**. You will be granted access once our team reviews and approves your request.
> 



## OpenAPI

````yaml /openapi.json post /payaza-account/api/v1/subaccounts/merchant
openapi: 3.0.1
info:
  title: Payaza Documentation
  version: 2.0.0
  description: >-
    API reference for processing payments using Card, Bank Transfer, USSD, and
    QR Code methods.
servers:
  - url: https://api.payaza.africa/live
security:
  - ApiKeyAuth: []
  - TenantID: []
  - ProductID: []
tags:
  - name: Transfers
    description: >-
      Transfers are transactions made from your Payaza account to beneficiaries.
      Merchants can instantly transfer funds from their available balance. For
      every transfer, you need to specify the amount and the beneficiary’s
      details. You become eligible to make transfers after you have been
      verified. (you sign up, finish account activation and KYC verification).
  - name: Payaza Account
    description: >-
      This is our internal account that can be used to make payouts to other
      bank accounts, in single or in bulk. The Payaza account can also be used
      to receive settlements. It can also be used to track the transfer status
      of your transactions and check your balance instantly
  - name: Sub Accounts
    description: >-
      This enables you to establish Sub Payaza accounts for your customers. Each
      sub-account comes with an assigned static virtual account, facilitating
      direct funding for individual accounts. Furthermore, the Main Payaza
      account can directly initiate funding for each sub-account. These
      sub-accounts serve the purpose of managing unique account positions or
      balances and facilitating disbursements from these positions to specified
      beneficiaries.
  - name: EUR Accounts
    description: >-
      This endpoints enable you to create EUR subaccounts which can be used to
      make transfers as required .
  - name: Apple Pay and Google Pay
    description: >-
      Apple Pay and Google Pay give your customers a fast, familiar, and secure
      way to complete payments. Our APIs provide a gateway to provide these
      services to your users for a smooth payment experience.
  - name: Virtual Accounts
    description: >-
      Virtual Accounts are bank accounts that are created for a specific purpose
      and last for specified durations. Virtual accounts are issued by Payaza’s
      partner banks. Our virtual account APIs can be used to create virtual
      accounts and perform other tasks relevant to virtual accounts. Virtual
      accounts are created to foster easy payment collections for your business
      and platform. 

      Static/Reserved Account: This virtual account is created by the merchant
      and remains valid indefinitely. It can be used multiple times and does not
      expire. 

      Dynamic Account: This virtual account is generated for a specific
      transaction or purpose. Please note that dynamic virtual account remains
      valid for a temporary period of time or until a payment of the specified
      amount is received. Upon expiry, a merchant can generate another one for a
      different purpose.
  - name: Card Collection
    description: >-
      The Card Collection APIs can be used to make card transactions, refund
      transactions that have been performed, check the status of a transaction
      and so much more.
  - name: Card Tokenisation
    description: >-
      The Card Tokenisation APIs are used to create card tokens, charge cards
      using tokens, retrieve all tokens created by a merchant account and
      deleting any card token as desired.
  - name: Refunds And Chargebacks
    description: >-
      The Refunds and Chargeback APIs are used to initiate refunds, view your
      refund and chargeback history and so much more.
  - name: Branches
    description: >-
      The Refunds and Chargeback APIs are used to initiate refunds, view your
      refund and chargeback history and so much more.
  - name: Auth-Capture-Void
    description: >-
      The Auth-Capture-Void APIs provide a two-phase payment process where
      transactions are first authorized, then captured or voided. This allows
      merchants to hold funds and complete the transaction in the future.
  - name: Momo and ZAR Collections
    description: APIs for MoMo, ZAR and XOF collections.
  - name: Check Transaction Status(Merchant Reference)
    description: >-
      This endpoint is used to check the transaction status of a transaction
      using the Merchant Reference..
paths:
  /payaza-account/api/v1/subaccounts/merchant:
    post:
      tags:
        - Sub Accounts
      summary: Create A Subaccount
      description: >-
        This endpoint is used to create a subaccount. 


        > **Notes:**

        >

        > 1. Please be advised that access to this API is available upon
        request. To initiate this process, kindly send an email to
        **support@payaza.africa**. You will be granted access once our team
        reviews and approves your request.

        > 
      requestBody:
        required: true
        content:
          application/json:
            schema:
              oneOf:
                - $ref: '#/components/schemas/createASubAccountRequest'
            examples:
              name_enquiry:
                summary: Create A Subaccount
                value:
                  mainAccountPayazaReference: '100000000'
                  name: Test Sub Account
                  currency: NGN
                  country: NGA
      responses:
        '200':
          description: Subaccount creation successful
          content:
            application/json:
              schema:
                oneOf:
                  - $ref: '#/components/schemas/createASubAccountResponse'
              examples:
                transfer:
                  summary: Create A Subaccount
                  value:
                    message: New account created
                    status: true
                    data:
                      - id: 1110
                        accountName: Test Sub Account
                        accountStatus: ACTIVE
                        accountBalance: 0
                        escrowBalance: 0
                        businessFk: 11407
                        currency: NGN
                        owner: PAYAZA
                        country: NGA
                        creationReference: DC625576B5BF426A94CB6B1D868C0
                        actionStatus: ACTIVE
                        payazaAccountReference: '2010000120'
                        pnc: false
                        pnd: false
                        virtualAccounts:
                          - accountNumber: '9977719429'
                            accountName: MERCHANT(Test Sub Account)
                            bankCode: '000023'
        '400':
          description: Invalid request
      security:
        - ApiKeyAuth: []
          TenantID: []
components:
  schemas:
    createASubAccountRequest:
      title: Create A Sub Account request
      type: object
      required:
        - mainAccountPayazaReference
        - name
        - currency
        - country
      properties:
        mainAccountPayazaReference:
          type: string
          description: The account reference of the main Payaza account.
          example: '100000000'
        name:
          type: string
          description: The name of the sub-account being created.
          example: Test Sub Account
        currency:
          type: string
          description: The currency code.
          example: NGN
        country:
          type: string
          description: The country code in ISO 3166-1 alpha-3 format (e.g., NGA).
          example: NGA
    createASubAccountResponse:
      title: Create A Sub Account Response
      type: object
      properties:
        message:
          type: string
          description: Response message.
          example: New account created
        status:
          type: boolean
          description: Request status.
          example: true
        data:
          type: array
          description: List containing the newly created account details.
          items:
            type: object
            properties:
              id:
                type: integer
                description: Unique identifier for the sub-account.
                example: 1110
              accountName:
                type: string
                description: Name of the sub-account.
                example: Test Sub Account
              accountStatus:
                type: string
                description: Current status of the account (e.g., ACTIVE).
                example: ACTIVE
              accountBalance:
                type: number
                format: double
                description: Current available balance.
                example: 0
              escrowBalance:
                type: number
                format: double
                description: Balance currently in escrow.
                example: 0
              businessFk:
                type: integer
                description: Foreign key linking to the main business entity.
                example: 11407
              currency:
                type: string
                description: Currency code.
                example: NGN
              owner:
                type: string
                description: Owner of the account.
                example: PAYAZA
              country:
                type: string
                description: Country code.
                example: NGA
              creationReference:
                type: string
                description: Unique reference generated upon creation.
                example: DC625576B5BF426A94CB6B1D868C0
              actionStatus:
                type: string
                description: Action status.
                example: ACTIVE
              payazaAccountReference:
                type: string
                description: The Payaza reference ID for this sub-account.
                example: '2010000120'
              pnc:
                type: boolean
                description: Post No Credit status.
                example: false
              pnd:
                type: boolean
                description: Post No Debit status.
                example: false
              virtualAccounts:
                type: array
                description: List of virtual accounts attached to this sub-account.
                items:
                  type: object
                  properties:
                    accountNumber:
                      type: string
                      description: Virtual account number.
                      example: '9977719429'
                    accountName:
                      type: string
                      description: Name attached to the virtual account.
                      example: MERCHANT(Test Sub Account)
                    bankCode:
                      type: string
                      description: Bank code for the virtual account.
                      example: '000023'
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: Authorization
      description: Payaza {{Public API Key in Base 64}}
    TenantID:
      type: apiKey
      in: header
      name: X-TenantID
      description: live or test
    ProductID:
      type: apiKey
      in: header
      name: X-ProductID
      description: 'default value is ‟app” '

````