1. Invoices
Saaslogic
  • Authentication
  • Introduction
  • Enum Reference
  • Products
    • Resources
      • Create Product Resource
    • Coupons
      • Withdraw Coupon
      • Publish Coupon
      • Create Coupon
      • Update Coupon
      • Get Coupon
      • Get Coupons
    • Configurations
      • Update Product Configurations
    • Create Product
    • Get Product
    • List all products
    • Update Product
  • Authentication
    • saaslogic token
      • Get the saaslogic access token
    • login Url
      • Gives the login URL
    • logout Url
      • Gives the logout URL
  • Countries
    • Get list of countries
  • Plans
    • Create Plan
    • Update Plan
    • Publish Plan
    • Get Plan
    • Get Plans
    • List all plans for a product
  • Subscriptions
    • Get Subscriptions
    • Change subscription plan
    • Cancel the subscription
    • Refund amount calculation
    • Create a product subscription
    • Retrieve a subscription
    • Create Customer and Subscription
    • Subscription with details permissions, menus and features
    • The Saaslogic URL for creating subscription
  • Usage Reporting
    • Report the resource usages in subscription for invoicing
    • Retrieves the resource usages of a subscription in the current billing cycle
  • Customers
    • addresses
      • Create an address
      • List all addresses
      • Update an address
      • Retrieve an address
      • Delete an address
    • contacts
      • Create a contact
      • List all contacts
      • Update a contact
      • Retrieve a contact
      • Delete a contact
    • Create a customer
    • List all customers
    • Update a customer
    • Retrieve a customer
    • Delete a customer
  • Vendors
    • vendor addresses
      • Create a vendor address.
      • List all vendor addresses.
      • Update a vendor address.
      • Retrieve a vendor address..
      • Delete a vendor address.
    • vendor contacts
      • Create a vendor contact.
      • List all vendor contacts.
      • Update a vendor contact.
      • Retrieve a vendor contact.
      • Delete a vendor contact.
    • vendor bills
      • Create a vendor bill
      • Cancel a vendor bill.
    • vendor bills payout
      • Update payment details to vendor bills.
    • Create a vendor
    • Update a vendor.
    • Activate a vendor.
    • Deactivate a vendor
  • Invoices
    • subscriptions
      • Get the invoices
      • Get the invoices by subscription
    • payments
      • Mark the invoice payment status
    • Approve the invoice
      PUT
    • Get Invoices
      POST
    • Refund amount calculation
      POST
    • Invoice Refund
      POST
    • Get the invoice details .
      GET
    • Cancel the invoice
      POST
    • Send invoice as pdf with payment link.
      POST
    • Create an on-demand invoice
      POST
  • States
    • Get list of states
  • Addons
    • Create Addon
    • Update Addon
    • Publish Addon
    • Get Addon
    • List all addons for a product
  • Submerchant
    • Create a submerchant
  • UOM
    • Create UOM
    • Update UOM
    • List UOMs
    • Get UOM
  • HostedPages
    • Disable Hosted Page
    • Enable Hosted Page
  • Configurations
    • Update Configurations
  • Integrations
    • Get Integrations
    • Update SMTP Integration
    • Save SMTP integration
  • Schemas
    • Invoice
      • InvoiceSubscriptionDTO
      • InvoiceInfo
      • InvoiceDetail
      • InvoiceProduct
      • InvoiceLineItemDTO
      • InvoicePayment
      • InvoiceAttributeDTO
      • InvoiceRequestDTO
      • InvoiceRequestProduct
      • InvoiceRequestLineItem
      • InvoiceRequestLineItemTax
      • InvoiceRequestDiscount
      • InvoicePaginatedResponse
      • InvoiceRefundCalculationRequest
      • InvoiceRefundCalculationResponse
    • Vendor
      • Vendor
      • VendorContact
      • VendorAddress
      • VendorBill
    • Subscriptions
      • SubscritpionPaginatedResponse
      • Subscription
      • ResourceQuantities
      • ChangeSubscriptionRequest
    • Pagination
      • PageRequest
      • SortCriteria
      • FilterCriteria
      • Pagination
      • InvoiceList
      • PageResponse
    • Plan
      • Plan
      • PlanSearchRequest
    • UOM
      • UOM
    • Product
      • ProductResource
      • AddonChargeDTO
      • AddonResourceDTO
      • ProductAddonDTO
      • ProductFeature
      • Product
      • Coupon
      • ProductAttribute
      • CouponSearchRequest
    • Integrations
      • SmtpIntegrationRequest
    • AccessTokenResponse
    • ProductAPIKey
    • Country
    • CustomerAddress
    • PaymentInfo
    • CustomerWithSubscription
    • State
    • Addon
    • Customer
    • ExternalCancelSubscriptionRequest
    • SubscriptionRefundCalculationRequest
    • SubscriptionRefundCalculationResponse
    • RefundBreakdownItem
    • CustomerContact
    • HostedPageAccessRequest
    • Submerchant
    • ProratedRefundDetails
    • IntegationInfo
  1. Invoices

Create an on-demand invoice

POST
/invoices/on-demand

Request

Header Params

Body Params application/json

Examples

Responses

🟢200Invoice creation initiated successfully
application/json
Bodyapplication/json

🔴500ErrorResponse
Request Request Example
Shell
JavaScript
Java
Swift
curl --location '/invoices/on-demand' \
--header 'Authorization: Bearer {{bearerToken}}' \
--header 'Accept: application/json' \
--header 'Content-Type: application/json' \
--data '{
    "customerId": "d90cc3a8-7cb3-11ef-a252-325096b39f47",
    "currencyISOCode": "USD",
    "products": [
        {
            "productId": "019232f7-34be-72dc-885f-2478a24303d5",
            "lineItems": [
                {
                    "description": "Premium subscription for one month",
                    "quantity": 1,
                    "unitPrice": 100,
                    "taxes": [
                        {
                            "description": "Sales Tax",
                            "taxValue": 5,
                            "isPercentage": true
                        }
                    ],
                    "discounts": [
                        {
                            "description": "Discount 5%",
                            "discountType": "Coupon",
                            "discountValue": 5,
                            "isPercentage": true
                        }
                    ]
                },
                {
                    "description": "Premium subscription for one month",
                    "quantity": 1,
                    "unitPrice": 100,
                    "taxes": [
                        {
                            "description": "Sales Tax",
                            "taxValue": 5,
                            "isPercentage": true
                        }
                    ],
                    "discounts": [
                        {
                            "description": "Discount 5%",
                            "discountType": "Coupon",
                            "discountValue": 5,
                            "isPercentage": true
                        }
                    ]
                }
            ],
            "taxes": [
                {
                    "description": "Sales Tax",
                    "taxValue": 5,
                    "isPercentage": true
                }
            ],
            "discounts": [
                {
                    "description": "Discount 5%",
                    "discountType": "Coupon",
                    "discountValue": 5,
                    "isPercentage": true
                }
            ]
        }
    ],
    "invoiceDate": "1970-10-17T00:00:00Z",
    "invoiceId": "46845e99-f8e4-41f6-9361-c7cfd5ef7559",
    "serviceAddressId": "333fb81c-63e5-4b05-a9d5-ab2a3caf814b",
    "billingAddressId": "1a47de01-3b89-4f10-bf6c-603d03986004",
    "invoiceAttributes": [
        {
            "attributeName": "shippingNumber",
            "attributeValue": "SH-34556"
        }
    ]
}'
Response Response Example
200 - Invoice creation initiated successfully
{
  "invoiceId": "46845e99-f8e4-41f6-9361-c7cfd5ef7559",
  "message": "Invoice creation initiated successfully."
}
Previous
Send invoice as pdf with payment link.
Next
Get list of states
Built with