Invoices
#
Creating a new invoiceUse this endpoint if you want to add a new invoice.
Method: POST
Endpoint: {{env}}/api/invoice
- Payload
- Response
Input parameters
Parameter | Type | Mandatory | Description |
---|---|---|---|
DaysToDueDate | int | yes | Days until due date |
GenerateAsDraft | boolean | no | Set to true if you want this invoice to be generated has a draft |
Memo | string | no | Memo that will be reflected on the transactions |
PaymentType | string | yes | Payment type operator |
UserId | guid | yes | Id for the user that will be charged for the invoice |
PaymentGateways | string[] | yes | Payment gateways through witch the invoice will be processed |
Items | ProductPrices that will be included on the invoice | ||
OneOffProductAmount | decimal | yes (if product price is One-Off) | Amount for each unit or package |
OneOffProductName | string | yes (if product price is One-Off) | Name for the one-off product |
ProductPriceId | guid | yes (if is a normal product) | Id for the product price |
Quantity | int | yes | Desired quantity for the product |
TaxRates | no | Tax rates that will be included on the invoice | |
Id | guid | no | Id for the tax rate |
Name | string | no | Name for the tax rate |
Description | string | no | Description for the tax rate |
Type | string | no | The type is "Exclusive" or "Inclusive" |
Value | int | no | The tax value in percentage |
ClassName | string | no | The class name value is "TaxRate" |
CommonFees | no | Fees that will be included on the invoice | |
Id | guid | no | Id for the common fee |
Name | string | no | Name for the common fee |
Description | string | no | Description for the common fee |
Value | int | no | The value for the common fee |
ClassName | string | no | The class name value is "CommonFee" |
PaymentType
Type | Behavior |
---|---|
AutomaticallyCharge | Automatically charge the user by initiating a transaction has soon as possible on the selected Rails |
NotifyUser | Email invoice to the user to pay manually |
PaymentGateway
Type | Behavior |
---|---|
Eft | Process through Eft |
Interac | Process through Interac |
VisaDirect | Process through VisaDirect |
CreditCard | Process through CreditCard |
info
If you are creating a invoice with the AutomaticallyCharge
Payment
Type you should inform only one Payment Gateway
Response
Parameter | Type | Description |
---|---|---|
Id | guid | Id for the invoice |
Amount | decimal | Total amount for the invoice |
CreatedAt | date | Creation date for the invoice |
CustomerId | guid | Id for the related customer |
DaysToDueDate | int | Days until due date from the creation date |
DueDate | date | Due date |
InvoiceStatus | string | Invoice status |
Memo | string | Memo that will be reflected on the transactions |
PaymentType | string | PaymentType Operator |
PaymentGateways | string[] | PaymentGateways Operator |
UserId | guid | Id for the user that is related to the invoice |
Customer | Basic Customer data | |
CompanyName | string | Company Name |
Id | guid | Id for the related customer |
User | Basic User data | |
FirstName | string | User first name |
LastName | string | User Last name |
CompanyName | string | User Company |
IsActive | boolean | Indicates if the user is active or not |
string | User email | |
Id | guid | Id for the user that is related to the invoice |
Items | ||
OneOffProductName | string | Name for the one-off product |
OneOffProductAmount | decimal | Amount for each unit or package |
Quantity | int | Quantity for the product price |
Currency | string | Currency set for the product price |
Price | decimal | Price amount for each unit or package |
ProductPriceId | guid | Id for the related product price |
ProductPrice | Product price related to product | |
Id | string | The Id for the product price |
ProductId | string | The Id for the product on witch is related |
CreatedAt | date | Creation date |
ProductPriceType | string | Price Model |
ProductPriceStatus | string | Status for the product price |
Price | decimal | Price |
PerUnit | string | Package size |
Frequency | string | Price frequency |
EnableFreeTrial | bool | Enable free trial feature |
FreeTrialInDays | int | Number of days for free trial |
EnableSetupFee | bool | Enable setup fee |
SetupFee | decimal | Number of days for free trial |
Currency | string | Currency set for the product price |
Product | Product related to product price | |
Id | guid | Id for the Product |
Name | string | Product name |
Description | string | Product Description |
ProductStatus | string | Product status |
CustomerId | guid | Id for the related customer |
Transactions | Transactions related to the invoice | |
Id | guid | Id for the transaction |
Amount | decimal | Total amount for the transaction |
Comment | string | Comment fo the transaction |
CreatedAt | date | Creation date for the transaction |
From | string | From description for the transaction |
InvoiceId | guid | Id for the related Invoice |
IsRefundable | boolean | Indicates if the transaction is IsRefundable |
Memo | string | Memo for the transaction |
To | string | To description for the transaction |
TransactionMethod | string | Transaction method for the transaction |
TransactionStatus | string | Status for the transaction |
ZumRailsType | string | ZumRailsType Operator for the transaction |
TaxRates | Tax rates that will be included on the invoice | |
Id | guid | Id for the tax rate |
Name | string | Name for the tax rate |
Description | string | Description for the tax rate |
Type | string | The type is "Exclusive" or "Inclusive" |
Value | int | The tax value in percentage |
ClassName | string | The class name value is "TaxRate" |
CommonFees | Fees that will be included on the invoice | |
Id | guid | Id for the common fee |
Name | string | Name for the common fee |
Description | string | Description for the common fee |
Value | int | The value for the common fee |
ClassName | string | The class name value is "CommonFee" |
info
More info about transactions can be found here
#
Update a invoiceUse this endpoint if you want to update a invoice.
Method: PUT
Endpoint: {{env}}/api/invoice/{{invoice_id}}
caution
You can only update invoices that have Draft
status
- Payload
- Response
Input parameters
Parameter | Type | Mandatory | Description |
---|---|---|---|
DaysToDueDate | int | yes | Days until due date |
GenerateAsDraft | boolean | no | Set to true if you want this invoice to be generated has a draft |
Memo | string | no | Memo that will be reflected on the transactions |
PaymentType | string | yes | Payment type operator |
UserId | guid | yes | Id for the user that will be charged for the invoice |
PaymentGateways | string[] | yes | Payment gateways through witch the invoice will be processed |
Items | ProductPrices that will be included on the invoice | ||
OneOffProductAmount | decimal | yes (if product price is One-Off) | Amount for each unit or package |
OneOffProductName | string | yes (if product price is One-Off) | Name for the one-off product |
ProductPriceId | guid | yes (if is a normal product) | Id for the product price |
Quantity | int | yes | Desired quantity for the product |
TaxRates | no | Tax rates that will be included on the invoice | |
Id | guid | no | Id for the tax rate |
Name | string | no | Name for the tax rate |
Description | string | no | Description for the tax rate |
Type | string | no | The type is "Exclusive" or "Inclusive" |
Value | int | no | The tax value in percentage |
ClassName | string | no | The class name value is "TaxRate" |
CommonFees | no | Fees that will be included on the invoice | |
Id | guid | no | Id for the common fee |
Name | string | no | Name for the common fee |
Description | string | no | Description for the common fee |
Value | int | no | The value for the common fee |
ClassName | string | no | The class name value is "CommonFee" |
info
If you are creating a invoice with the AutomaticallyCharge
Payment
Type you should inform only one Payment Gateway
Response
Parameter | Type | Description |
---|---|---|
Id | guid | Id for the invoice |
Amount | decimal | Total amount for the invoice |
CreatedAt | date | Creation date for the invoice |
CustomerId | guid | Id for the related customer |
DaysToDueDate | int | Days until due date from the creation date |
DueDate | date | Due date |
InvoiceStatus | string | Invoice status |
Memo | string | Memo that will be reflected on the transactions |
PaymentType | string | PaymentType Operator |
PaymentGateways | string[] | PaymentGateways Operator |
UserId | guid | Id for the user that is related to the invoice |
Customer | Basic Customer data | |
CompanyName | string | Company Name |
Id | guid | Id for the related customer |
User | Basic User data | |
FirstName | string | User first name |
LastName | string | User Last name |
CompanyName | string | User Company |
IsActive | boolean | Indicates if the user is active or not |
string | User email | |
Id | guid | Id for the user that is related to the invoice |
Items | ||
OneOffProductName | string | Name for the one-off product |
OneOffProductAmount | decimal | Amount for each unit or package |
Quantity | int | Quantity for the product price |
Currency | string | Currency set for the product price |
Price | decimal | Price amount for each unit or package |
ProductPriceId | guid | Id for the related product price |
ProductPrice | Product price related to product | |
Id | string | The Id for the product price |
ProductId | string | The Id for the product on witch is related |
CreatedAt | date | Creation date |
ProductPriceType | string | Price Model |
ProductPriceStatus | string | Status for the product price |
Price | decimal | Price |
PerUnit | string | Package size |
Frequency | string | Price frequency |
EnableFreeTrial | bool | Enable free trial feature |
FreeTrialInDays | int | Number of days for free trial |
EnableSetupFee | bool | Enable setup fee |
SetupFee | decimal | Number of days for free trial |
Currency | string | Currency set for the product price |
Product | Product related to product price | |
Id | guid | Id for the Product |
Name | string | Product name |
Description | string | Product Description |
ProductStatus | string | Product status |
CustomerId | guid | Id for the related customer |
Transactions | Transactions related to the invoice | |
Id | guid | Id for the transaction |
Amount | decimal | Total amount for the transaction |
Comment | string | Comment fo the transaction |
CreatedAt | date | Creation date for the transaction |
From | string | From description for the transaction |
InvoiceId | guid | Id for the related Invoice |
IsRefundable | boolean | Indicates if the transaction is IsRefundable |
Memo | string | Memo for the transaction |
To | string | To description for the transaction |
TransactionMethod | string | Transaction method for the transaction |
TransactionStatus | string | Status for the transaction |
ZumRailsType | string | ZumRailsType Operator for the transaction |
TaxRates | Tax rates that will be included on the invoice | |
Id | guid | Id for the tax rate |
Name | string | Name for the tax rate |
Description | string | Description for the tax rate |
Type | string | The type is "Exclusive" or "Inclusive" |
Value | int | The tax value in percentage |
ClassName | string | The class name value is "TaxRate" |
CommonFees | Fees that will be included on the invoice | |
Id | guid | Id for the common fee |
Name | string | Name for the common fee |
Description | string | Description for the common fee |
Value | int | The value for the common fee |
ClassName | string | The class name value is "CommonFee" |
#
Get a specific invoiceUse this endpoint if you want to get all the information for a specific invoice.
Method: GET
Endpoint: {{env}}/api/invoice/{{invoice_id}}
- Response
Response
Parameter | Type | Description |
---|---|---|
Id | guid | Id for the invoice |
Amount | decimal | Total amount for the invoice |
CreatedAt | date | Creation date for the invoice |
CustomerId | guid | Id for the related customer |
DaysToDueDate | int | Days until due date from the creation date |
DueDate | date | Due date |
InvoiceStatus | string | Invoice status |
Memo | string | Memo that will be reflected on the transactions |
PaymentType | string | PaymentType Operator |
PaymentGateways | string[] | PaymentGateways Operator |
UserId | guid | Id for the user that is related to the invoice |
Customer | Basic Customer data | |
CompanyName | string | Company Name |
Id | guid | Id for the related customer |
User | Basic User data | |
FirstName | string | User first name |
LastName | string | User Last name |
CompanyName | string | User Company |
IsActive | boolean | Indicates if the user is active or not |
string | User email | |
Id | guid | Id for the user that is related to the invoice |
Items | ||
OneOffProductName | string | Name for the one-off product |
OneOffProductAmount | decimal | Amount for each unit or package |
Quantity | int | Quantity for the product price |
Currency | string | Currency set for the product price |
Price | decimal | Price amount for each unit or package |
ProductPriceId | guid | Id for the related product price |
ProductPrice | Product price related to product | |
Id | string | The Id for the product price |
ProductId | string | The Id for the product on witch is related |
CreatedAt | date | Creation date |
ProductPriceType | string | Price Model |
ProductPriceStatus | string | Status for the product price |
Price | decimal | Price |
PerUnit | string | Package size |
Frequency | string | Price frequency |
EnableFreeTrial | bool | Enable free trial feature |
FreeTrialInDays | int | Number of days for free trial |
EnableSetupFee | bool | Enable setup fee |
SetupFee | decimal | Number of days for free trial |
Currency | string | Currency set for the product price |
Product | Product related to product price | |
Id | guid | Id for the Product |
Name | string | Product name |
Description | string | Product Description |
ProductStatus | string | Product status |
CustomerId | guid | Id for the related customer |
Transactions | Transactions related to the invoice | |
Id | guid | Id for the transaction |
Amount | decimal | Total amount for the transaction |
Comment | string | Comment fo the transaction |
CreatedAt | date | Creation date for the transaction |
From | string | From description for the transaction |
InvoiceId | guid | Id for the related Invoice |
IsRefundable | boolean | Indicates if the transaction is IsRefundable |
Memo | string | Memo for the transaction |
To | string | To description for the transaction |
TransactionMethod | string | Transaction method for the transaction |
TransactionStatus | string | Status for the transaction |
ZumRailsType | string | ZumRailsType Operator for the transaction |
#
Search a invoiceThis endpoint will return products based on the filter informed. Products are returned with pagination, which means that if you need to retrieve all products you need to call the same endpoint incrementing the CurrentPage.
Method: POST
Endpoint: {{env}}/api/invoice/filter
- Payload
- Response
Input parameters
Parameter | Type | Mandatory | Description |
---|---|---|---|
GenericSearch | string | no | Filter invoices by user name, user email or invoice id |
InvoiceStatus | string | no | Invoice Status |
CreatedAt | datetime | no | Create date |
CreatedAtOperator | string | no | Operator to filter with CreatedAt properties |
DueDate | datetime | no | Due date |
DueDateOperator | string | no | Operator to filter with DueDate properties |
UserName | string | no | Username value |
UserNameOperator | string | no | Username Operator |
Pagination | no | ||
PageNumber | number | no | The respective page, starting at 1 |
ItemsPerPage | number | no | The quantity of items per page |
Response
Parameter | Type | Description |
---|---|---|
CurrentPage | number | The current page |
PageSize | number | The amount of rows returned in the current page |
TotalCount | number | The total rows the filter returns |
Items | List of invoices | |
Id | guid | The invoice Id |
Amount | decimal | Total amount for the invoice |
CreatedAt | date | Creation date for the invoice |
DueDate | date | Due date |
InvoiceStatus | string | Invoice status |
ProductName | string | Name for the product related to invoice |
User | User related to the invoice | |
FirstName | string | User first name |
LastName | string | User last name |
CompanyName | string | User Company |
string | User email | |
Id | guid | Id for the related user |
IsActive | boolean | Indicates if the user is active or not |
tip
If you need to search for a specific invoice, we recommend that you retrieve the invoice id and then use the GET specific invoice endpoint to retrieve the detailed information about the invoice.
#
Get invoice eventsUse this endpoint if you want to get all the invoice events related to a specific invoice.
Method: GET
Endpoint: {{env}}/api/invoice/getinvoiceevents/{{invoice_id}}
- Response
Response
A list of:
Parameter | Type | Description |
---|---|---|
InvoiceId | guid | Id for the invoice |
CreatedAt | date | Creation date for the invoice event |
Description | string | User friendly description for the event |
Type | string | Event Type |
Invoice Event Type
Type | Behavior |
---|---|
Created | Invoice was created |
Edited | Invoice was edited |
SentToCustomer | Invoice was sended to customer |
StatusChanged | Invoice status was changed |
SentToUserWithForm | Invoice was sended to user (email of phone) |
TransactionStatusChanged | Status for a transaction related to the invoice was changed |
#
Modify invoice statusUse this endpoint if you want to get all the invoice events related to a specific invoice.
Method: PATCH
Endpoint: {{env}}/api/invoice/changeinvoicestatus/{{invoice_id}}
info
Only invoices that have status Draft
or Open
can be changed through
this method
- Response
Invoice Status
Type | Description |
---|---|
Paid | Invoice is paid |
Void | Invoice is voided |
Uncollectible | Invoice is uncollectible but can still be paid |
Open | Invoice is open |
Input parameters
Parameter | Type | Mandatory | Description |
---|---|---|---|
Status | string | yes | Status operator for invoice |
Response
Parameter | Type | Description |
---|---|---|
Id | guid | Id for the invoice |
Amount | decimal | Total amount for the invoice |
CreatedAt | date | Creation date for the invoice |
CustomerId | guid | Id for the related customer |
DaysToDueDate | int | Days until due date from the creation date |
DueDate | date | Due date |
InvoiceStatus | string | Invoice status |
Memo | string | Memo that will be reflected on the transactions |
PaymentType | string | PaymentType Operator |
PaymentGateways | string[] | PaymentGateways Operator |
UserId | guid | Id for the user that is related to the invoice |
Customer | Basic Customer data | |
CompanyName | string | Company Name |
Id | guid | Id for the related customer |
User | Basic User data | |
FirstName | string | User first name |
LastName | string | User Last name |
CompanyName | string | User Company |
IsActive | boolean | Indicates if the user is active or not |
string | User email | |
Id | guid | Id for the user that is related to the invoice |
Items | ||
OneOffProductName | string | Name for the one-off product |
OneOffProductAmount | decimal | Amount for each unit or package |
Quantity | int | Quantity for the product price |
Currency | string | Currency set for the product price |
Price | decimal | Price amount for each unit or package |
ProductPriceId | guid | Id for the related product price |
ProductPrice | Product price related to product | |
Id | string | The Id for the product price |
ProductId | string | The Id for the product on witch is related |
CreatedAt | date | Creation date |
ProductPriceType | string | Price Model |
ProductPriceStatus | string | Status for the product price |
Price | decimal | Price |
PerUnit | string | Package size |
Frequency | string | Price frequency |
EnableFreeTrial | bool | Enable free trial feature |
FreeTrialInDays | int | Number of days for free trial |
EnableSetupFee | bool | Enable setup fee |
SetupFee | decimal | Number of days for free trial |
Currency | string | Currency set for the product price |
Product | Product related to product price | |
Id | guid | Id for the Product |
Name | string | Product name |
Description | string | Product Description |
ProductStatus | string | Product status |
CustomerId | guid | Id for the related customer |
Transactions | Transactions related to the invoice | |
Id | guid | Id for the transaction |
Amount | decimal | Total amount for the transaction |
Comment | string | Comment fo the transaction |
CreatedAt | date | Creation date for the transaction |
From | string | From description for the transaction |
InvoiceId | guid | Id for the related Invoice |
IsRefundable | boolean | Indicates if the transaction is IsRefundable |
Memo | string | Memo for the transaction |
To | string | To description for the transaction |
TransactionMethod | string | Transaction method for the transaction |
TransactionStatus | string | Status for the transaction |
ZumRailsType | string | ZumRailsType Operator for the transaction |