# Get domains purchase payment link

## OpenAPI Specification

```yaml
openapi: 3.0.1
info:
  title: ''
  description: ''
  version: 1.0.0
paths:
  /v2/domains/buy:
    post:
      summary: Get domains purchase payment link
      deprecated: false
      description: >-
        Get the payment link for a list of domains or purchase domains via
        wallet.


        ### Request Body


        | Name        | Type    |
        Description                                                  |

        |-------------|---------|--------------------------------------------------------------|

        | `domainName` | `string` | The domain name that you want to
        purchase.                    |

        | `years`      | `number` (Optional) | The number of years you want to
        register the domain for. Default is 1. |

        | `useWallet`  | `boolean` | Set to `true` if you want to use wallet
        balance for the purchase. |


        ## Example Request


        ```json

        {
          "domains": [
            { "domainName": "example.com", "years": 1 },
            { "domainName": "example.io", "years": 1 }
          ],
          "useWallet": true,
          "enableDnsShield": true
        }
      tags:
        - domains
      parameters:
        - name: x-auth-zapmail
          in: header
          description: ''
          required: false
          example: ''
          schema:
            type: string
        - name: x-workspace-key
          in: header
          description: ''
          required: false
          example: ''
          schema:
            type: string
        - name: x-service-provider
          in: header
          description: ''
          required: false
          example: ''
          schema:
            type: string
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                domains:
                  type: array
                  items:
                    type: object
                    properties:
                      domainName:
                        type: string
                      years:
                        type: integer
                    required:
                      - domainName
                      - years
                    x-apidog-orders:
                      - domainName
                      - years
                useWallet:
                  type: boolean
                enableDnsShield:
                  type: boolean
              required:
                - domains
                - useWallet
                - enableDnsShield
              x-apidog-orders:
                - domains
                - useWallet
                - enableDnsShield
            example:
              domains:
                - domainName: example.com
                  years: 1
                - domainName: example.io
                  years: 1
              useWallet: true
              enableDnsShield: true
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
                  paymentLink:
                    type: string
                required:
                  - message
                  - paymentLink
                x-apidog-orders:
                  - message
                  - paymentLink
              example:
                message: Your payment Link is generated
                paymentLink: https://payment.example.com
          headers: {}
          x-apidog-name: Success
      security: []
      x-apidog-folder: domains
      x-apidog-status: released
      x-run-in-apidog: https://app.apidog.com/web/project/797058/apis/api-13521209-run
components:
  schemas: {}
  securitySchemes: {}
servers:
  - url: https://api.zapmail.ai/api
    description: Prod Env
security: []

```
