curl --request GET \
--url https://api.togai.com/invoices/{invoice_id} \
--header 'Authorization: Bearer <token>'{
"id": "inv.hkgkgyh.ghg",
"sequenceId": "2020-07-2958",
"customerId": "7VcRw9xZDIqsC5E",
"ownerId": "ACC001",
"usageInfo": [
{
"description": "rides - local",
"type": "USAGE_METER_USAGE",
"value": 15,
"units": "USAGE_UNITS"
},
{
"description": "rides - pro",
"type": "USAGE_METER_USAGE",
"value": 5,
"units": "USAGE_UNITS"
}
],
"revenueInfo": {
"description": "Grand Total Amount",
"type": "GRAND_TOTAL_AMOUNT",
"units": "USD",
"value": 881.94,
"lineItems": [
{
"description": "Total Amount",
"type": "TOTAL_AMOUNT",
"units": "USD",
"value": 881.94,
"lineItems": [
{
"description": "Total amount due",
"type": "NET_AMOUNT",
"units": "USD",
"value": 881.94,
"lineItems": [
{
"description": "Sum Total",
"type": "GROSS_AMOUNT",
"units": "USD",
"value": 981.94,
"lineItems": [
{
"description": "Payout_NEFT",
"type": "USAGE_RATE_CARD_AMOUNT",
"units": "USD",
"value": 392.1,
"lineItems": [
{
"description": "Slab 1",
"type": "USAGE_RATE_CARD_SLAB_AMOUNT",
"valuePerQuantity": 0.001,
"quantity": 10000,
"units": "USD",
"value": 10
},
{
"description": "Slab 2",
"type": "USAGE_RATE_CARD_SLAB_AMOUNT",
"valuePerQuantity": 0.001,
"quantity": 10000,
"units": "USD",
"value": 10
}
]
},
{
"description": "Payout IMPS",
"type": "USAGE_RATE_CARD_AMOUNT",
"valuePerQuantity": 0.001,
"quantity": 32109,
"units": "USD",
"value": 589.94,
"lineItems": [
{
"description": "Slab 1",
"type": "USAGE_RATE_CARD_SLAB_AMOUNT",
"valuePerQuantity": 0.001,
"quantity": 10000,
"units": "USD",
"value": 10
},
{
"description": "Slab 2",
"type": "USAGE_RATE_CARD_SLAB_AMOUNT",
"valuePerQuantity": 0.001,
"quantity": 10000,
"units": "USD",
"value": 10
}
]
}
]
}
]
}
]
}
]
},
"invoiceDetails": {
"customer": {
"name": "John Doe",
"primaryEmail": "[email protected]",
"address": {
"line1": "2281 Broadway Street",
"line2": "G-31",
"postalCode": "29501",
"city": "Florence",
"state": "South Carolina",
"country": "US"
}
},
"account": {
"name": "Togai",
"address": {
"line1": "2281 Broadway Street",
"line2": "G-31",
"postalCode": "29501",
"city": "Florence",
"state": "South Carolina",
"country": "US"
},
"primaryEmail": "[email protected]",
"invoiceCurrency": "USD"
},
"pricePlanName": "Togai Basic"
},
"totalAmount": 881.94,
"paidAmount": 0,
"invoiceClass": "INVOICE",
"invoiceType": "STANDARD",
"status": "DUE",
"finalizingStatus": "FINALIZED",
"startDate": "2020-07-04T12:00:00.000Z",
"endDate": "2020-08-04T12:00:00.000Z",
"invoiceDate": "2020-08-04T12:00:00.000Z",
"generatedAt": "2020-08-04T12:00:00.000Z",
"updatedAt": "2020-08-04T12:00:00.000Z"
}Get invoice
curl --request GET \
--url https://api.togai.com/invoices/{invoice_id} \
--header 'Authorization: Bearer <token>'{
"id": "inv.hkgkgyh.ghg",
"sequenceId": "2020-07-2958",
"customerId": "7VcRw9xZDIqsC5E",
"ownerId": "ACC001",
"usageInfo": [
{
"description": "rides - local",
"type": "USAGE_METER_USAGE",
"value": 15,
"units": "USAGE_UNITS"
},
{
"description": "rides - pro",
"type": "USAGE_METER_USAGE",
"value": 5,
"units": "USAGE_UNITS"
}
],
"revenueInfo": {
"description": "Grand Total Amount",
"type": "GRAND_TOTAL_AMOUNT",
"units": "USD",
"value": 881.94,
"lineItems": [
{
"description": "Total Amount",
"type": "TOTAL_AMOUNT",
"units": "USD",
"value": 881.94,
"lineItems": [
{
"description": "Total amount due",
"type": "NET_AMOUNT",
"units": "USD",
"value": 881.94,
"lineItems": [
{
"description": "Sum Total",
"type": "GROSS_AMOUNT",
"units": "USD",
"value": 981.94,
"lineItems": [
{
"description": "Payout_NEFT",
"type": "USAGE_RATE_CARD_AMOUNT",
"units": "USD",
"value": 392.1,
"lineItems": [
{
"description": "Slab 1",
"type": "USAGE_RATE_CARD_SLAB_AMOUNT",
"valuePerQuantity": 0.001,
"quantity": 10000,
"units": "USD",
"value": 10
},
{
"description": "Slab 2",
"type": "USAGE_RATE_CARD_SLAB_AMOUNT",
"valuePerQuantity": 0.001,
"quantity": 10000,
"units": "USD",
"value": 10
}
]
},
{
"description": "Payout IMPS",
"type": "USAGE_RATE_CARD_AMOUNT",
"valuePerQuantity": 0.001,
"quantity": 32109,
"units": "USD",
"value": 589.94,
"lineItems": [
{
"description": "Slab 1",
"type": "USAGE_RATE_CARD_SLAB_AMOUNT",
"valuePerQuantity": 0.001,
"quantity": 10000,
"units": "USD",
"value": 10
},
{
"description": "Slab 2",
"type": "USAGE_RATE_CARD_SLAB_AMOUNT",
"valuePerQuantity": 0.001,
"quantity": 10000,
"units": "USD",
"value": 10
}
]
}
]
}
]
}
]
}
]
},
"invoiceDetails": {
"customer": {
"name": "John Doe",
"primaryEmail": "[email protected]",
"address": {
"line1": "2281 Broadway Street",
"line2": "G-31",
"postalCode": "29501",
"city": "Florence",
"state": "South Carolina",
"country": "US"
}
},
"account": {
"name": "Togai",
"address": {
"line1": "2281 Broadway Street",
"line2": "G-31",
"postalCode": "29501",
"city": "Florence",
"state": "South Carolina",
"country": "US"
},
"primaryEmail": "[email protected]",
"invoiceCurrency": "USD"
},
"pricePlanName": "Togai Basic"
},
"totalAmount": 881.94,
"paidAmount": 0,
"invoiceClass": "INVOICE",
"invoiceType": "STANDARD",
"status": "DUE",
"finalizingStatus": "FINALIZED",
"startDate": "2020-07-04T12:00:00.000Z",
"endDate": "2020-08-04T12:00:00.000Z",
"invoiceDate": "2020-08-04T12:00:00.000Z",
"generatedAt": "2020-08-04T12:00:00.000Z",
"updatedAt": "2020-08-04T12:00:00.000Z"
}Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
"ACC001"
Response for Get invoice requests
Structure of invoice
Identifier of invoice
50Status of the invoice
DRAFT, DUE, PAID, VOID, UN_COLLECTIBLE, REFUND_INITIATED, REFUND_COMPLETED, MERGED, PARTIALLY_PAID "DUE"
Represents the class of entity( INVOICE/ORDER/BILLABLE)
INVOICE, ORDER, BILLABLE "INVOICE"
Represents the type of entity(STANDARD/AD_HOC/COMPOSITE)
STANDARD, AD_HOC, CUSTOM, COMPOSITE, STANDARD_ADVANCED, ADHOC_ADVANCED Invoice date of the invoice
"2020-07-04T12:00:00.000Z"
Number of days from the invoice date after which an invoice is considered overdue.
Show child attributes
Type of the line item
TOTAL_USAGE, USAGE_METER_USAGE, GRAND_TOTAL_AMOUNT, TOTAL_AMOUNT, NET_AMOUNT, GROSS_AMOUNT, SUB_TOTAL_AMOUNT, PRICE_PLAN_AMOUNT, FIXED_FEE_RATE_CARD_AMOUNT, CREDIT_GRANT_RATE_CARD_AMOUNT, BILLING_ENTITLEMENT_RATE_CARD_AMOUNT, ENTITLEMENT_OVERAGE_RATE_CARD_AMOUNT, ENTITLEMENT_OVERAGE_RATE_CARD_SLAB_AMOUNT, LICENSE_RATE_CARD_AMOUNT, USAGE_CYCLE_AMOUNT, LICENSE_RATE_CARD_SLAB_AMOUNT, USAGE_RATE_CARD_AMOUNT, USAGE_RATE_CARD_SLAB_AMOUNT, TOTAL_CREDITS, SUB_CREDITS, TOTAL_ADVANCED_FEES, ADVANCED_FIXED_FEE, ADVANCED_LICENSE_RATE_CARD_AMOUNT, ADVANCED_BILLING_ENTITLEMENT_RATE_CARD_AMOUNT, ADVANCED_CREDIT_GRANT_RATE_CARD_AMOUNT, TOTAL_MISCELLANEOUS_CHARGES, MISCELLANEOUS_CHARGE, TRUE_UP_AMOUNT, TOTAL_PURCHASE_AMOUNT, CUSTOM_AMOUNT, CUSTOM_TAG, TOTAL_PRICING_RULE_ADDITION_AMOUNT, PRICING_RULE_ADDITION_AMOUNT, PRICING_RULE_REVENUE_UPDATE_AMOUNT, PRICING_RULE_USAGE_UPDATE_AMOUNT, RATE_CONFIG_ADJUSTMENT_AMOUNT, TOTAL_TAX_AMOUNT, TAX_AMOUNT, PROXY_AMOUNT Show child attributes
Type of the line item
TOTAL_USAGE, USAGE_METER_USAGE, GRAND_TOTAL_AMOUNT, TOTAL_AMOUNT, NET_AMOUNT, GROSS_AMOUNT, SUB_TOTAL_AMOUNT, PRICE_PLAN_AMOUNT, FIXED_FEE_RATE_CARD_AMOUNT, CREDIT_GRANT_RATE_CARD_AMOUNT, BILLING_ENTITLEMENT_RATE_CARD_AMOUNT, ENTITLEMENT_OVERAGE_RATE_CARD_AMOUNT, ENTITLEMENT_OVERAGE_RATE_CARD_SLAB_AMOUNT, LICENSE_RATE_CARD_AMOUNT, USAGE_CYCLE_AMOUNT, LICENSE_RATE_CARD_SLAB_AMOUNT, USAGE_RATE_CARD_AMOUNT, USAGE_RATE_CARD_SLAB_AMOUNT, TOTAL_CREDITS, SUB_CREDITS, TOTAL_ADVANCED_FEES, ADVANCED_FIXED_FEE, ADVANCED_LICENSE_RATE_CARD_AMOUNT, ADVANCED_BILLING_ENTITLEMENT_RATE_CARD_AMOUNT, ADVANCED_CREDIT_GRANT_RATE_CARD_AMOUNT, TOTAL_MISCELLANEOUS_CHARGES, MISCELLANEOUS_CHARGE, TRUE_UP_AMOUNT, TOTAL_PURCHASE_AMOUNT, CUSTOM_AMOUNT, CUSTOM_TAG, TOTAL_PRICING_RULE_ADDITION_AMOUNT, PRICING_RULE_ADDITION_AMOUNT, PRICING_RULE_REVENUE_UPDATE_AMOUNT, PRICING_RULE_USAGE_UPDATE_AMOUNT, RATE_CONFIG_ADJUSTMENT_AMOUNT, TOTAL_TAX_AMOUNT, TAX_AMOUNT, PROXY_AMOUNT Show child attributes
Show child attributes
billing address of the customer
Show child attributes
Contact number
Address line 1 (eg. Street, PO Box, Company Name)
Address line 2 (eg. apartment, suite, unit or building)
ZIP or postal code
City, district, suburb, town or village
State, county, province or region
Two letter country code ISO-3166-1 Alpha-2
Show child attributes
billing address of the customer
Show child attributes
Contact number
Address line 1 (eg. Street, PO Box, Company Name)
Address line 2 (eg. apartment, suite, unit or building)
ZIP or postal code
City, district, suburb, town or village
State, county, province or region
Two letter country code ISO-3166-1 Alpha-2
Show child attributes
billing address of the customer
Show child attributes
Contact number
Address line 1 (eg. Street, PO Box, Company Name)
Address line 2 (eg. apartment, suite, unit or building)
ZIP or postal code
City, district, suburb, town or village
State, county, province or region
Two letter country code ISO-3166-1 Alpha-2
Show child attributes
billing address of the customer
Show child attributes
Contact number
Address line 1 (eg. Street, PO Box, Company Name)
Address line 2 (eg. apartment, suite, unit or building)
ZIP or postal code
City, district, suburb, town or village
State, county, province or region
Two letter country code ISO-3166-1 Alpha-2
FINALIZING, FINALIZED true
Start date of the invoice
"2020-07-04T12:00:00.000Z"
End date of the invoice
"2020-07-04T12:00:00.000Z"
Inclusive end date of the invoice
"2020-07-03T11:59:59.999Z"
Due date of the invoice
"2020-07-04T12:00:00.000Z"
Sequence id of the invoice
Download URL of the pdf file corresponding to the invoice