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

# Get a payment receipt

> Returns the receipt of a successful payment. Available for payments with `paymentVersion: 2`. With `teamID`, this needs the `billing.manage` permission.



## OpenAPI

````yaml /spec/platform-billing.yaml get /v1/payments/{paymentID}/billing-receipt
openapi: 3.0.1
info:
  title: Billing & Subscription
  version: 1.0.0
  description: |
    Check your balance and costs, add credit, download invoices and receipts,
    manage your subscription plan, and apply discount codes.

    All amounts are in Toman (IRT).

    With `teamID`, these endpoints work on the team's billing. Most of them
    need the `billing.manage` permission in the team; the description of each
    endpoint says which permission it needs.
servers:
  - url: https://api.liara.ir
security:
  - bearerAuth: []
tags:
  - name: Balance & Usage
    description: Balance, current costs and service counts.
  - name: Payments
    description: Add credit and list past payments.
  - name: Invoices & Receipts
    description: Monthly billing invoices and payment receipts.
  - name: Subscription
    description: View and change the account's subscription plan.
  - name: Discount Codes
    description: Check and apply discount codes.
paths:
  /v1/payments/{paymentID}/billing-receipt:
    get:
      tags:
        - Invoices & Receipts
      summary: Get a payment receipt
      description: >-
        Returns the receipt of a successful payment. Available for payments with
        `paymentVersion: 2`. With `teamID`, this needs the `billing.manage`
        permission.
      operationId: getBillingReceipt
      parameters:
        - $ref: '#/components/parameters/TeamID'
        - $ref: '#/components/parameters/PaymentID'
      responses:
        '200':
          description: The receipt.
          content:
            application/json:
              schema:
                type: object
                properties:
                  billingReceipt:
                    type: object
                    properties:
                      _id:
                        type: string
                      payment:
                        type: object
                        properties:
                          _id:
                            type: string
                          amount:
                            type: number
                          status:
                            type: string
                          gateway:
                            type: object
                            properties:
                              name:
                                type: string
                                description: Display name of the payment gateway.
                          traceNumber:
                            type: string
                            description: The gateway's reference number for the payment.
                          created_at:
                            type: string
                            format: date-time
                          actor:
                            type: object
                            description: The person who made the payment.
                            properties:
                              fullname:
                                type: string
                              email:
                                type: string
                          paymentVersion:
                            type: integer
                      vendorInfo:
                        type: object
                        description: Seller details.
                      customerInfo:
                        type: object
                        description: Your billing contact details at the time of payment.
                      createdAt:
                        type: string
                        format: date-time
                      updatedAt:
                        type: string
                        format: date-time
              example:
                billingReceipt:
                  _id: '000000000000000000000080'
                  payment:
                    _id: '000000000000000000000060'
                    amount: 1000000
                    status: SUCCEED
                    gateway:
                      name: <gateway-name>
                    traceNumber: <trace-number>
                    created_at: '2026-01-01T08:00:00.000Z'
                    paymentVersion: 2
                  vendorInfo:
                    name: <vendor-name>
                  customerInfo:
                    firstName: نام
                    lastName: نام خانوادگی
                    phone: '09120000000'
                  createdAt: '2026-01-01T08:00:10.000Z'
                  updatedAt: '2026-01-01T08:00:10.000Z'
        '400':
          description: >-
            The ID is invalid, or the payment isn't a `paymentVersion: 2`
            payment.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
              example:
                statusCode: 400
                error: Bad Request
                message: invalid_payment_version
                data: null
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/TeamForbidden'
        '404':
          description: >-
            The payment doesn't exist, or it has no receipt (for example,
            because it failed).
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
              example:
                statusCode: 404
                error: Not Found
                message: no_billing_receipt
                data: null
components:
  parameters:
    TeamID:
      name: teamID
      in: query
      required: false
      description: >-
        Run the request in the context of a team you belong to, instead of your
        personal account.
      schema:
        $ref: '#/components/schemas/ObjectID'
      example: '000000000000000000000002'
    PaymentID:
      name: paymentID
      in: path
      required: true
      description: The payment's `_id` from `GET /v1/payments`.
      schema:
        $ref: '#/components/schemas/ObjectID'
  schemas:
    Error:
      type: object
      description: Standard error body.
      properties:
        statusCode:
          type: integer
        error:
          type: string
          description: HTTP status text.
        message:
          type: string
          description: What went wrong.
        data:
          type: object
          nullable: true
          description: >-
            Extra details. When present, `code` is a stable, machine-readable
            error code.
          properties:
            code:
              type: string
    ObjectID:
      type: string
      pattern: ^[0-9a-fA-F]{24}$
      description: 24-character hexadecimal ID.
    AuthError:
      type: object
      description: Error body returned when the API token is rejected.
      properties:
        error:
          type: string
  responses:
    Unauthorized:
      description: The API token is missing, invalid or expired.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/AuthError'
          example:
            error: Unauthorized.
    TeamForbidden:
      description: >-
        With `teamID`: you aren't a member of the team (`team_not_found`), or
        your role doesn't have the required permission (`no_permission`).
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          examples:
            teamNotFound:
              summary: Not a team member
              value:
                statusCode: 403
                error: Forbidden
                message: Team not found
                data:
                  code: team_not_found
            noPermission:
              summary: Missing permission
              value:
                statusCode: 403
                error: Forbidden
                message: You do not have permission to access this resource.
                data:
                  code: no_permission
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: 'Send your API token as `Authorization: Bearer <api-token>`.'

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.