Fungies.io Help Center
  • 🙌Getting Started
  • Customize your online store
    • General Settings
    • Header
    • Footer
    • Add New Page
    • Add Page Section
    • Text Section
    • Image Section
    • Video Section
    • Gallery Section
    • Points Section
    • Slider Section
    • Recent Products Section
    • Custom Style
  • Add Subscription Product
  • Add Digital Downloads
  • Add Game Keys
  • Add Mobile Game Assets
  • Variants of the product
  • 🛠️Workspace Settings
    • Connect your Stripe account
    • Sandbox Mode
    • Team Management
  • 🧮Store Settings
    • Publish your store
    • Previewing The Store
    • Edit Explore / Search Page (Built-in)
    • Edit Product Page (Built-in)
      • Customize Review Categories
    • Set up Custom Domain
      • Migrating your domain to Cloudflare
  • Tax-inclusive Pricing
  • 🤑Getting Paid
    • Test Payments
    • Checkout Choice
      • Hosted Checkout
      • Overlay Checkout
      • Embedded Checkout
    • Global Availability
    • Customer Payment Methods
      • PayPal Settings
    • Billing Details
    • Payouts
    • Editing Statement Descriptor
    • Transactions Reports
    • Example React checkout
  • 👨‍💻FOR SAAS DEVELOPERS
    • Hosted Checkout (more payment methods)
    • Editing and Pausing Subscriptions
      • Downgrading / Upgrading Subscriptions
    • Creating Plans
    • Free Trials and Custom Intervals
    • Redirecting After Purchase
    • Using Webhooks
    • Types of Webhooks
      • Payment Success
      • Payment Refunded
      • Payment Failed
      • Subscription Created
      • Subscription Interval
      • Subscription Updated
      • Subscription Cancelled
    • Getting Started with the API
    • Orders APIs
      • Managing Orders through API
      • Orders List
      • Cancel Order
      • Update Order
    • Managing Subscriptions through API
    • Managing and Creating Users through API
    • Customizing Subscription Confirmation Page
    • Using CustomFields to parse data from your Software / App
      • Parse e-mails from your Software directly to checkout URL
  • Additional charges on top of Subscriptions
  • Upgrading or Downgrading Plans with API
  • Using Fungies.js npm package
    • Next.js 15 integration guide
  • 🎮For Game Developers
    • Orders
    • Platform Fees
    • Users list
    • Integrating with Game's Back-end
    • Customizing Purchase Confirmation Page
    • Webhooks
  • 💲Selling
    • Payment history
    • Selling FREE products
    • Managing Game Keys
    • Managing Game Assets
    • Pricing
    • Fulfillment of Orders
    • Prohibited Business and Products
    • Invoices and Receipts
    • Google Merchant Center XML Feed
    • SEO Sitemap
  • 🚀Marketing
    • Integrations
      • Google Tag Manager
      • Google Merchant Center
      • Trustpilot
      • Google Analytics (via Google Tag Manager)
    • SEO
    • Discount Codes
    • Pricing Localization
    • Language Localization
    • E-mail Marketing
  • 💰Billing
    • Plans and Usage
    • Invoices
    • Payment Methods
  • 🤩For End-Users
    • How to manage your Subscription?
    • How to buy a Game Key?
    • How to buy a Mobile Game Asset?
    • Getting your product
    • Steam key activation
    • Searching for games
    • Product details page
    • Order details
    • Refunds and chargebacks
  • 🗃️Other
    • FAQ
    • Roadmap
    • Product Changelog
  • 📃Legal
    • General Terms of Use
    • SaaS Terms of Use
    • Privacy Policy
    • Cookies and Tracking
Powered by GitBook
On this page
  • Getting Started with APIs
  • /orders/list (List All Orders)
  • /orders/orderId (Retrieve Order Details)
  • /orders/{orderId}/update (Update an Order)
  • /orders/{orderId}/cancel (Cancel an Order)
  1. FOR SAAS DEVELOPERS
  2. Orders APIs

Managing Orders through API

This article is about learning how to effectively manage orders using the Fungies API. We will walk you through the essential API endpoints, including how to retrieve, update, and cancel orders

Welcome to the Fungies API documentation! This guide will walk you through managing orders using the Fungies API. You'll learn how to list orders, retrieve specific order details, update an order, and cancel an order.

After generating the API key and write-API key you can immediately start making requests to the Fungies Orders API endpoints

Getting Started with APIs

A collection of endpoints that allow you to manage and interact with orders, including retrieving details, updating, and cancelling orders, to ensure seamless order management and processing.

/orders/list (List All Orders)

The /orders/list endpoint is used to retrieve a list of all orders from the Fungies.io platform. It allows developers to access details of every order placed within the system, providing an overview of order activities.

Note: This endpoint requires API key for authentication.

This is a GET API endpoint that accepts several parameters to filter the results:

  • status: Specifies the current status of the orders. Possible values include PENDING, PAID, FAILED, UNPAID, CANCELLED, REFUNDED, PARTIALLY_REFUNDED, and EXPIRED.

  • userId: Filters orders by the user ID of the customer.

  • createdAfter: Returns orders created after a specified date.

  • createdBefore: Returns orders created before a specified date.

  • page: Specifies which page of the order list you want to retrieve.

  • limit: Defines the maximum number of orders to return per page.

Successful Response:

When the request is successful, you will receive a response like this:

{
  "status": "success",
  "data": {
    "orders": [
      {
        "id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
        "status": "PENDING",
        "orderNumber": "string",
        "value": -1.7976931348623157e+308,
        "fee": -1.7976931348623157e+308,
        "tax": -1.7976931348623157e+308,
        "currency": "AFN",
        "createdAt": "string",
        "formatted": {
          "orderNumber": "string",
          "subtotal": "string",
          "totalValue": "string",
          "totalDiscount": "string",
          "tax": "string"
        }
      }
    ],
    "count": -1.7976931348623157e+308
  }
}

Error Response:

If the request fails, you will receive an error response like this:

{
  "status": "error",
  "error": {
    "message": "Sample error message"
  }
}

/orders/orderId (Retrieve Order Details)

The GET /orders/{orderId} endpoint retrieves detailed information about a specific order based on the unique orderId. This endpoint is essential for accessing comprehensive details about an individual order, including its status, items, payment information, and customer details.

Note: This endpoint requires API key for authentication.

This is a GET API endpoint that accepts a single parameter to filter the results:

  • orderId: The orderId parameter is a unique identifier for a specific order in the Fungies.io platform.

Successful Response:

When the request is successful, you will receive a response like this:

{
  "status": "success",
  "data": {
    "order": {
      "id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
      "status": "PENDING",
      "orderNumber": "string",
      "value": -1.7976931348623157e+308,
      "fee": -1.7976931348623157e+308,
      "tax": -1.7976931348623157e+308,
      "currency": "AFN",
      "createdAt": "string",
      "formatted": {
        "orderNumber": "string",
        "subtotal": "string",
        "totalValue": "string",
        "totalDiscount": "string",
        "tax": "string"
      }
    }
  }
}

Error Response:

If the request fails, you will receive an error response like this:

{
  "status": "error",
  "error": {
    "message": "Sample error message"
  }
}

/orders/{orderId}/update (Update an Order)

The PATCH /orders/{orderId}/update endpoint allows you to update the details of a specific order identified by the orderId. This endpoint is useful for modifying order attributes such as status, shipping information, or any other modifiable fields after creating the order.

Note: This endpoint requires API key and write-API key (both) for authentication at the same time.

The /orders/{orderId}/update endpoint allows users to update an order by sending a request with the following values in the request body:

  • status: The current status of the order.

  • value: The total value of the order.

  • fee: Any fees associated with the order.

  • tax: The amount of tax applied to the order.

  • currency: The currency used for the order.

Request Body:

{
  "status": "PENDING",
  "value": -1.7976931348623157e+308,
  "fee": -1.7976931348623157e+308,
  "tax": -1.7976931348623157e+308,
  "currency": "AFN"
}

Successful Response:

When the request is successful, you will receive a response like this:

{
  "status": "success",
  "data": {
    "order": {
      "id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
      "status": "PENDING",
      "orderNumber": "string",
      "value": -1.7976931348623157e+308,
      "fee": -1.7976931348623157e+308,
      "tax": -1.7976931348623157e+308,
      "currency": "AFN",
      "createdAt": "string",
      "formatted": {
        "orderNumber": "string",
        "subtotal": "string",
        "totalValue": "string",
        "totalDiscount": "string",
        "tax": "string"
      }
    }
  }
}

Error Response:

If the request fails, you will receive an error response like this:

{
  "status": "error",
  "error": {
    "message": "Sample error message"
  }
}

/orders/{orderId}/cancel (Cancel an Order)

The PATCH /orders/{orderId}/cancel endpoint is used to cancel a specific order identified by the orderId. This endpoint is typically used when an order needs to be stopped before it is fulfilled or processed. Cancelling an order will update its status to indicate that it has been cancelled.

Note: This endpoint requires API key and write-API key (both) for authentication at the same time.

This is a PATCH API endpoint that accepts a single parameter to cancel/delete the results:

orderId: The orderId parameter is a unique identifier for a specific order in the Fungies.io platform.

The /orders/{orderId}/cancel endpoint does not require a request body; it uses an empty request body.

Successful Response:

When the request is successful, you will receive a response like this:

{
  "status": "success",
  "data": {
    "order": {
      "id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
      "status": "PENDING",
      "orderNumber": "string",
      "value": -1.7976931348623157e+308,
      "fee": -1.7976931348623157e+308,
      "tax": -1.7976931348623157e+308,
      "currency": "AFN",
      "createdAt": "string",
      "formatted": {
        "orderNumber": "string",
        "subtotal": "string",
        "totalValue": "string",
        "totalDiscount": "string",
        "tax": "string"
      }
    }
  }
}

Error Response:

If the request fails, you will receive an error response like this:

{
  "status": "error",
  "error": {
    "message": "Sample error message"
  }
}
PreviousOrders APIsNextOrders List

Last updated 8 months ago

👨‍💻