Saaslogic
  1. Subscriptions
Saaslogic
  • Introduction
  • Authentication
  • Enum Reference
  • 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
    • List all plans for a product
  • Subscriptions
    • Create a product subscription
      POST
    • Retrieve a subscription
      GET
    • Create Customer and Subscription
      POST
    • Subscription with details permissions, menus and features
      GET
    • The Saaslogic URL for creating subscription
      POST
  • 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.
    • Dectivate a vendor.
  • Attributes
    • Create a organization attribute and set the value
    • Retrieve a organization attribute
    • Create a user attribute
    • Update a user attribute
    • Get a user attribute
  • Invoices
    • subscriptions
      • Get the invoices
      • Get the invoices by subscription
    • payments
      • Mark the invoice payment status
    • Get the invoice details .
    • cancel the invoices
    • Send invoice as pdf with payment link.
    • Create an on-demand invoice
  1. Subscriptions

Create Customer and Subscription

POST
/customer-and-subscription
Subscriptions
Request Request Example
Shell
JavaScript
Java
Swift
curl --location --request POST 'https://api-sandbox.saaslogic.io/v1/customer-and-subscription' \
--header 'Authorization;' \
--header 'Accept: application/json' \
--header 'Content-Type: application/json' \
--data-raw '{
    "customerName": "Irma Medhurst II",
    "customerType": "BUSINESS",
    "isTaxExempted": false,
    "contacts": [
        {
            "firstName": "Michael",
            "lastName": "Hensley",
            "email": "info@adroit.io",
            "contactNumber": "1234567890",
            "countryCode": "IND",
            "contactId": "54674d18-aa04-4650-baf2-36479dafdb22",
            "isDefault": false
        },
        {
            "firstName": "Michael",
            "lastName": "Hensley",
            "email": "info@adroit.io",
            "contactNumber": "1234567890",
            "countryCode": "IND",
            "contactId": "54674d18-aa04-4650-baf2-36479dafdb22",
            "isDefault": false
        },
        {
            "firstName": "Michael",
            "lastName": "Hensley",
            "email": "info@adroit.io",
            "contactNumber": "1234567890",
            "countryCode": "IND",
            "contactId": "54674d18-aa04-4650-baf2-36479dafdb22",
            "isDefault": true
        }
    ],
    "customerId": "78674d19-bb04-4650-vff2-56478dafdb24",
    "exemptionReasonCode": "69",
    "exemptionNumber": "60",
    "addresses": [
        {
            "addressName": "Adroit Solutions",
            "address": "Akshya Nagar 1st Block 1st Cross, Rammurthy nagar, Bangalore",
            "countryCode": "IND",
            "stateCode": "KA",
            "city": "Bangalore",
            "zip": "560016",
            "addressId": "6c54f68f-1de4-4d72-b532-ae45658e4a15",
            "isDefault": true
        },
        {
            "addressName": "Adroit Solutions",
            "address": "Akshya Nagar 1st Block 1st Cross, Rammurthy nagar, Bangalore",
            "countryCode": "IND",
            "stateCode": "KA",
            "city": "Bangalore",
            "zip": "560016",
            "addressId": "6c54f68f-1de4-4d72-b532-ae45658e4a15",
            "isDefault": true
        },
        {
            "addressName": "Adroit Solutions",
            "address": "Akshya Nagar 1st Block 1st Cross, Rammurthy nagar, Bangalore",
            "countryCode": "IND",
            "stateCode": "KA",
            "city": "Bangalore",
            "zip": "560016",
            "addressId": "6c54f68f-1de4-4d72-b532-ae45658e4a15",
            "isDefault": true
        }
    ],
    "subscription": {
        "productId": "2a9d72c5-1c78-4b1b-bd12-4f4d76e9c2b7",
        "planId": "d6f7e5a1-3c47-4a78-9b23-67f3e2d5a4b8",
        "billingFrequencyId": "9f8b7a6c-5d4e-4c3b-8a2b-1f0d9e7c6a5b",
        "subscriptionId": "7a3e2b1c-8d4f-5a6b-9f0e-2c7d1a4b3c8d",
        "subscriptionStartDate": "2025-03-18T00:00:00",
        "billingCycleStartDate": "2025-03-01T00:00:00",
        "isAutoRenewEnabled": false,
        "subscriptionAttributes": [
            {
                "attributeName": "Contract Type",
                "attributeValue": "Annual"
            }
        ],
        "resourceQuantities": [
            {
                "resourceId": "5d2b3a1e-8c4f-6b7a-9f0e-2c1d4a3b8c7d",
                "quantity": "200"
            }
        ],
        "addons": [
            {
                "addonId": "3e7a2b1c-9d4f-5a6b-0f1e-2c7d8a4b3c8d",
                "addonName": "Raymond Weber",
                "billingFrequencyId": "f7a6b5c4-d3e2-1f0e-9b8d-2c7a4b3c8d5e",
                "billingFrequencyName": "Monthly",
                "resourceName": "Backup Storage",
                "quantity": "50",
                "resourceUOMId": "cupidatat in esse officia",
                "resourceUOMName": "GB"
            },
            {
                "addonId": "3e7a2b1c-9d4f-5a6b-0f1e-2c7d8a4b3c8d",
                "addonName": "Peggy Hintz",
                "billingFrequencyId": "f7a6b5c4-d3e2-1f0e-9b8d-2c7a4b3c8d5e",
                "billingFrequencyName": "Monthly",
                "resourceName": "Backup Storage",
                "quantity": "50",
                "resourceUOMId": "aliquip",
                "resourceUOMName": "GB"
            }
        ],
        "isTrail": false,
        "couponCode": "SAVE20",
        "isGenerateInvoiceForCurrentCycle": true
    }
}'
Response Response Example
200 - Successfully Created!
CUSTOMER_CREATED_AND_SUBSCRIPTION_INITIATED_SUCCESSFULLY

Request

Header Params
Authorization
string 
required
Saaslogic authorization token
Default:
Bearer {{bearerToken}}
Content-Type
string 
optional
Default:
application/json
Accept
string 
optional
Default:
application/json
Body Params application/json
customerName
string 
required
The name of the customer.
Example:
Adroit Solutions
customerType
enum<string> 
required
The type of customer, either 'BUSINESS' or 'INDIVIDUAL'.
Allowed values:
BUSINESSINDIVIDUAL
Example:
BUSINESS
isTaxExempted
boolean 
required
Indicates whether the customer is exempt from taxes.
contacts
array[object (CustomerContact) {7}] 
optional
A list of contacts associated with the customer.
firstName
string 
required
The first name of the contact person.
Example:
Michael
lastName
string 
required
The last name of the contact person.
Example:
Hensley
email
string <email>
required
The email address of the contact person. Must be a valid email format.
Example:
info@adroit.io
contactNumber
string 
required
The phone number of the contact person.
Example:
1234567890
countryCode
enum<string> 
required
The country code of the contact person's location.
Allowed values:
USAINDAUSCHNCHLKHMCANGBRKENBRAMWIVNMARETURESPPHLPERPAKNGANZLNLDMEXJORJPNIDNDEUETHDNKCUBCRIBOLBELARGBGDAUT
Example:
IND
contactId
string 
optional
A unique identifier for the contact.
Example:
54674d18-aa04-4650-baf2-36479dafdb22
isDefault
boolean 
optional
Indicates whether this is the default contact.
customerId
string 
optional
The unique identifier of the customer.
exemptionReasonCode
enum<string> 
required
The code indicating the reason for tax exemption.
💡
Field is Required when isTaxExempted is true
Allowed values:
ABCDEFGHIJKLMNOPQR
Example:
R
exemptionNumber
string 
optional
The tax exemption number associated with the customer.
💡
Field is Required when isTaxExempted is true
addresses
array[object (CustomerAddress) {8}] 
required
A list of addresses associated with the customer.
addressName
string 
required
The name associated with the address, such as a company name or building name.
Example:
Adroit Solutions
address
string 
required
The detailed street address including house number, street name, and locality.
Example:
Akshya Nagar 1st Block 1st Cross, Rammurthy nagar, Bangalore
countryCode
string 
required
The ISO 3166-1 alpha-3 country code representing the country.
Example:
IND
stateCode
string 
required
The state or province code as per ISO 3166-2.
Example:
KA
city
string 
required
The name of the city or town where the address is located.
Example:
Bangalore
zip
string 
required
The postal or ZIP code of the address location.
Example:
560016
addressId
string 
optional
A unique identifier for the address record.
Example:
6c54f68f-1de4-4d72-b532-ae45658e4a15
isDefault
boolean 
optional
Indicates whether this address is the default address for the entity.
subscription
object 
required
productId
string 
required
The ID of the Product
Example:
2a9d72c5-1c78-4b1b-bd12-4f4d76e9c2b7
planId
string 
required
The ID of the Plan
Example:
d6f7e5a1-3c47-4a78-9b23-67f3e2d5a4b8
billingFrequencyId
string 
required
The ID of the Billing Frequency
Example:
9f8b7a6c-5d4e-4c3b-8a2b-1f0d9e7c6a5b
subscriptionId
string 
optional
The ID of the Subscription
Example:
7a3e2b1c-8d4f-5a6b-9f0e-2c7d1a4b3c8d
subscriptionStartDate
string <yyyy-MM-dd'T'HH:mm:ss>
optional
The start date of the subscription
Example:
2025-03-18T00:00:00
billingCycleStartDate
string <yyyy-MM-dd'T'HH:mm:ss>
optional
The start date of the billing cycle. This filed is only applicable to backdated subscription.
Example:
2025-03-01T00:00:00
isAutoRenewEnabled
boolean 
optional
Indicates whether the subscription is set to auto-renew (true/false)
subscriptionAttributes
array [object {2}] 
optional
List of attributes and their values associated with the subscription
resourceQuantities
array [object {2}] 
optional
List of resources and their quantities associated with the subscription
addons
array [object {1}] 
optional
List of addons associated with the subscription
isTrail
boolean 
optional
Indicates whether the subscription is a trial (true/false)
Default:
false
couponCode
string 
write-onlyoptional
The coupon code applied to the subscription, if any
Example:
SAVE20
isGenerateInvoiceForCurrentCycle
boolean 
write-onlyoptional
Indicates whether the subscription need to generate invoice (true/false). This field is only applicable to backdated subscription
Default:
false
Examples

Responses

🟢200Successfully Created!
text/plain
Body
object {0}
🔴500ErrorResponse
Previous
Retrieve a subscription
Next
Subscription with details permissions, menus and features
Built with