openapi: 3.0.1 info: contact: email: support@suger.io name: Suger Support url: https://www.suger.io/support description: CRUD operations on a set of resources, including organizations, products, offers, entitlements, usage record groups for meterting, etc. title: Suger API Billing API version: '1.0' servers: - url: https://api.suger.cloud tags: - description: Access to Billing resources, such as addon, invoice, payment, etc. name: Billing paths: /org/{orgId}/addon: get: description: List all addon templates operationId: ListAddons parameters: - description: Organization ID explode: false in: path name: orgId required: true schema: type: string style: simple - description: List pagination size, default 1000, max value is 1000 explode: true in: query name: limit required: false schema: type: integer style: form - description: List pagination offset, default 0 explode: true in: query name: offset required: false schema: type: integer style: form responses: '200': content: application/json: schema: items: $ref: '#/components/schemas/BillingAddon' type: array description: OK '400': content: application/json: schema: type: string description: Bad request error '500': content: application/json: schema: type: string description: internal error security: - APIKeyAuth: [] summary: List Addons tags: - Billing post: description: Create an addon template operationId: CreateAddon parameters: - description: Organization ID explode: false in: path name: orgId required: true schema: type: string style: simple requestBody: content: application/json: schema: $ref: '#/components/schemas/CreateAndUpdateAddonParams' description: CreateAndUpdateAddonParams required: true responses: '200': content: application/json: schema: $ref: '#/components/schemas/BillingAddon' description: OK '400': content: application/json: schema: type: string description: Bad request error '500': content: application/json: schema: type: string description: internal error security: - APIKeyAuth: [] summary: Create Addon tags: - Billing x-codegen-request-body-name: data /org/{orgId}/addon/{addonId}: delete: description: Soft delete an addon template operationId: DeleteAddon parameters: - description: Organization ID explode: false in: path name: orgId required: true schema: type: string style: simple - description: Addon ID explode: false in: path name: addonId required: true schema: type: string style: simple responses: '200': content: application/json: schema: type: string description: Empty string if deletion is successful '400': content: application/json: schema: type: string description: Bad request error '500': content: application/json: schema: type: string description: internal error security: - APIKeyAuth: [] summary: Delete Addon tags: - Billing get: description: Get an addon template operationId: GetAddon parameters: - description: Organization ID explode: false in: path name: orgId required: true schema: type: string style: simple - description: Addon ID explode: false in: path name: addonId required: true schema: type: string style: simple responses: '200': content: application/json: schema: $ref: '#/components/schemas/BillingAddon' description: OK '400': content: application/json: schema: type: string description: Bad request error '500': content: application/json: schema: type: string description: internal error security: - APIKeyAuth: [] summary: Get Addon tags: - Billing patch: description: Update an addon template operationId: UpdateAddon parameters: - description: Organization ID explode: false in: path name: orgId required: true schema: type: string style: simple - description: Addon ID explode: false in: path name: addonId required: true schema: type: string style: simple requestBody: content: application/json: schema: $ref: '#/components/schemas/CreateAndUpdateAddonParams' description: CreateAndUpdateAddonParams required: true responses: '200': content: application/json: schema: $ref: '#/components/schemas/BillingAddon' description: OK '400': content: application/json: schema: type: string description: Bad request error '500': content: application/json: schema: type: string description: internal error security: - APIKeyAuth: [] summary: Update Addon tags: - Billing x-codegen-request-body-name: data /org/{orgId}/buyer/{buyerId}/paymentTransaction/{paymentTransactionId}/refund: get: description: list refunds of the payment transactions. operationId: ListRefundOfPaymentTransaction parameters: - description: Organization ID explode: false in: path name: orgId required: true schema: type: string style: simple - description: Buyer ID explode: false in: path name: buyerId required: true schema: type: string style: simple - description: Payment transaction ID explode: false in: path name: paymentTransactionId required: true schema: type: string style: simple responses: '200': content: application/json: schema: items: $ref: '#/components/schemas/BillingPaymentTransaction' type: array description: OK '400': content: application/json: schema: type: string description: Bad request error '500': content: application/json: schema: type: string description: Internal server error security: - APIKeyAuth: [] summary: List Refunds. tags: - Billing post: description: create refund on the payment transaction, support partial refunds multiple times. operationId: CreateRefund parameters: - description: Organization ID explode: false in: path name: orgId required: true schema: type: string style: simple - description: Buyer ID explode: false in: path name: buyerId required: true schema: type: string style: simple - description: Payment transaction ID explode: false in: path name: paymentTransactionId required: true schema: type: string style: simple - description: Refund amount explode: true in: query name: amount required: true schema: type: number style: form responses: '200': content: application/json: schema: $ref: '#/components/schemas/BillingPaymentTransaction' description: OK '400': content: application/json: schema: type: string description: Bad request error '500': content: application/json: schema: type: string description: Internal server error security: - APIKeyAuth: [] summary: Create Refund. tags: - Billing /org/{orgId}/invoice: get: description: List invoices with pagination and filter by status (optional) operationId: ListInvoices parameters: - description: Organization ID explode: false in: path name: orgId required: true schema: type: string style: simple - description: Optional, filter by the entitlement ID explode: true in: query name: entitlementId required: false schema: type: string style: form - description: Optional, filter by the given buyer ID explode: true in: query name: buyerId required: false schema: type: string style: form - description: Optional, filter by invoice status as filter, if not provided, all status invoices are returned explode: true in: query name: status required: false schema: enum: - DRAFT - FINALIZED - CANCELED - DELETED - '' type: string style: form - description: List pagination size, default 1000, max value is 1000 explode: true in: query name: limit required: false schema: type: integer style: form - description: List pagination offset, default 0 explode: true in: query name: offset required: false schema: type: integer style: form responses: '200': content: application/json: schema: items: $ref: '#/components/schemas/BillingInvoice' type: array description: OK '400': content: application/json: schema: type: string description: Bad request error '500': content: application/json: schema: type: string description: Internal error security: - APIKeyAuth: [] summary: List Invoices tags: - Billing /org/{orgId}/invoice/{invoiceId}: get: description: Get the invoice by ID operationId: GetInvoice parameters: - description: Organization ID explode: false in: path name: orgId required: true schema: type: string style: simple - description: Invoice ID explode: false in: path name: invoiceId required: true schema: type: string style: simple responses: '200': content: application/json: schema: $ref: '#/components/schemas/BillingInvoice' description: OK '400': content: application/json: schema: type: string description: Bad request error '500': content: application/json: schema: type: string description: Internal server error security: - APIKeyAuth: [] summary: Get Invoice tags: - Billing /org/{orgId}/invoice/{invoiceId}/info: patch: description: Update a draft invoice. Only DueDate, OverallDiscount, and Memo can be updated. operationId: UpdateInvoiceInfo parameters: - description: Organization ID explode: false in: path name: orgId required: true schema: type: string style: simple - description: Invoice ID explode: false in: path name: invoiceId required: true schema: type: string style: simple requestBody: content: application/json: schema: $ref: '#/components/schemas/UpdateInvoiceInfoRequest' description: Update Invoice Info Request Params required: true responses: '200': content: application/json: schema: $ref: '#/components/schemas/BillingInvoiceInfo' description: Updated Invoice info '400': content: application/json: schema: type: string description: Bad request error '500': content: application/json: schema: type: string description: Internal server error security: - APIKeyAuth: [] summary: Update Invoice Info tags: - Billing x-codegen-request-body-name: data /org/{orgId}/invoice/{invoiceId}/issue: patch: description: Issue the invoice immediately. It can be used for manual issue or reissue invoice. operationId: IssueInvoice parameters: - description: Organization ID explode: false in: path name: orgId required: true schema: type: string style: simple - description: Invoice ID explode: false in: path name: invoiceId required: true schema: type: string style: simple requestBody: content: application/json: schema: items: type: string type: array description: List of Contact IDs required: false responses: '200': content: application/json: schema: $ref: '#/components/schemas/BillingInvoice' description: the issued Invoice '400': content: application/json: schema: type: string description: Bad request error '500': content: application/json: schema: type: string description: Internal server error security: - APIKeyAuth: [] summary: Issue Invoice tags: - Billing x-codegen-request-body-name: contactIds /org/{orgId}/invoice/{invoiceId}/pay: patch: description: Initiate the payment for the invoice immediately. It can be used for manual payment or retry payment. operationId: PayInvoice parameters: - description: Organization ID explode: false in: path name: orgId required: true schema: type: string style: simple - description: Invoice ID explode: false in: path name: invoiceId required: true schema: type: string style: simple responses: '200': content: application/json: schema: $ref: '#/components/schemas/BillingInvoice' description: OK '400': content: application/json: schema: type: string description: Bad request error '500': content: application/json: schema: type: string description: Internal server error security: - APIKeyAuth: [] summary: Pay Invoice tags: - Billing /org/{orgId}/invoice/{invoiceId}/preview: get: description: Returns the preview HTML content of the invoice issued email. operationId: PreviewInvoiceEmail parameters: - description: Organization ID explode: false in: path name: orgId required: true schema: type: string style: simple - description: Invoice ID explode: false in: path name: invoiceId required: true schema: type: string style: simple responses: '200': content: text/html: schema: type: string description: HTML content of the invoice issued email '400': content: text/html: schema: type: string description: Bad request error '500': content: text/html: schema: type: string description: Internal server error security: - APIKeyAuth: [] summary: Preview Invoice Email tags: - Billing /org/{orgId}/invoice/{invoiceId}/void: patch: description: Void the invoice. It can be used for manual void or cancel the invoice. operationId: VoidInvoice parameters: - description: Organization ID explode: false in: path name: orgId required: true schema: type: string style: simple - description: Invoice ID explode: false in: path name: invoiceId required: true schema: type: string style: simple responses: '200': content: application/json: schema: $ref: '#/components/schemas/BillingInvoice' description: OK '400': content: application/json: schema: type: string description: Bad request error '500': content: application/json: schema: type: string description: Internal server error security: - APIKeyAuth: [] summary: Void Invoice tags: - Billing /org/{orgId}/paymentTransaction: get: description: List payment transactions with pagination and filters operationId: ListPaymentTransactions parameters: - description: Organization ID explode: false in: path name: orgId required: true schema: type: string style: simple - description: Optional, filter by the given buyer ID explode: true in: query name: buyerId required: false schema: type: string style: form - description: Optional, filter by the given entitlement ID explode: true in: query name: entitlementId required: false schema: type: string style: form - description: Optional, filter by the given invoice ID explode: true in: query name: invoiceId required: false schema: type: string style: form - description: Optional, filter by status explode: true in: query name: status required: false schema: enum: - PENDING - PROCESSING - SUCCESS - FAILED type: string style: form - description: Optional, filter by transaction type explode: true in: query name: type required: false schema: enum: - CHARGE - REFUND type: string style: form - description: List pagination size, default 1000, max value is 1000 explode: true in: query name: limit required: false schema: type: integer style: form - description: List pagination offset, default 0 explode: true in: query name: offset required: false schema: type: integer style: form responses: '200': content: application/json: schema: items: $ref: '#/components/schemas/BillingPaymentTransaction' type: array description: OK '400': content: application/json: schema: type: string description: Bad request error '500': content: application/json: schema: type: string description: Internal server error security: - APIKeyAuth: [] summary: List Payment Transactions tags: - Billing components: schemas: StripeBalanceTransactionFeeDetail: properties: amount: description: Amount of the fee, in cents. type: integer application: description: ID of the Connect application that earned the fee. type: string description: description: An arbitrary string attached to the object. Often useful for displaying to users. type: string type: description: 'Type of the fee, one of: `application_fee`, `payment_method_passthrough_fee`, `stripe_fee` or `tax`.' type: string type: object StripeError: properties: code: type: string message: type: string param: type: string status: type: integer type: type: string type: object BillingAddon: example: organizationID: organizationID creationTime: 2000-01-23 04:56:07+00:00 name: name description: description id: id info: amount: 0.8008281904610115 lastUpdateTime: 2000-01-23 04:56:07+00:00 status: ACTIVE properties: creationTime: format: date-time type: string description: description: Description of the addon maxLength: 300 type: string id: maxLength: 36 type: string info: $ref: '#/components/schemas/BillingAddonInfo' lastUpdateTime: format: date-time type: string name: description: Name of the addon, e.g. "Support Plan" maxLength: 50 minLength: 4 type: string organizationID: type: string status: $ref: '#/components/schemas/BillingAddonStatus' type: object InvoiceAdjustOverallMinimumSpend: properties: minimumSpend: type: number reason: type: string type: object Partner: enum: - '' - ADYEN - ALIBABA - AWS - AWS_CHINA - AZURE - CHARGEBEE - DATABRICKS - DOCUSIGN - GCP - GOOGLE - HUBSPOT - INTUIT - LAGO - MARKETO - METRONOME - MICROSOFT - ORACLE - ORB - REDHAT - SALESFORCE - SLACK - SNOWFLAKE - STRIPE - ZOHO type: string x-enum-varnames: - Partner_UNKNOWN - Partner_ADYEN - Partner_ALIBABA - Partner_AWS - Partner_AWS_CHINA - Partner_AZURE - Partner_CHARGEBEE - Partner_DATABRICKS - Partner_DOCUSIGN - Partner_GCP - Partner_GOOGLE - Partner_HUBSPOT - Partner_INTUIT - Partner_LAGO - Partner_MARKETO - Partner_METRONOME - Partner_MICROSOFT - Partner_ORACLE - Partner_ORB - Partner_REDHAT - Partner_SALESFORCE - Partner_SLACK - Partner_SNOWFLAKE - Partner_STRIPE - Partner_ZOHO BillingPaymentTransactionInfo: example: stripePaymentIntent: '{}' stripeBalanceTransaction: '{}' stripeError: '{}' stripeDisputes: - paymentIntentId: paymentIntentId reason: reason amount: 6 is_charge_refundable: true livemode: true chargeId: chargeId created: 1 id: id status: status - paymentIntentId: paymentIntentId reason: reason amount: 6 is_charge_refundable: true livemode: true chargeId: chargeId created: 1 id: id status: status invoiceDate: 2000-01-23 04:56:07+00:00 stripeRefund: '{}' refundExists: true properties: invoiceDate: description: The invoice issue date. format: date-time type: string refundExists: description: Refund flag marks whether the transaction has any refund records. type: boolean stripeBalanceTransaction: allOf: - $ref: '#/components/schemas/StripeBalanceTransaction' description: Balance transaction that describes the impact of this charge on your account balance. type: object stripeDisputes: description: Stripe dispute result, got by Dispute API, there may be multiple disputes. items: $ref: '#/components/schemas/StripeDispute' type: array stripeError: allOf: - $ref: '#/components/schemas/StripeError' description: Error of stripe API call type: object stripePaymentIntent: allOf: - $ref: '#/components/schemas/StripePaymentIntent' description: Stripe payment intent result, got by PaymentIntent API type: object stripeRefund: allOf: - $ref: '#/components/schemas/StripeRefund' description: Stripe refund result, got by Refund API type: object type: object StripeDispute: example: paymentIntentId: paymentIntentId reason: reason amount: 6 is_charge_refundable: true livemode: true chargeId: chargeId created: 1 id: id status: status properties: amount: description: Disputed amount. Usually the amount of the charge, but it can differ (usually because of currency fluctuation or because only part of the order is disputed). type: integer chargeId: description: ID of the charge that's disputed. type: string created: description: Time at which the object was created. Measured in seconds since the Unix epoch. type: integer id: description: Unique identifier for the object. type: string is_charge_refundable: description: If true, it's still possible to refund the disputed payment. After the payment has been fully refunded, no further funds are withdrawn from your Stripe account as a result of this dispute. type: boolean livemode: description: Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. type: boolean paymentIntentId: description: ID of the PaymentIntent that's disputed. type: string reason: description: Reason given by cardholder for dispute. Possible values are `bank_cannot_process`, `check_returned`, `credit_not_processed`, `customer_initiated`, `debit_not_authorized`, `duplicate`, `fraudulent`, `general`, `incorrect_account_details`, `insufficient_funds`, `product_not_received`, `product_unacceptable`, `subscription_canceled`, or `unrecognized`. Learn more about [dispute reasons](https://stripe.com/docs/disputes/categories). type: string status: description: Current status of dispute. Possible values are `warning_needs_response`, `warning_under_review`, `warning_closed`, `needs_response`, `under_review`, `won`, or `lost`. type: string type: object PriceModelCategory: enum: - basic - tiered - bulk - volume - percentage - tiered-percentage - matrix type: string x-enum-varnames: - PriceModelCategory_Basic - PriceModelCategory_Tiered - PriceModelCategory_Bulk - PriceModelCategory_Volume - PriceModelCategory_Percentage - PriceModelCategory_TieredPercentage - PriceModelCategory_Matrix BillingDiscount: example: discountType: PERCENTAGE value: 1.4658129805029452 properties: discountType: $ref: '#/components/schemas/BillingDiscountType' value: type: number type: object StripePaymentIntentStatus: enum: - requires_payment_method - requires_confirmation - requires_action - processing - requires_capture - canceled - succeeded type: string x-enum-varnames: - StripePaymentIntentStatus_RequiresPaymentMethod - StripePaymentIntentStatus_RequiresConfirmation - StripePaymentIntentStatus_RequiresAction - StripePaymentIntentStatus_Processing - StripePaymentIntentStatus_RequiresCapture - StripePaymentIntentStatus_Canceled - StripePaymentIntentStatus_Succeeded InvoiceAdjustMinimumSpendByDimension: example: minimumSpend: 5.962133916683182 reason: reason dimensionKey: dimensionKey properties: dimensionKey: type: string minimumSpend: type: number reason: type: string type: object StripeRefundDestinationDetails: properties: card: $ref: '#/components/schemas/StripeRefundDestinationDetailsCard' type: description: The type of transaction-specific details of the payment method used in the refund (e.g., `card`). An additional hash is included on `destination_details` with a name matching this value. It contains information specific to the refund transaction. type: string us_bank_transfer: $ref: '#/components/schemas/StripeRefundDestinationDetailsUSBankTransfer' type: object MeteringUsageRecordGroupByKey: example: groupBysExpression: groupBysExpression id: id properties: groupBysExpression: description: GroupBysExpression is string expression of array of group bys. type: string id: description: ID is billableMetric ID (Key) type: string type: object BillingWalletType: enum: - ach_debit - bacs_debit - card - credit - sepa_debit type: string x-enum-comments: BillingWalletType_ACH_DEBIT: for USD. BillingWalletType_BACS_DEBIT: for UK. BillingWalletType_CREDIT: Credit managed by Suger. BillingWalletType_SEPA_DEBIT: for EUR. x-enum-varnames: - BillingWalletType_ACH_DEBIT - BillingWalletType_BACS_DEBIT - BillingWalletType_CARD - BillingWalletType_CREDIT - BillingWalletType_SEPA_DEBIT StripePaymentIntent: properties: id: description: Unique identifier for the object. type: string last_payment_error: allOf: - $ref: '#/components/schemas/StripeError' description: The payment error encountered in the previous PaymentIntent confirmation. It will be cleared if the PaymentIntent is later updated for any reason. type: object livemode: description: Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. type: boolean status: allOf: - $ref: '#/components/schemas/StripePaymentIntentStatus' description: Status of this PaymentIntent. Read more about each PaymentIntent [status](https://stripe.com/docs/payments/intents#intent-statuses). type: object type: object BillableDimensionUsageDailyRevenue: example: date: date uniquePropertyItems: key: '' quantity: 5.025004791520295 billableMetricKey: groupBysExpression: groupBysExpression id: id properties: billableMetricKey: $ref: '#/components/schemas/MeteringUsageRecordGroupByKey' date: type: string quantity: type: number uniquePropertyItems: additionalProperties: true type: object type: object BillingAddonRecord: example: amount: 0.8008281904610115 name: name description: description chargeOn: 2000-01-23 04:56:07+00:00 id: id properties: amount: type: number chargeOn: format: date-time type: string description: type: string id: type: string name: type: string type: object StripeRefund: properties: chargeId: description: ID of the charge that's refunded. type: string estinationDetails: allOf: - $ref: '#/components/schemas/StripeRefundDestinationDetails' description: Transaction-specific details for the refund. type: object failureBalanceTransactionId: description: After the refund fails, this balance transaction describes the adjustment made on your account balance that reverses the initial balance transaction. type: string failureReason: description: 'Provides the reason for the refund failure. Possible values are: `lost_or_stolen_card`, `expired_or_canceled_card`, `charge_for_pending_refund_disputed`, `insufficient_funds`, `declined`, `merchant_request`, or `unknown`.' type: string id: type: string paymentIntentId: description: ID of the PaymentIntent that's refunded. type: string status: allOf: - $ref: '#/components/schemas/StripeRefundStatus' description: Status of the refund. This can be `pending`, `requires_action`, `succeeded`, `failed`, or `canceled`. Learn more about [failed refunds](https://stripe.com/docs/refunds#failed-refunds). type: object type: object CreateAndUpdateAddonParams: example: amount: 0.8008281904610115 name: name description: description properties: amount: description: The amount of the addon. type: number description: description: The description of the addon. maxLength: 300 type: string name: description: The name of the addon. maxLength: 50 minLength: 4 type: string type: object StripeBalanceTransaction: properties: amount: description: Gross amount of this transaction (in cents (or local equivalent)). A positive value represents funds charged to another party, and a negative value represents funds sent to another party. type: integer available_on: description: The date that the transaction's net funds become available in the Stripe balance. type: integer chargeId: description: ID of the charge which the balance transaction comes from. type: string created: description: Time at which the object was created. Measured in seconds since the Unix epoch. type: integer description: description: An arbitrary string attached to the object. Often useful for displaying to users. type: string exchange_rate: description: If applicable, this transaction uses an exchange rate. If money converts from currency A to currency B, then the `amount` in currency A, multipled by the `exchange_rate`, equals the `amount` in currency B. For example, if you charge a customer 10.00 EUR, the PaymentIntent's `amount` is `1000` and `currency` is `eur`. If this converts to 12.34 USD in your Stripe account, the BalanceTransaction's `amount` is `1234`, its `currency` is `usd`, and the `exchange_rate` is `1.234`. type: number fee: description: Fees (in cents (or local equivalent)) paid for this transaction. Represented as a positive integer when assessed. type: integer fee_details: description: Detailed breakdown of fees (in cents (or local equivalent)) paid for this transaction. items: $ref: '#/components/schemas/StripeBalanceTransactionFeeDetail' type: array id: description: Unique identifier for the object. type: string net: description: Net impact to a Stripe balance (in cents (or local equivalent)). A positive value represents incrementing a Stripe balance, and a negative value decrementing a Stripe balance. You can calculate the net impact of a transaction on a balance by `amount` - `fee` type: integer status: description: The transaction's net funds status in the Stripe balance, which are either `available` or `pending`. type: string type: description: 'Transaction type: `adjustment`, `advance`, `advance_funding`, `anticipation_repayment`, `application_fee`, `application_fee_refund`, `charge`, `climate_order_purchase`, `climate_order_refund`, `connect_collection_transfer`, `contribution`, `issuing_authorization_hold`, `issuing_authorization_release`, `issuing_dispute`, `issuing_transaction`, `obligation_outbound`, `obligation_reversal_inbound`, `payment`, `payment_failure_refund`, `payment_network_reserve_hold`, `payment_network_reserve_release`, `payment_refund`, `payment_reversal`, `payment_unreconciled`, `payout`, `payout_cancel`, `payout_failure`, `refund`, `refund_failure`, `reserve_transaction`, `reserved_funds`, `stripe_fee`, `stripe_fx_fee`, `tax_fee`, `topup`, `topup_reversal`, `transfer`, `transfer_cancel`, `transfer_failure`, or `transfer_refund`. Learn more about [balance transaction types and what they represent](https://stripe.com/docs/reports/balance-transaction-types). To classify transactions for accounting purposes, consider `reporting_category` instead.' type: string type: object UpdateInvoiceInfoRequest: example: dueDate: dueDate discountAmount: 0.8008281904610115 memo: memo discountType: '{}' properties: discountAmount: type: number discountType: allOf: - $ref: '#/components/schemas/BillingDiscountType' description: The overall discount of the invoice. type: object dueDate: type: string memo: type: string type: object BillingInvoiceInfo: example: deductedCommitAmount: 4.145608029883936 addonDetail: amount: 0.8008281904610115 name: name description: description chargeOn: 2000-01-23 04:56:07+00:00 id: id dueDate: 2000-01-23 04:56:07+00:00 adjustDiscountByDimensions: - reason: reason dimensionKey: dimensionKey discount: discountType: PERCENTAGE value: 1.4658129805029452 - reason: reason dimensionKey: dimensionKey discount: discountType: PERCENTAGE value: 1.4658129805029452 description: description memo: memo adjustOverallMinimumSpend: '{}' currency: currency issueDate: 2000-01-23 04:56:07+00:00 netTermsInDays: 1 trialPeriodInDays: 4 commitsRevenueDetails: - amount: 9.301444243932576 expression: expression quantity: 3 rate: 2.027123023002322 name: name description: description key: key - amount: 9.301444243932576 expression: expression quantity: 3 rate: 2.027123023002322 name: name description: description key: key gracePeriodInDays: 1 periodTotalDays: 6 creationDate: 2000-01-23 04:56:07+00:00 subtotalAmount: 7.457744773683766 addFixedFees: - reason: reason quantity: 0 endDate: 2000-01-23 04:56:07+00:00 rate: 6.027456183070403 startDate: 2000-01-23 04:56:07+00:00 - reason: reason quantity: 0 endDate: 2000-01-23 04:56:07+00:00 rate: 6.027456183070403 startDate: 2000-01-23 04:56:07+00:00 adjustOverallDiscount: '{}' billableDimensionDetails: - discountExpression: discountExpression amount: 5.637376656633329 quantity: 7.061401241503109 minimumCommit: 2.3021358869347655 name: name discount: '{}' details: - feeExpressions: feeExpressions descriptions: descriptions - feeExpressions: feeExpressions descriptions: descriptions billableMetricKey: '{}' category: '{}' isTrial: true minimumCommitScope: '{}' - discountExpression: discountExpression amount: 5.637376656633329 quantity: 7.061401241503109 minimumCommit: 2.3021358869347655 name: name discount: '{}' details: - feeExpressions: feeExpressions descriptions: descriptions - feeExpressions: feeExpressions descriptions: descriptions billableMetricKey: '{}' category: '{}' isTrial: true minimumCommitScope: '{}' paymentInstallmentsDetail: amount: 1.4894159098541704 description: description chargeOn: 2000-01-23 04:56:07+00:00 usageDailyRevenues: - date: date uniquePropertyItems: key: '' quantity: 5.025004791520295 billableMetricKey: groupBysExpression: groupBysExpression id: id - date: date uniquePropertyItems: key: '' quantity: 5.025004791520295 billableMetricKey: groupBysExpression: groupBysExpression id: id dueAmount: 7.386281948385884 isMeteringOverageCommit: true deductedCommitInvoiceID: deductedCommitInvoiceID adjustMinimumSpendByDimensions: - minimumSpend: 5.962133916683182 reason: reason dimensionKey: dimensionKey - minimumSpend: 5.962133916683182 reason: reason dimensionKey: dimensionKey receiptUrl: receiptUrl taxAmount: 1.1730742509559433 spaUrl: spaUrl properties: addFixedFees: description: 'Adjust charge fields The fixed fees to be added to the invoice.' items: $ref: '#/components/schemas/InvoiceAddFixedFee' type: array addonDetail: $ref: '#/components/schemas/BillingAddonRecord' adjustDiscountByDimensions: description: add or adjust discount for a specific dimension items: $ref: '#/components/schemas/InvoiceAdjustDiscountByDimension' type: array adjustMinimumSpendByDimensions: description: add or adjust minimum spend for a specific dimension items: $ref: '#/components/schemas/InvoiceAdjustMinimumSpendByDimension' type: array adjustOverallDiscount: allOf: - $ref: '#/components/schemas/InvoiceAdjustOverallDiscount' description: 'add or adjust overall discount calculate each dimension''s discount first, then apply the overall discount' type: object adjustOverallMinimumSpend: allOf: - $ref: '#/components/schemas/InvoiceAdjustOverallMinimumSpend' description: 'add or adjust overall minimum spend calculate each dimension''s minimum spend first, then apply the overall minimum spend' type: object billableDimensionDetails: items: $ref: '#/components/schemas/BillableDimensionPriceModelDetail' type: array commitsRevenueDetails: description: 'Recurring flat fee for the invoice. There should be only one type fee for each invoice, commits, or usage.' items: $ref: '#/components/schemas/CommitRevenueDetail' type: array creationDate: description: 'The creation date of the invoice when the status of the invoice may be draft or issued. It may be different from the issue date.' format: date-time type: string currency: type: string deductedCommitAmount: description: 'The amount of the committed amount that has been deducted from the usage. It works only when IsMeteringOverageCommit is true.' type: number deductedCommitInvoiceID: description: 'The ID of the commit invoice that has been deducted from the usage. It works only when IsMeteringOverageCommit is true.' type: string description: type: string dueAmount: description: Due amount = SubtotalAmount + TaxAmount - AdjustOverallDiscount type: number dueDate: description: DueDate = IssueDate + NetTerm format: date-time type: string gracePeriodInDays: description: Grace Period in number of days type: integer isMeteringOverageCommit: description: Whether the usage metering is charged for the amount that exceeds the committed amount from the entitlement. type: boolean issueDate: description: 'IssueDate, issue invoice automatically when CreationDate + GracePeriod, or issue invoice manually IssueDate >= CreationDate && IssueDate <= CreationDate + GracePeriod' format: date-time type: string memo: type: string netTermsInDays: description: Net Terms period in number of days type: integer paymentInstallmentsDetail: $ref: '#/components/schemas/BillingPaymentInstallmentDetail' periodTotalDays: description: PeriodTotalDays is the total number of days among the whole periods. e.g. 61 days for a 2-month invoice. type: integer receiptUrl: description: Invoice receipt url, it only exists when there are transactions. type: string spaUrl: description: SPA url with JWT. type: string subtotalAmount: description: Subtotal amount calculated from the user usage. type: number taxAmount: type: number trialPeriodInDays: description: Trial period in number of days type: integer usageDailyRevenues: description: Billable dimension fees for the invoice. items: $ref: '#/components/schemas/BillableDimensionUsageDailyRevenue' type: array type: object BillingDiscountType: enum: - PERCENTAGE - ABSOLUTE type: string x-enum-varnames: - BillingDiscountType_PERCENTAGE - BillingDiscountType_ABSOLUTE StripeRefundStatus: enum: - pending - requires_action - succeeded - failed - canceled type: string x-enum-varnames: - StripeRefundStatus_Pending - StripeRefundStatus_RequiresAction - StripeRefundStatus_Succeeded - StripeRefundStatus_Failed - StripeRefundStatus_Canceled BillingMinimumCommitScope: enum: - '' - DIMENSION - DIMENSION_GROUP_BY type: string x-enum-varnames: - BillingMinimumCommitScope_UNKNOWN - BillingMinimumCommitScope_DIMENSION - BillingMinimumCommitScope_DIMENSION_GROUP_BY BillingAddonInfo: example: amount: 0.8008281904610115 properties: amount: type: number type: object InvoiceAdjustDiscountByDimension: example: reason: reason dimensionKey: dimensionKey discount: discountType: PERCENTAGE value: 1.4658129805029452 properties: dimensionKey: type: string discount: $ref: '#/components/schemas/BillingDiscount' reason: type: string type: object BillableDimensionFeeDetail: example: feeExpressions: feeExpressions descriptions: descriptions properties: descriptions: description: 'Description of the pricing model that is used to show what the amount is for. like ''Bulk pricing: 0-100 units'', ''Tiered pricing: 0-100 units''' type: string feeExpressions: description: FeeExpression is the expression used to calculate the fee that is used to show how the amount is calculated. like '211 × $0.03' type: string type: object BillingPaymentTransactionType: enum: - CHARGE - REFUND type: string x-enum-varnames: - BillingPaymentTransactionType_CHARGE - BillingPaymentTransactionType_REFUND BillingInvoiceStatus: enum: - DRAFT - FINALIZED - CANCELED - DELETED - '' type: string x-enum-varnames: - BillingInvoiceStatus_DRAFT - BillingInvoiceStatus_FINALIZED - BillingInvoiceStatus_CANCELED - BillingInvoiceStatus_DELETED - BillingInvoiceStatus_UNKNOWN BillingAddonStatus: enum: - ACTIVE - DELETED type: string x-enum-varnames: - BillingAddonStatus_ACTIVE - BillingAddonStatus_DELETED CommitRevenueDetail: example: amount: 9.301444243932576 expression: expression quantity: 3 rate: 2.027123023002322 name: name description: description key: key properties: amount: description: The total amount of the commit revenue. type: number description: type: string expression: type: string key: type: string name: type: string quantity: description: The quantity of the commit dimension. Default is 1. type: integer rate: description: The unit price of the commit dimension. type: number type: object InvoiceAddFixedFee: example: reason: reason quantity: 0 endDate: 2000-01-23 04:56:07+00:00 rate: 6.027456183070403 startDate: 2000-01-23 04:56:07+00:00 properties: endDate: format: date-time type: string quantity: type: integer rate: type: number reason: type: string startDate: format: date-time type: string type: object StripeRefundDestinationDetailsCard: properties: reference: description: Value of the reference number assigned to the refund. type: string reference_status: description: Status of the reference number on the refund. This can be `pending`, `available` or `unavailable`. enum: - pending - available - unavailable type: string reference_type: description: Type of the reference number assigned to the refund. type: string type: description: The type of refund. This can be `refund`, `reversal`, or `pending`. enum: - refund - reversal - pending type: string type: object BillingPaymentStatus: enum: - PENDING - PROCESSING - SUCCESS - FAILED type: string x-enum-varnames: - BillingPaymentStatus_PENDING - BillingPaymentStatus_PROCESSING - BillingPaymentStatus_SUCCESS - BillingPaymentStatus_FAILED BillableDimensionPriceModelDetail: example: discountExpression: discountExpression amount: 5.637376656633329 quantity: 7.061401241503109 minimumCommit: 2.3021358869347655 name: name discount: '{}' details: - feeExpressions: feeExpressions descriptions: descriptions - feeExpressions: feeExpressions descriptions: descriptions billableMetricKey: '{}' category: '{}' isTrial: true minimumCommitScope: '{}' properties: amount: description: Amount is the amount that is calculated based on the FeeExpression type: number billableMetricKey: allOf: - $ref: '#/components/schemas/MeteringUsageRecordGroupByKey' description: BillableMetricKey is the key of the billable metric type: object category: allOf: - $ref: '#/components/schemas/PriceModelCategory' description: Category of this billable dimension. type: object details: description: Details is the details of the pricing model that is used to show what the amount is for. items: $ref: '#/components/schemas/BillableDimensionFeeDetail' type: array discount: allOf: - $ref: '#/components/schemas/BillingDiscount' description: The discount of this billable dimension if applicable. type: object discountExpression: description: DiscountExpression is the expression used to calculate the discount that is used to show how the discount is calculated. type: string isTrial: description: Flag to indicate if this period is a trial period. type: boolean minimumCommit: description: 'MinimumCommit is the minimum commit amount that is used to show the minimum commit amount. Will be ignored if the value is 0 or less.' type: number minimumCommitScope: allOf: - $ref: '#/components/schemas/BillingMinimumCommitScope' description: The minimum commit scope. The default value is "DIMENSION" if not set. type: object name: description: Name of this billable dimension. type: string quantity: description: 'Final quantity of the billable dimension in the invoice period, which calculates the fee in price model. It may be the sum value of count/sum/unique_count or latest/max value according to different aggregation type.' type: number type: object BillingPaymentInstallmentDetail: example: amount: 1.4894159098541704 description: description chargeOn: 2000-01-23 04:56:07+00:00 properties: amount: type: number chargeOn: format: date-time type: string description: type: string type: object BillingInvoice: example: creationTime: 2000-01-23 04:56:07+00:00 endDate: 2000-01-23 04:56:07+00:00 entitlementID: entitlementID buyerID: buyerID type: COMMIT organizationID: organizationID invoiceURL: invoiceURL id: id paymentStatus: PENDING startDate: 2000-01-23 04:56:07+00:00 info: deductedCommitAmount: 4.145608029883936 addonDetail: amount: 0.8008281904610115 name: name description: description chargeOn: 2000-01-23 04:56:07+00:00 id: id dueDate: 2000-01-23 04:56:07+00:00 adjustDiscountByDimensions: - reason: reason dimensionKey: dimensionKey discount: discountType: PERCENTAGE value: 1.4658129805029452 - reason: reason dimensionKey: dimensionKey discount: discountType: PERCENTAGE value: 1.4658129805029452 description: description memo: memo adjustOverallMinimumSpend: '{}' currency: currency issueDate: 2000-01-23 04:56:07+00:00 netTermsInDays: 1 trialPeriodInDays: 4 commitsRevenueDetails: - amount: 9.301444243932576 expression: expression quantity: 3 rate: 2.027123023002322 name: name description: description key: key - amount: 9.301444243932576 expression: expression quantity: 3 rate: 2.027123023002322 name: name description: description key: key gracePeriodInDays: 1 periodTotalDays: 6 creationDate: 2000-01-23 04:56:07+00:00 subtotalAmount: 7.457744773683766 addFixedFees: - reason: reason quantity: 0 endDate: 2000-01-23 04:56:07+00:00 rate: 6.027456183070403 startDate: 2000-01-23 04:56:07+00:00 - reason: reason quantity: 0 endDate: 2000-01-23 04:56:07+00:00 rate: 6.027456183070403 startDate: 2000-01-23 04:56:07+00:00 adjustOverallDiscount: '{}' billableDimensionDetails: - discountExpression: discountExpression amount: 5.637376656633329 quantity: 7.061401241503109 minimumCommit: 2.3021358869347655 name: name discount: '{}' details: - feeExpressions: feeExpressions descriptions: descriptions - feeExpressions: feeExpressions descriptions: descriptions billableMetricKey: '{}' category: '{}' isTrial: true minimumCommitScope: '{}' - discountExpression: discountExpression amount: 5.637376656633329 quantity: 7.061401241503109 minimumCommit: 2.3021358869347655 name: name discount: '{}' details: - feeExpressions: feeExpressions descriptions: descriptions - feeExpressions: feeExpressions descriptions: descriptions billableMetricKey: '{}' category: '{}' isTrial: true minimumCommitScope: '{}' paymentInstallmentsDetail: amount: 1.4894159098541704 description: description chargeOn: 2000-01-23 04:56:07+00:00 usageDailyRevenues: - date: date uniquePropertyItems: key: '' quantity: 5.025004791520295 billableMetricKey: groupBysExpression: groupBysExpression id: id - date: date uniquePropertyItems: key: '' quantity: 5.025004791520295 billableMetricKey: groupBysExpression: groupBysExpression id: id dueAmount: 7.386281948385884 isMeteringOverageCommit: true deductedCommitInvoiceID: deductedCommitInvoiceID adjustMinimumSpendByDimensions: - minimumSpend: 5.962133916683182 reason: reason dimensionKey: dimensionKey - minimumSpend: 5.962133916683182 reason: reason dimensionKey: dimensionKey receiptUrl: receiptUrl taxAmount: 1.1730742509559433 spaUrl: spaUrl lastUpdateTime: 2000-01-23 04:56:07+00:00 status: DRAFT properties: buyerID: maxLength: 36 type: string creationTime: format: date-time type: string endDate: format: date-time type: string entitlementID: maxLength: 36 type: string id: maxLength: 36 type: string info: $ref: '#/components/schemas/BillingInvoiceInfo' invoiceURL: description: The invoice file URL, provided as AWS S3 presigned URL with expiration time. Output only. type: string lastUpdateTime: format: date-time type: string organizationID: type: string paymentStatus: $ref: '#/components/schemas/BillingPaymentStatus' startDate: format: date-time type: string status: $ref: '#/components/schemas/BillingInvoiceStatus' type: $ref: '#/components/schemas/BillingInvoiceType' type: object BillingPaymentTransaction: example: walletID: walletID amount: 0.8008281904610115 creationTime: 2000-01-23 04:56:07+00:00 walletType: ach_debit entitlementID: entitlementID buyerID: buyerID type: CHARGE parentID: parentID organizationID: organizationID partner: '' currency: currency invoiceID: invoiceID id: id info: stripePaymentIntent: '{}' stripeBalanceTransaction: '{}' stripeError: '{}' stripeDisputes: - paymentIntentId: paymentIntentId reason: reason amount: 6 is_charge_refundable: true livemode: true chargeId: chargeId created: 1 id: id status: status - paymentIntentId: paymentIntentId reason: reason amount: 6 is_charge_refundable: true livemode: true chargeId: chargeId created: 1 id: id status: status invoiceDate: 2000-01-23 04:56:07+00:00 stripeRefund: '{}' refundExists: true lastUpdateTime: 2000-01-23 04:56:07+00:00 status: PENDING properties: amount: type: number buyerID: type: string creationTime: format: date-time type: string currency: type: string entitlementID: type: string id: type: string info: $ref: '#/components/schemas/BillingPaymentTransactionInfo' invoiceID: type: string lastUpdateTime: format: date-time type: string organizationID: type: string parentID: type: string partner: $ref: '#/components/schemas/Partner' status: $ref: '#/components/schemas/BillingPaymentStatus' type: $ref: '#/components/schemas/BillingPaymentTransactionType' walletID: type: string walletType: $ref: '#/components/schemas/BillingWalletType' type: object BillingInvoiceType: enum: - COMMIT - USAGE - ADDON - INSTALLMENT type: string x-enum-varnames: - BillingInvoiceType_COMMIT - BillingInvoiceType_USAGE - BillingInvoiceType_ADDON - BillingInvoiceType_INSTALLMENT StripeRefundDestinationDetailsUSBankTransfer: properties: reference: description: The reference assigned to the refund. type: string reference_status: description: Status of the reference on the refund. This can be `pending`, `available` or `unavailable`. enum: - pending - available - unavailable type: string type: object InvoiceAdjustOverallDiscount: properties: discount: $ref: '#/components/schemas/BillingDiscount' reason: type: string type: object securitySchemes: APIKeyAuth: description: API Key for authorization in format of . in: header name: Authorization type: apiKey x-original-swagger-version: '2.0'