1. IS Webhooks
Storyous Public APIs
  • Introduction
  • Merchants API
    • Get merchant and all its places
  • Menu API
    • Get a menu tree
    • Get time-based menu
    • Get Remaining amounts of time-based menu
  • Bills API
    • Get list of payment bills
    • Get detail of a payment bill
  • Delivery API
    • Create an order through delivery API
    • Get status of delivery order
  • Deskview API
    • Get list of desks
    • Get list of sections
    • Get desk view of a place
  • Features API
    • Get list of merchants/places with a feature
  • Hotel accounts integration API
    • Provide list of accounts
    • Write consumed items to hotel account
  • Stocks API
    • Get list of stocks
    • Get list of items
    • Get list of stock ups
    • Get detail of stock up
    • Create new stock up
    • Modify stock up
    • Delete stock up
    • Get list of stock takings
    • Get detail of stock taking
    • Create new stock taking
    • Modify stock taking
    • Delete stock taking
    • Get suppliers
  • Loyalty API
    • Introduction
    • Prepayment
    • Item refunds with credit
    • Get benefit offer
    • Report offer validation error
    • Report benefit usage
    • Get loyalty benefit usages
    • Mark benefit usages as synchronized
  • DataSync
    • Webhook receiving endpoint
      • Receive new or updated records
    • Data domains
      • Stock management
        • Stocks domain
        • StockItemCategories domain
        • StockItems domain
        • StockMovements domain
      • Sales and costs
        • Bills domain
        • BillCosts domain
        • TerminalTransactions domain
        • PaymentTypes domain
        • Loyalty domain
      • Desks
        • DeskSections domain
        • Desks domain
      • Menu
        • ItemCategories domain
        • Items domain
        • PlaceITems domain
      • Merchants
        • Merchants domain
        • Places domain
        • Persons domain
  • Billing-service API AI generated
    • IS Webhooks
      • Sync merchant
        PUT
      • Sync merchant agreement
        PUT
      • Sync place
        PUT
      • Sync product (device/hardware assignment)
        PUT
      • Sync merchant-level feature
        PUT
      • Sync place-level feature
        PUT
      • Sync order (HW order)
        PUT
      • Sync IS invoices into Chargebee (yearly migration, temporary)
        POST
    • Billing Info
      • Get merchant billing info
      • Update merchant billing info
      • Get place billing info
    • Invoice
      • Check invoice payability
      • Pay invoice
      • Get hosted payment source page URL
    • Chargebee Webhook
      • Receive Chargebee event
    • Public
      • Download invoice or quote PDF
      • Quote payment page
    • Service
      • Health check
      • Prometheus metrics
      • MongoDash task dashboard
  • Schemas
    • Schemas
      • Loyalty api
        • BalanceBenefitOfferRequest
        • ThirdPartyLoyaltyOfferRequest
        • LoyaltyOfferValidationError
        • LoyaltyBenefitUsagesPayload
        • BenefitInput
        • PaidItem
        • Applied Benefits
        • PaymentByBalance
        • UsedBalance
        • LoyaltyOfferResponse
        • MenuProductDefinition
        • UsedGeneralDiscount
        • Prepayment
      • Desk
      • Section
    • OkResponse
    • StateInterval
    • PlaceStateInterval
    • Error
    • AssignInterval
    • ActiveInterval
    • RentalFee
    • InvoiceLine
    • ShortTermRental
    • Terminal
    • MerchantPricing
    • PlacePricing
    • PayInvoiceResponse
    • ValidationError
  1. IS Webhooks

Sync IS invoices into Chargebee (yearly migration, temporary)

Developing
POST
https://api.storyous.com/invoices/synchroniseToChargebee
Temporary endpoint used during the yearly-invoice migration. Accepts a
batch of already-paid IS invoices and, for each one, maps it to a
Chargebee importInvoice payload. With dryRun: true the mapped
payload is returned without calling Chargebee; with dryRun: false
Chargebee is called and the per-invoice response or parsed error is
returned.
Idempotency: the IS invoice id is reused as the Chargebee invoice id.
Per invoice the handler does retrieve-first: invoice.retrieve — on
hit, skip the import and report success: true with
alreadyImported: true; on 404 / not_found, call importInvoice.
Per-invoice failures do not fail the request — failures are reported
in the results array. Only top-level validation errors yield 400.
Confluence: https://teyaglobal.atlassian.net/wiki/spaces/SDexport/pages/8752857377

Request

Authorization
API Key
Add parameter in header
x-api-router-secret
Example:
x-api-router-secret: ********************
or
Body Params application/jsonRequired

Examples

Responses

🟢200
application/json
Per-invoice results in the same order as the input.
Bodyapplication/json

🟠400
Request Request Example
Shell
JavaScript
Java
Swift
curl --location 'https://api.storyous.com/invoices/synchroniseToChargebee' \
--header 'x-api-router-secret: <api-key>' \
--header 'Content-Type: application/json' \
--data '{
    "dryRun": true,
    "invoices": [
        {
            "_id": "string",
            "merchantId": "string",
            "issuedOn": "2019-08-24T14:15:22.123Z",
            "total": 0,
            "totalWithVat": 0
        }
    ]
}'
Response Response Example
{
    "results": [
        {
            "invoiceId": "string",
            "success": true,
            "dryRun": true,
            "alreadyImported": true,
            "response": {}
        }
    ]
}
Previous
Sync order (HW order)
Next
Get merchant billing info
Built with