Moyasar Invoices API

Hosted invoices with a Moyasar-hosted checkout URL.

Operations 6

GET /invoices List invoices #
POST /invoices Create an invoice #
POST /invoices/bulk Bulk create invoices #
GET /invoices/{id} Fetch an invoice #
PUT /invoices/{id} Update an invoice #
DELETE /invoices/{id} Cancel an invoice #

Work with this as data

Every API here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for apis

7 MCP tools reach this
  • find_apisBrowse and filter every API in the catalog.
  • get_api_artifactsOne API's artifacts, grouped by type.
  • get_openapiThe primary OpenAPI for this API.
  • find_similar_apisAPIs that look like this one.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools →

Call it yourself

curl for this page
This API
curl "https://apis.io/api/v1/apis/moyasar-invoices-api"
All apis
curl "https://apis.io/api/v1/apis?limit=25"

Discovery needs no key. Ratings and market analysis are Pro.

Get an API key

Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. See our Privacy Policy and Terms.

A second provider on the same verified email joins the account you already have.

OpenAPI Specification

moyasar-invoices-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: Moyasar Invoices API
  description: Moyasar is a Saudi Arabian payment gateway.
  version: '1.0'
  contact:
    name: Moyasar
    url: https://moyasar.com
  license:
    name: Proprietary
    url: https://moyasar.com/en/terms/
servers:
- url: https://api.moyasar.com/v1
  description: Moyasar production API
security:
- basicAuth: []
tags:
- name: Invoices
  description: Hosted invoices with a Moyasar-hosted checkout URL.
paths:
  /invoices:
    get:
      operationId: listInvoices
      tags:
      - Invoices
      summary: List invoices
      description: Lists invoices on the account with pagination.
      parameters:
      - name: page
        in: query
        required: false
        schema:
          type: integer
          default: 1
      responses:
        '200':
          description: A paginated list of invoices.
          content:
            application/json:
              schema:
                type: object
                properties:
                  invoices:
                    type: array
                    items:
                      $ref: '#/components/schemas/Invoice'
                  meta:
                    $ref: '#/components/schemas/PaginationMeta'
        '401':
          $ref: '#/components/responses/Unauthorized'
    post:
      operationId: createInvoice
      tags:
      - Invoices
      summary: Create an invoice
      description: Creates a hosted invoice and returns a Moyasar-hosted checkout `url` to present to the payer.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/InvoiceInput'
      responses:
        '201':
          description: The created invoice.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Invoice'
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
  /invoices/bulk:
    post:
      operationId: createInvoicesBulk
      tags:
      - Invoices
      summary: Bulk create invoices
      description: Creates multiple invoices in a single request.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                invoices:
                  type: array
                  items:
                    $ref: '#/components/schemas/InvoiceInput'
      responses:
        '201':
          description: The created invoices.
          content:
            application/json:
              schema:
                type: object
                properties:
                  invoices:
                    type: array
                    items:
                      $ref: '#/components/schemas/Invoice'
        '401':
          $ref: '#/components/responses/Unauthorized'
  /invoices/{id}:
    parameters:
    - $ref: '#/components/parameters/InvoiceId'
    get:
      operationId: fetchInvoice
      tags:
      - Invoices
      summary: Fetch an invoice
      description: Retrieves a single invoice by its ID.
      responses:
        '200':
          description: The requested invoice.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Invoice'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '404':
          $ref: '#/components/responses/NotFound'
    put:
      operationId: updateInvoice
      tags:
      - Invoices
      summary: Update an invoice
      description: Updates an existing invoice.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/InvoiceInput'
      responses:
        '200':
          description: The updated invoice.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Invoice'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '404':
          $ref: '#/components/responses/NotFound'
    delete:
      operationId: cancelInvoice
      tags:
      - Invoices
      summary: Cancel an invoice
      description: Cancels an invoice so it can no longer be paid.
      responses:
        '200':
          description: The canceled invoice.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Invoice'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '404':
          $ref: '#/components/responses/NotFound'
components:
  schemas:
    Payment:
      type: object
      properties:
        id:
          type: string
          format: uuid
        status:
          type: string
          enum:
          - initiated
          - paid
          - authorized
          - failed
          - refunded
          - captured
          - voided
          - verified
        amount:
          type: integer
        fee:
          type: integer
        currency:
          type: string
        refunded:
          type: integer
        refunded_at:
          type:
          - string
          - 'null'
          format: date-time
        captured:
          type: integer
        captured_at:
          type:
          - string
          - 'null'
          format: date-time
        voided_at:
          type:
          - string
          - 'null'
          format: date-time
        amount_format:
          type: string
        description:
          type:
          - string
          - 'null'
        invoice_id:
          type:
          - string
          - 'null'
        ip:
          type:
          - string
          - 'null'
        callback_url:
          type:
          - string
          - 'null'
        created_at:
          type: string
          format: date-time
        updated_at:
          type: string
          format: date-time
        metadata:
          type:
          - object
          - 'null'
          additionalProperties: true
        source:
          type: object
          additionalProperties: true
      additionalProperties: true
    InvoiceInput:
      type: object
      required:
      - amount
      - currency
      - description
      properties:
        amount:
          type: integer
          description: Amount in the smallest currency unit (minimum 100).
        currency:
          type: string
          default: SAR
        description:
          type: string
        callback_url:
          type: string
          format: uri
        success_url:
          type: string
          format: uri
        back_url:
          type: string
          format: uri
        expired_at:
          type: string
          format: date-time
        metadata:
          type: object
          additionalProperties: true
    PaginationMeta:
      type: object
      properties:
        current_page:
          type: integer
        next_page:
          type:
          - integer
          - 'null'
        prev_page:
          type:
          - integer
          - 'null'
        total_pages:
          type: integer
        total_count:
          type: integer
    Invoice:
      type: object
      properties:
        id:
          type: string
          format: uuid
        status:
          type: string
          enum:
          - initiated
          - paid
          - failed
          - refunded
          - canceled
          - on_hold
          - expired
          - voided
        amount:
          type: integer
        amount_format:
          type: string
        currency:
          type: string
        description:
          type: string
        url:
          type: string
          format: uri
          description: Hosted checkout URL to present to the payer.
        expired_at:
          type:
          - string
          - 'null'
          format: date-time
        payments:
          type: array
          items:
            $ref: '#/components/schemas/Payment'
        created_at:
          type: string
          format: date-time
        updated_at:
          type: string
          format: date-time
        metadata:
          type:
          - object
          - 'null'
          additionalProperties: true
      additionalProperties: true
    Error:
      type: object
      properties:
        type:
          type: string
        message:
          type: string
        errors:
          type: object
          additionalProperties: true
  responses:
    NotFound:
      description: The requested resource was not found.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
    Unauthorized:
      description: Invalid or missing authorization credentials.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
    BadRequest:
      description: The request payload failed validation.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
  parameters:
    InvoiceId:
      name: id
      in: path
      required: true
      description: The invoice UUID.
      schema:
        type: string
        format: uuid
  securitySchemes:
    basicAuth:
      type: http
      scheme: basic
      description: HTTP Basic authentication. Pass your API key as the username and leave the password empty (e.g. `-u sk_test_123:`). Publishable keys (pk_test_ / pk_live_) may only create payments and tokens; secret keys (sk_test_ / sk_live_) authorize all operations.