Recharge Orders API

Orders generated from charges, plus one-time and recurring order management.

OpenAPI Specification

recharge-payments-orders-api-openapi.yml Raw ↑
openapi: 3.0.3
info:
  title: Recharge Addresses Orders API
  description: The Recharge API is a REST API (with a few RPC-style action endpoints) for building and operating subscription and recurring-billing commerce on top of Recharge. It has predictable, resource-oriented URLs, accepts JSON-encoded request bodies, returns JSON-encoded responses, and uses standard HTTP status codes and verbs. All requests are made over HTTPS to https://api.rechargeapps.com and authenticated with a store API token passed in the X-Recharge-Access-Token header. The API is versioned via the X-Recharge-Version header; supported versions are 2021-11 (recommended) and 2021-01. This document grounds a representative subset of the public surface - Subscriptions, Customers, Orders, Charges, Products, Addresses, Payment Methods, Onetimes, Discounts, and Webhook endpoints. See developer.rechargepayments.com for the complete reference.
  version: 2021-11
  contact:
    name: Recharge
    url: https://developer.rechargepayments.com
  termsOfService: https://getrecharge.com/legal
servers:
- url: https://api.rechargeapps.com
  description: Recharge API
security:
- apiToken: []
tags:
- name: Orders
  description: Orders generated from charges, plus one-time and recurring order management.
paths:
  /orders:
    get:
      operationId: listOrders
      tags:
      - Orders
      summary: List orders
      parameters:
      - $ref: '#/components/parameters/Limit'
      - $ref: '#/components/parameters/PageCursor'
      responses:
        '200':
          description: A list of orders.
          content:
            application/json:
              schema:
                type: object
                properties:
                  orders:
                    type: array
                    items:
                      $ref: '#/components/schemas/Order'
  /orders/{id}:
    parameters:
    - $ref: '#/components/parameters/Id'
    get:
      operationId: getOrder
      tags:
      - Orders
      summary: Retrieve an order
      responses:
        '200':
          description: The requested order.
          content:
            application/json:
              schema:
                type: object
                properties:
                  order:
                    $ref: '#/components/schemas/Order'
    put:
      operationId: updateOrder
      tags:
      - Orders
      summary: Update an order
      responses:
        '200':
          description: The updated order.
    delete:
      operationId: deleteOrder
      tags:
      - Orders
      summary: Delete an order
      responses:
        '204':
          description: The order was deleted.
  /orders/{id}/clone:
    parameters:
    - $ref: '#/components/parameters/Id'
    post:
      operationId: cloneOrder
      tags:
      - Orders
      summary: Clone an order
      responses:
        '201':
          description: The cloned order.
  /orders/{id}/delay:
    parameters:
    - $ref: '#/components/parameters/Id'
    post:
      operationId: delayOrder
      tags:
      - Orders
      summary: Delay an order
      responses:
        '200':
          description: The delayed order.
components:
  parameters:
    Id:
      name: id
      in: path
      required: true
      description: The unique identifier of the resource.
      schema:
        type: integer
        format: int64
    PageCursor:
      name: page_info
      in: query
      required: false
      description: Cursor for cursor-based pagination, taken from the Link response header.
      schema:
        type: string
    Limit:
      name: limit
      in: query
      required: false
      description: The maximum number of results per page (default 50, max 250).
      schema:
        type: integer
        default: 50
        maximum: 250
  schemas:
    Order:
      type: object
      properties:
        id:
          type: integer
          format: int64
        customer_id:
          type: integer
          format: int64
        charge_id:
          type: integer
          format: int64
        status:
          type: string
        total_price:
          type: string
        scheduled_at:
          type: string
          format: date
        created_at:
          type: string
          format: date-time
  securitySchemes:
    apiToken:
      type: apiKey
      in: header
      name: X-Recharge-Access-Token
      description: Store API token generated in the Recharge merchant portal under Apps and integrations.