SimpleTech Labs
WebsiteConsoleAPITwitterTelegram ChannelTelagram Chat
SimplePay
SimplePay
  • Introduction
    • Overview
    • Core concepts
      • Transparency
      • Non-Custodial
      • Direct payments
      • Lowest Fees
    • Protocol
    • Security
      • Collected data
  • GETTING STARTED
    • Create an App
    • Setup Client
      • Widget
    • Setup Server
      • Webhooks
    • No-Code
      • Web and Telegram Store
  • Javascript SDK
    • Introduction
    • Services
      • Cryptocurrency
      • Currency
      • Invoice
  • Components
    • Payment Widget
  • Simple ID
    • Auth.js integration Guide
  • API Documentation
    • Overview
    • Apps
      • Get App Info
      • Dev Mode
    • Wallets
    • Assets
      • Fiat Currency
      • Cryptocurrency
    • Products
    • Invoices
      • Methods
    • Transactions
      • Page 1
    • Billing
  • Referral Program
    • 💰Referral Program Basics
  • Legal
    • 📄Terms of Use
    • 🔏Privacy Policy
    • 🍪Cookies
Powered by GitBook
On this page

Was this helpful?

  1. API Documentation

Invoices

Invoice API Methods and Refference

PreviousProductsNextMethods

Last updated 5 months ago

Was this helpful?

Parameters

Invoice ID

Id is unique identifier that represents Invoice object for quering details of specific invoice

Parent ID

Parent id points to relative invoice that was parent in the chain of invoices. Sometimes we need to make several tranches, thats how we can bind several invoices into chain.

Client ID

Client id is a identifier of your customer. Its represents a unique UUID v4 that pointers to specific user or customer to whom you direct your invoice. If you have account managment system, you may input user's id in your DB as client_id to easy bind your user's payments separate from others.

Total

Amount of funds needed to complete invoice. It's depends on choosen currency in invoice body while creating, to calculate current rates and amount that left to pay.

Paid

Represents amount of funds to current invoice currency that was already submited as paid in one or several transactions.

Type

Type of invoice. For now we support "payment" only.

Status

Status of the invoice represents it's current stage. It may be ACTIVE / SUCCESS / CANCELED.

You cannot cancel invoices with SUCCESS statuses.

Created At

Represents timestamp when invoice was created.

Updated At

Represents timestamp of new transactions appears in the Invoice or invoice status changes.

Products

See products API section

Payload

See payload section

API Refference

Get Invoices List

get

Retrieves a list of all invoices associated with the authenticated merchant. Results are paginated and can be filtered by status.

Query parameters
vinteger · enumRequired

API version, must be 2

Possible values:
Responses
200
List of invoices successfully retrieved
application/json
401
Unauthorized - Invalid or missing authentication token
get
GET /invoice HTTP/1.1
Host: api.simplepay.ai
Accept: */*
[
  {
    "id": "123e4567-e89b-12d3-a456-426614174000",
    "parent_id": "123e4567-e89b-12d3-a456-426614174000",
    "client_id": "123e4567-e89b-12d3-a456-426614174000",
    "total": "text",
    "paid": "text",
    "type": "payment",
    "status": "active",
    "payload": {},
    "created_at": "2025-05-29T02:27:04.723Z",
    "updated_at": "2025-05-29T02:27:04.723Z",
    "currency": {
      "id": "123e4567-e89b-12d3-a456-426614174000",
      "symbol": "text",
      "code": 1
    },
    "products": [
      {
        "count": 1,
        "product": {
          "id": "123e4567-e89b-12d3-a456-426614174000",
          "name": "text",
          "description": "text",
          "image": "https://example.com",
          "created_at": "2025-05-29T02:27:04.723Z",
          "updated_at": "2025-05-29T02:27:04.723Z",
          "prices": [
            {
              "price": 1,
              "currency": {
                "id": "123e4567-e89b-12d3-a456-426614174000",
                "symbol": "text",
                "code": 1
              }
            }
          ]
        }
      }
    ]
  }
]

Get Invoice Details

get

Retrieves detailed information about a specific invoice

Path parameters
idstring · uuidRequired

Invoice ID

Query parameters
vinteger · enumRequired

API version, must be 2

Possible values:
Responses
200
Invoice details successfully retrieved
application/json
401
Unauthorized - Invalid or missing authentication token
404
Invoice not found
get
GET /invoice/{id} HTTP/1.1
Host: api.simplepay.ai
Accept: */*
{
  "id": "123e4567-e89b-12d3-a456-426614174000",
  "parent_id": "123e4567-e89b-12d3-a456-426614174000",
  "client_id": "123e4567-e89b-12d3-a456-426614174000",
  "total": "text",
  "paid": "text",
  "type": "payment",
  "status": "active",
  "payload": {},
  "created_at": "2025-05-29T02:27:04.723Z",
  "updated_at": "2025-05-29T02:27:04.723Z",
  "currency": {
    "id": "123e4567-e89b-12d3-a456-426614174000",
    "symbol": "text",
    "code": 1
  },
  "products": [
    {
      "count": 1,
      "product": {
        "id": "123e4567-e89b-12d3-a456-426614174000",
        "name": "text",
        "description": "text",
        "image": "https://example.com",
        "created_at": "2025-05-29T02:27:04.723Z",
        "updated_at": "2025-05-29T02:27:04.723Z",
        "prices": [
          {
            "price": 1,
            "currency": {
              "id": "123e4567-e89b-12d3-a456-426614174000",
              "symbol": "text",
              "code": 1
            }
          }
        ]
      }
    }
  ]
}

Cancel Invoice

delete

Cancels an active invoice. Cancelled invoices cannot receive payments. Only active invoices can be cancelled.

Authorizations
Path parameters
idstring · uuidRequired

Invoice ID to cancel

Query parameters
vinteger · enumRequired

API version, must be 2

Possible values:
Responses
200
Invoice successfully cancelled
application/json
401
Unauthorized - Invalid or missing authentication token
404
Invoice not found
409
Invoice cannot be cancelled (wrong status)
delete
DELETE /invoice/{id} HTTP/1.1
Host: api.simplepay.ai
Authorization: Bearer JWT
Accept: */*
{
  "id": "123e4567-e89b-12d3-a456-426614174000",
  "parent_id": "123e4567-e89b-12d3-a456-426614174000",
  "client_id": "123e4567-e89b-12d3-a456-426614174000",
  "total": "text",
  "paid": "text",
  "type": "payment",
  "status": "active",
  "payload": {},
  "created_at": "2025-05-29T02:27:04.723Z",
  "updated_at": "2025-05-29T02:27:04.723Z",
  "currency": {
    "id": "123e4567-e89b-12d3-a456-426614174000",
    "symbol": "text",
    "code": 1
  },
  "products": [
    {
      "count": 1,
      "product": {
        "id": "123e4567-e89b-12d3-a456-426614174000",
        "name": "text",
        "description": "text",
        "image": "https://example.com",
        "created_at": "2025-05-29T02:27:04.723Z",
        "updated_at": "2025-05-29T02:27:04.723Z",
        "prices": [
          {
            "price": 1,
            "currency": {
              "id": "123e4567-e89b-12d3-a456-426614174000",
              "symbol": "text",
              "code": 1
            }
          }
        ]
      }
    }
  ]
}
  • Parameters
  • Invoice ID
  • Parent ID
  • Client ID
  • Total
  • Paid
  • Type
  • Status
  • Created At
  • Updated At
  • Products
  • Payload
  • API Refference
  • GETGet Invoices List
  • POSTCreate Invoice
  • GETGet Invoice Details
  • DELETECancel Invoice

Create Invoice

post

Creates a new invoice for specified amount and currency. The invoice can be associated with specific products.

Authorizations
Query parameters
vinteger · enumRequired

API version, must be 2

Possible values:
Body
app_idstring · uuidRequired

ID of the merchant application

typestring · enumOptional

Type of invoice, currently only 'payment' is supported

Possible values:
client_idstring · uuidRequired

ID of the client who needs to pay

currencystringRequired

Three-letter currency code (e.g., USD)

totalnumberRequired

Total amount to be paid

Responses
201
Invoice successfully created
application/json
400
Invalid request parameters
401
Unauthorized - Invalid or missing authentication token
post
POST /invoice HTTP/1.1
Host: api.simplepay.ai
Authorization: Bearer JWT
Content-Type: application/json
Accept: */*
Content-Length: 145

{
  "app_id": "123e4567-e89b-12d3-a456-426614174000",
  "type": "payment",
  "client_id": "123e4567-e89b-12d3-a456-426614174000",
  "currency": "text",
  "total": 1
}
{
  "id": "123e4567-e89b-12d3-a456-426614174000",
  "parent_id": "123e4567-e89b-12d3-a456-426614174000",
  "client_id": "123e4567-e89b-12d3-a456-426614174000",
  "total": "text",
  "paid": "text",
  "type": "payment",
  "status": "active",
  "payload": {},
  "created_at": "2025-05-29T02:27:04.723Z",
  "updated_at": "2025-05-29T02:27:04.723Z",
  "currency": {
    "id": "123e4567-e89b-12d3-a456-426614174000",
    "symbol": "text",
    "code": 1
  },
  "products": [
    {
      "count": 1,
      "product": {
        "id": "123e4567-e89b-12d3-a456-426614174000",
        "name": "text",
        "description": "text",
        "image": "https://example.com",
        "created_at": "2025-05-29T02:27:04.723Z",
        "updated_at": "2025-05-29T02:27:04.723Z",
        "prices": [
          {
            "price": 1,
            "currency": {
              "id": "123e4567-e89b-12d3-a456-426614174000",
              "symbol": "text",
              "code": 1
            }
          }
        ]
      }
    }
  ]
}