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

# Add Paypal Credits

> Creates a PayPal payment link to purchase custom credits using a specified PayPal account.



## OpenAPI

````yaml POST /add_paypal_credits/
openapi: 3.1.0
info:
  title: CloserX.ai API
  description: >-
    The CloserX.ai API provides programmatic access to manage AI-powered calling
    operations, including agent creation, campaign management, contact handling,
    telephony integration, and more. This API enables seamless automation and
    integration with CRM systems, telephony providers, and other third-party
    services for enhanced client communication and business operations.
  license:
    name: MIT
  version: 1.0.0
servers:
  - url: https://app.closerx.ai/api
security:
  - api_key: []
paths:
  /add_paypal_credits/:
    post:
      summary: Add PayPal Credits
      description: >-
        Creates a PayPal payment link to purchase custom credits using a
        specified PayPal account.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/AddPaypalCreditsRequest'
      responses:
        '200':
          description: PayPal payment link successfully created
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AddPaypalCreditsResponse'
        '400':
          description: Invalid request parameters or PayPal error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
components:
  schemas:
    AddPaypalCreditsRequest:
      type: object
      required:
        - amount
        - currency
        - user_id
      properties:
        amount:
          type: number
          format: float
          example: 25
          description: The amount of credits (in currency) the user wants to purchase.
        currency:
          type: string
          example: USD
          description: The currency in which the payment will be made.
        user_id:
          type: string
          example: user_12345
          description: The ID of the user purchasing the credits.
    AddPaypalCreditsResponse:
      type: object
      properties:
        payment_link:
          type: string
          format: uri
          example: https://xyz.com/abc?token=123
          description: The PayPal payment link the user should be redirected to.
        status:
          type: string
          example: pending
          description: The status of the payment link generation.
    Error:
      required:
        - success
        - message
        - data
      type: object
      properties:
        success:
          type: boolean
        message:
          type: string
        data:
          type: object
  securitySchemes:
    api_key:
      type: apiKey
      in: header
      name: api_key

````