Skip to content
Navigation

Records an order paid outside the store, granting what it bought.

POST
https://api.sherpo.io/merchant/v1/stores/{store}/orders

Authorization

  • bearer
    HTTP
    required

Path parameters

  • store
    string
    required

    The store's id.

Request body JSON required

  • customer
    required

    By id, or by email: whoever the address reaches, else its invited customer.

    One of the following:

    • object
    • object
  • currency
    string
    required
    maxLength: 3 · minLength: 3 · pattern: ^[A-Za-z]{3}$
  • items
    array of
    object
    required
    • product
      required

      One of the following:

      • object
      • object
    • amount
      integer
      required
      minimum: 0
    • tier
      optional

      The tier sold; the price's own when a price is named.

      One of the following:

      • object
      • null
    • price
      optional

      One of the following:

      • object
      • null
    • quantity
      optional
      integer
      maximum: 1000 · minimum: 1
    • discount
      optional
      integer

      At most the line's amount.

      minimum: 0
    • code
      optional

      The discount code the line sold with, so a rule bound to it fires.

      One of the following:

      • object
      • null
  • source_key
    optional

    The writer's own id for the sale, so a retried record is not a second order.

    One of the following:

    • string
    • null
  • note
    optional

    Shown to the customer with their order.

    One of the following:

    • string
    • null
  • occurred_at
    optional

    One of the following:

    • string
    • null
  • grants
    optional
    boolean

    Whether each line grants its product from when the sale occurred; on unless said otherwise.

Returns

201

Records an order paid outside the store, granting what it bought.

JSON
  • refunds_refused
    array of
    object
    required
    • processor_ref
      string
      required
    • amount
      required

      One of the following:

      • number
      • null
    • pending
      required

      One of the following:

      • number
      • null
    • refused_at
      string
      required
  • customer
    required

    One of the following:

    • object
    • null
  • settled
    required

    One of the following:

    • number
    • null
  • refunded
    required

    One of the following:

    • number
    • null
  • revocable
    boolean
    required

    Whether a revocation of the order would end anything: its customer's grants or running subscriptions on its products, or its guests' tickets.

  • revocation
    required

    The latest revocation of its access for cause; null while none.

    One of the following:

    • object
    • null
  • failed_revocations
    object
    required
    • items
      array of
      object
      required
      • id
        string
        required
      • customer_id
        string
        required
      • order_id
        required

        One of the following:

        • string
        • null
      • grant_id
        required

        One of the following:

        • string
        • null
      • product_ids
        array of
        string
        required
      • cause
        string
        required
      • note
        required

        One of the following:

        • string
        • null
      • message
        required

        One of the following:

        • string
        • null
      • refund
        required

        One of the following:

        • object
        • null
      • revoked_by
        required

        One of the following:

        • string
        • null
      • token_id
        required

        One of the following:

        • string
        • null
      • created_at
        required

        One of the following:

        • string
        • null
    • total
      number
      required
  • refund_status
    required

    How much of what it settled came back: none, part or all of it; null while it settled and refunded nothing, or withheld.

    One of the following:

    • string
    • null
  • lines
    object
    required
    • items
      array of
      object
      required
      • product
        required

        One of the following:

        • object
        • null
      • guests
        array of
        object
        required
        • id
          string
          required
        • status
          string
          required
        • customer_id
          string
          required
        • customer
          required

          One of the following:

          • object
          • null
      • revocable
        boolean
        required

        Whether a revocation of the order would end anything on the line: its customer's grant or running subscription of the product, or a guest's ticket to it.

      • platform_fee
        required

        One of the following:

        • number
        • null
      • processor_fee
        required

        One of the following:

        • number
        • null
      • affiliate_fee
        required

        One of the following:

        • number
        • null
      • refunded
        required

        One of the following:

        • number
        • null
      • id
        string
        required
      • order_id
        string
        required
      • product_id
        required

        One of the following:

        • string
        • null
      • tier_id
        required

        One of the following:

        • string
        • null
      • price_id
        required

        One of the following:

        • string
        • null
      • position
        number
        required
      • quantity
        number
        required
      • currency
        string
        required
      • exponent
        required

        One of the following:

        • number
        • null
      • amount
        required

        One of the following:

        • number
        • null
      • discount
        required

        One of the following:

        • number
        • null
      • total
        required

        One of the following:

        • number
        • null
      • descriptor
        object
        required
        • product
          optional

          One of the following:

          • string
          • null
        • price
          optional

          One of the following:

          • string
          • null
        • tier
          optional

          One of the following:

          • string
          • null
        • coupon
          optional
          string
        • display_name
          optional
          string

          The name and message the buyer left with a tip or a donation.

        • message
          optional
          string
    • total
      number
      required
  • settlements
    object
    required
    • items
      array of
      object
      required
      • id
        string
        required
      • order_id
        string
        required
      • processor
        required

        One of the following:

        • string
        • null
      • processor_ref
        required

        One of the following:

        • string
        • null
      • account_ref
        required

        One of the following:

        • string
        • null
      • custodian
        string
        required
      • currency
        string
        required
      • exponent
        required

        One of the following:

        • number
        • null
      • amount
        required

        One of the following:

        • number
        • null
      • platform_fee
        required

        One of the following:

        • number
        • null
      • processor_fee
        required

        One of the following:

        • number
        • null
      • occurred_at
        required

        One of the following:

        • string
        • null
      • recorded_at
        required

        One of the following:

        • string
        • null
    • total
      number
      required
  • refunds
    object
    required
    • items
      array of
      object
      required
      • id
        string
        required
      • settlement_id
        string
        required
      • order_id
        string
        required
      • processor_ref
        required

        One of the following:

        • string
        • null
      • amount
        required

        One of the following:

        • number
        • null
      • currency
        string
        required
      • exponent
        required

        One of the following:

        • number
        • null
      • reason
        required

        One of the following:

        • string
        • null
      • occurred_at
        required

        One of the following:

        • string
        • null
      • recorded_at
        required

        One of the following:

        • string
        • null
    • total
      number
      required
  • affiliates
    object
    required
    • items
      array of
      object
      required
      • settlement_id
        string
        required
      • order_item_id
        string
        required
      • order_id
        string
        required
      • user_id
        string
        required
      • discount_id
        required

        One of the following:

        • string
        • null
      • currency
        string
        required
      • exponent
        required

        One of the following:

        • number
        • null
      • fee
        required

        One of the following:

        • number
        • null
      • resolution_id
        required

        One of the following:

        • string
        • null
    • total
      number
      required
  • id
    string
    required
  • number
    number
    required
  • customer_id
    required

    One of the following:

    • string
    • null
  • currency
    string
    required
  • exponent
    required

    One of the following:

    • number
    • null
  • amount
    required

    One of the following:

    • number
    • null
  • discount
    required

    One of the following:

    • number
    • null
  • total
    required

    One of the following:

    • number
    • null
  • free
    boolean
    required
  • fees
    required

    One of the following:

    • number
    • null
  • source
    string
    required
  • source_key
    required

    One of the following:

    • string
    • null
  • statements
    object
    required
    • coupon
      optional
      string
    • customer_status
      optional
      string

      How well the buyer was known; fake is a seeded order.

    • method
      optional
      string

      The payment method the processor reported.

    • method_details
      optional
      object

      What the method shows, as a saved instrument's display: its brand and last 4 digits.

      • brand
        required

        One of the following:

        • string
        • null
      • last4
        required

        One of the following:

        • string
        • null
    • refund_waiver
      optional
      object

      Carried from the checkout.

      • policy
        string
        required

        The strictest policy among the lines, the one consented to.

      • accepted_at
        string
        required
    • under_minimum
      optional
      object
      • processor
        string
        required
      • minimum
        required

        Null when the processor refused the payment as too small rather than core reading its minimum.

        One of the following:

        • number
        • null
      • amount
        required

        One of the following:

        • number
        • null
  • note
    required

    One of the following:

    • string
    • null
  • occurred_at
    required

    One of the following:

    • string
    • null
  • recorded_at
    required

    One of the following:

    • string
    • null
JSON
  • type
    string
    required
    format: uri
  • title
    string
    required
  • status
    integer
    required
  • detail
    string
    required
  • code
    optional
    string
  • context
    optional
    object
  • reached_core
    optional
    boolean
  • core_answer
    optional
    string

Type to search…

↑↓ navigate↵ selectEsc close