Introduction
The Rotessa API allows access to the core Rotessa platform. The endpoints allow you to manage customers and transactions in the Rotessa system. Typical use of the API is as follows:
- Obtain access to the API by generating an API key.
- Create a customer for which you would like to withdraw funds.
- For each customer create a transaction schedule, which specifies the amount and frequency of fund withdrawals. Transaction schedules generate financial transactions, which are the individual transaction results of a schedule.
- Query the status of your transactions via the transaction report to determine payment success or failure.
Authentication
Rotessa uses API keys to allow access to the API. API keys are unique tokens used by the API, placed in the request header that grant access to your Rotessa resources.
The Rotessa API is located at https://api.rotessa.com/v1. The URL for our test environment is https://sandbox-api.rotessa.com/v1.
Access to the test environment can be granted by signing up at sandbox.rotessa.com. Once signed up, email [email protected] with your username to get your sandbox account approved and to gain access to the API.
Generate an API Key
To authorize, use this code:
# With shell, you can just pass the correct header with each request
curl "<rotessa_endpoint>/customers" -H "Authorization: Token token=\"<your_api_key>\""
Make sure to replace
your_api_key
with your API key.
Access the API Keys from your Rotessa admin portal.
Existing API keys can be revoked and generated. Click Create API Key
.
Rotessa expects for the API key to be included in all API requests to the server in a header that looks like the following:
Token token="your_api_key"
Customers
Customers represent individual customer accounts from which you wish to withdraw funds.
Field | Description |
---|---|
id | ID of the customer. |
custom_identifier | Your own unique customer identifier |
name | Full name of customer |
Customer email address | |
customer_type | "Personal" or "Business" |
home_phone | Home phone number |
phone | Phone number |
bank_name | Bank name |
institution_number | Bank institution number for Canadian customers |
transit_number | Bank transit number for Canadian customers |
bank_account_type | "Savings" or "Checking" for American customers |
authorization_type | "In Person" or "Online" |
routing_number | Bank routing number for American customers |
account_number | Bank account number |
address | Customer address |
transaction_schedules | A list of transaction schedule objects describing the customer’s payment schedules |
financial_transactions | A list of financial transactions that have occurred for a customer |
Get All Customers
curl "<rotessa_endpoint>/customers" -H "Authorization: Token token=\"<api_key>\""
The above command returns JSON structured like this:
[
{
"active": true,
"bank_name": "Scotiabank",
"created_at": "2015-02-10T23:50:45.000-06:00",
"custom_identifier": "Mikey",
"customer_type": "Personal",
"email": "[email protected]",
"home_phone": "(204) 555 4444",
"id": 1,
"identifier": "MikeSmith0001",
"name": "Mike Smith",
"phone": "(204) 555 5555",
"updated_at": "2015-04-24T15:56:23.000-05:00"
},
{
"active": true,
"bank_name": "Royal Bank",
"created_at": "2015-02-10T23:50:45.000-06:00",
"custom_identifier": "Suze-44",
"customer_type": "Business",
"email": "[email protected]",
"home_phone": "(204) 111 4321",
"id": 2,
"identifier": "SUSANJO0002",
"name": "Susan Johnson",
"phone": "(204) 111 1234",
"updated_at": "2015-02-10T23:50:45.000-06:00"
}
]
This endpoint retrieves all customers.
HTTP REQUEST
GET https://api.rotessa.com/v1/customers
Get a Specific Customer Based on Rotessa ID
curl "<rotessa_endpoint>/customers/<id>" -H "Authorization: Token token=\"<api_key>\""
The above command returns JSON structured like this:
{
"account_number": "11111111"
"active": true,
"address": {
"address_1": "123 Main Street",
"address_2": "Unit 4",
"city": "Toronto",
"id": 5,
"postal_code": "M1B 0B7",
"province_code": "ON"
},
"authorization_type": null,
"bank_account_type": null,
"bank_name": "Scotiabank",
"created_at": "2015-02-10T23:50:45.000-06:00",
"custom_identifier": "Mikey",
"customer_type": "Personal",
"email": "[email protected]",
"financial_transactions": [],
"home_phone": "(204) 555 5555",
"id": 1,
"identifier": "Mikey",
"institution_number": "111",
"name": "Mike Smith",
"phone": "(204) 555 4444",
"routing_number": "",
"transaction_schedules": [],
"transit_number": "11111",
"updated_at": "2015-02-10T23:50:45.000-06:00"
}
{
"account_number": "11111111"
"active": true,
"address": {
"address_1": "123 Main Street",
"address_2": "Unit 4",
"city": "Birmingham",
"id": 114397,
"postal_code": "36016",
"province_code": "AL"
},
"authorization_type": "Online",
"bank_account_type": "Checking",
"bank_name": "Scotiabank",
"created_at": "2015-02-10T23:50:45.000-06:00",
"custom_identifier": "Mikey",
"customer_type": "Personal",
"email": "[email protected]",
"financial_transactions": [],
"home_phone": "(204) 555 5555",
"id": 1,
"identifier": "Mikey",
"institution_number": "",
"name": "Mike Smith",
"phone": "(204) 555 4444",
"routing_number": "111111111",
"transaction_schedules": [],
"transit_number": "",
"updated_at": "2015-02-10T23:50:45.000-06:00"
}
This endpoint retrieves a specific customer.
HTTP REQUEST
GET https://api.rotessa.com/v1/customers/<ID>
URL PARAMETERS
Parameter | Description |
---|---|
ID | The ID of the customer to retrieve |
Get a Specific Customer Based on Custom Identifier
curl -X POST -H 'Content-Type: application/json' -H "Authorization: Token token=\"<api_key>\"" -d '{"custom_identifier": "MIKEY"}' <rotessa_endpoint>/customers/show_with_custom_identifier
The above command returns JSON structured like this:
{
"account_number": "11111111"
"active": true,
"address": {
"address_1": "123 Main Street",
"address_2": "Unit 4",
"city": "Toronto",
"id": 5,
"postal_code": "M1B 0B7",
"province_code": "ON"
},
"authorization_type": null,
"bank_account_type": null,
"bank_name": "Scotiabank",
"created_at": "2015-02-10T23:50:45.000-06:00",
"custom_identifier": "Mikey",
"customer_type": "Personal",
"email": "[email protected]",
"financial_transactions": [],
"home_phone": "(204) 555 5555",
"id": 1,
"identifier": "Mikey",
"institution_number": "111",
"name": "Mike Smith",
"phone": "(204) 555 4444",
"routing_number": "",
"transaction_schedules": [],
"transit_number": "11111",
"updated_at": "2015-02-10T23:50:45.000-06:00"
}
{
"account_number": "11111111"
"active": true,
"address": {
"address_1": "123 Main Street",
"address_2": "Unit 4",
"city": "Birmingham",
"id": 114397,
"postal_code": "36016",
"province_code": "AL"
},
"authorization_type": "Online",
"bank_account_type": "Checking",
"bank_name": "Scotiabank",
"created_at": "2015-02-10T23:50:45.000-06:00",
"custom_identifier": "Mikey",
"customer_type": "Personal",
"email": "[email protected]",
"financial_transactions": [],
"home_phone": "(204) 555 5555",
"id": 1,
"identifier": "Mikey",
"institution_number": "",
"name": "Mike Smith",
"phone": "(204) 555 4444",
"routing_number": "111111111",
"transaction_schedules": [],
"transit_number": "",
"updated_at": "2015-02-10T23:50:45.000-06:00"
}
This endpoint retrieves a specific customer based on a pre-assigned custom_identifier.
HTTP REQUEST
POST https://api.rotessa.com/v1/customers/show_with_custom_identifier
URL PARAMETERS
Parameter | Description |
---|---|
custom_identifier | The custom identifier of the customer to retrieve |
Create A Customer
curl -X POST -H 'Content-Type: application/json' -H "Authorization: Token token=\"<api_key>\"" -d '{"custom_identifier": "newID111", "email": "[email protected]", "name": "Mike Smith", "bank_name": "Scotiabank", "transit_number": "11111", "institution_number": "111", "account_number": "11111111", "address": { "address_1": "123 Main Street", "address_2": "Unit 4", "city": "Toronto", "province_code": "ON", "postal_code": "M1B 0B7" }}' <rotessa_endpoint>/customers
curl -X POST -H 'Content-Type: application/json' -H "Authorization: Token token=\"<api_key>\"" -d '{"custom_identifier": "test api", "email": "[email protected]", "name": "Mike Smith", "bank_name": "Scotiabank", "bank_account_type": "Checking", "authorization_type": "In Person", "routing_number": "111111111", "account_number": "11111111", "address": { "address_1": "123 Main Street", "address_2": "Unit 4", "city": "Birmingham", "province_code": "AL", "postal_code": "36016" }}' <rotessa_endpoint>/customers
The above command returns JSON structured like this:
{
"account_number": "11111111"
"active": true,
"address": {
"address_1": "123 Main Street",
"address_2": "Unit 4",
"city": "Toronto",
"id": 5,
"postal_code": "M1B 0B7",
"province_code": "ON"
},
"authorization_type": null,
"bank_account_type": null,
"bank_name": "Scotiabank",
"created_at": "2015-02-10T23:50:45.000-06:00",
"custom_identifier": "Mikey",
"customer_type": "Personal",
"email": "[email protected]",
"financial_transactions": [],
"home_phone": "(204) 555 5555",
"id": 1,
"identifier": "Mikey",
"institution_number": "111",
"name": "Mike Smith",
"phone": "(204) 555 4444",
"routing_number": "",
"transaction_schedules": [],
"transit_number": "11111",
"updated_at": "2015-02-10T23:50:45.000-06:00"
}
{
"account_number": "11111111"
"active": true,
"address": {
"address_1": "123 Main Street",
"address_2": "Unit 4",
"city": "Birmingham",
"id": 114397,
"postal_code": "36016",
"province_code": "AL"
},
"authorization_type": "Online",
"bank_account_type": "Checking",
"bank_name": "Scotiabank",
"created_at": "2015-02-10T23:50:45.000-06:00",
"custom_identifier": "Mikey",
"customer_type": "Personal",
"email": "[email protected]",
"financial_transactions": [],
"home_phone": "(204) 555 5555",
"id": 1,
"identifier": "Mikey",
"institution_number": "",
"name": "Mike Smith",
"phone": "(204) 555 4444",
"routing_number": "111111111",
"transaction_schedules": [],
"transit_number": "",
"updated_at": "2015-02-10T23:50:45.000-06:00"
}
This endpoint creates a new customer
HTTP REQUEST
POST https://api.rotessa.com/v1/customers
POST PARAMETERS
Parameter | Default | Description |
---|---|---|
name | - | Full name of customer |
custom_identifier | - | Your own customer identifier. Must be unique. |
- | Email address | |
home_phone | - | Home phone number |
phone | - | Phone number |
bank_name | - | Bank name of customer |
institution_number | - | Bank institution number for Canadian customers |
transit_number | - | Bank transit number for Canadian customers |
bank_account_type | - | "Savings" or "Checking" for American customers |
authorization_type | - | "In Person" or "Online" |
routing_number | - | Routing number for American customers |
account_number | - | Bank account number |
address | - | Customer address parameters |
customer_type | - | "Personal" or "Business" |
Update A Customer via PATCH
curl -X PATCH -H 'Content-Type: application/json' -H "Authorization: Token token=\"<api_key>\"" -d '{"custom_identifier": "MIKEY", "email": "[email protected]", "name": "Mike Smith", "bank_name": "Scotiabank", "transit_number": "11111", "institution_number": "333", "account_number": "23123132", "customer_type": "Personal", "address": { "address_1": "123 Main Street", "address_2": "Unit 4", "city": "Toronto", "province_code": "QC", "postal_code": "M1B 0B7" }}' <rotessa_endpoint>/customers/<id>
curl -X PATCH -H 'Content-Type: application/json' -H "Authorization: Token token=\"<api_key>\"" -d '{"custom_identifier": "MIKEY", "email": "[email protected]", "name": "Mike Smith", "bank_name": "Scotiabank", "routing_number": "111111111", "account_number": "23123132", "customer_type": "Personal", "address": { "address_1": "123 Main Street", "address_2": "Unit 4", "city": "Birmingham", "province_code": "AL", "postal_code": "36016" }}' <rotessa_endpoint>/customers/<id>
The above command returns JSON structured like this:
{
"account_number": "23123132"
"active": true,
"address": {
"address_1": "123 Main Street",
"address_2": "Unit 4",
"city": "Toronto",
"id": 5,
"postal_code": "M1B 0B7",
"province_code": "QC"
},
"authorization_type": null,
"bank_account_type": null,
"bank_name": "Scotiabank",
"created_at": "2015-02-10T23:50:45.000-06:00",
"custom_identifier": "Mikey",
"customer_type": "Personal",
"email": "[email protected]",
"financial_transactions": [],
"home_phone": "(204) 555 5555",
"id": 1,
"identifier": "Mikey",
"institution_number": "111",
"name": "Mike Smith",
"phone": "(204) 555 4444",
"routing_number": "",
"transaction_schedules": [
{
"amount": "123.00",
"comment": "",
"created_at": "2019-04-16T14:40:38.000-05:00",
"frequency": "Once",
"id": 333215,
"installments": 1,
"next_process_date": "2019-04-16",
"process_date": "2019-04-16",
"updated_at": "2019-04-16T14:40:38.000-05:00"
}
],
"transit_number": "11111",
"updated_at": "2015-05-18T12:23:58.739-05:00"
}
{
"account_number": "23123132"
"active": true,
"address": {
"address_1": "123 Main Street",
"address_2": "Unit 4",
"city": "Birmingham",
"id": 114397,
"postal_code": "36016",
"province_code": "AL"
},
"authorization_type": "Online",
"bank_account_type": "Checking",
"bank_name": "Scotiabank",
"created_at": "2015-02-10T23:50:45.000-06:00",
"custom_identifier": "MIKEY",
"customer_type": "Personal",
"email": "[email protected]",
"financial_transactions": [],
"home_phone": "(204) 555 5555",
"id": 1,
"identifier": "Mikey",
"institution_number": "",
"name": "Mike Smith",
"phone": "(204) 555 4444",
"routing_number": "111111111",
"transaction_schedules": [
{
"amount": "123.00",
"comment": "",
"created_at": "2019-04-16T14:40:38.000-05:00",
"frequency": "Once",
"id": 333215,
"installments": 1,
"next_process_date": "2019-04-16",
"process_date": "2019-04-16",
"updated_at": "2019-04-16T14:40:38.000-05:00"
}
],
"transit_number": "",
"updated_at": "2015-05-18T12:23:58.739-05:00"
}
This endpoint updates a customer
HTTP REQUEST
PATCH https://api.rotessa.com/v1/customers
URL PARAMETERS
Parameter | Description |
---|---|
ID | The ID of the customer to retrieve |
Update A Customer via POST
curl -X POST -H 'Content-Type: application/json' -H "Authorization: Token token=\"<api_key>\"" -d '{"id": 1, "custom_identifier": "new custom identifier", "email": "[email protected]", "name": "MADE WITH API 4040", "bank_name": "Scotiabank", "transit_number": "11111", "institution_number": "333", "account_number": "23123132", "address": { "address_1": "123 Main Street", "address_2": "Unit 4", "city": "Toronto", "province_code": "QC", "postal_code": "M1B 0B7" }}' <rotessa_endpoint>/customers/update_via_post
curl -X POST -H 'Content-Type: application/json' -H "Authorization: Token token=\"<api_key>\"" -d '{"id": 1, "custom_identifier": "new custom identifier", "email": "[email protected]", "name": "MADE WITH API 4040", "bank_name": "Scotiabank", "routing_number": "111111111", "account_number": "23123132", "address": { "address_1": "123 Main Street", "address_2": "Unit 4", "city": "Birmingham", "province_code": "AL", "postal_code": "36016" }}' <rotessa_endpoint>/customers/update_via_post
The above command returns JSON structured like this:
{
"account_number": "23123132"
"active": true,
"address": {
"address_1": "123 Main Street",
"address_2": "Unit 4",
"city": "Toronto",
"id": 5,
"postal_code": "M1B 0B7",
"province_code": "QC"
},
"authorization_type": null,
"bank_account_type": null,
"bank_name": "Scotiabank",
"created_at": "2015-02-10T23:50:45.000-06:00",
"custom_identifier": "new custom identifier",
"customer_type": "Personal",
"email": "[email protected]",
"financial_transactions": [],
"home_phone": "(204) 555 5555",
"id": 1,
"identifier": "Mikey",
"institution_number": "333",
"name": "MADE WITH API 4040",
"phone": "(204) 555 4444",
"routing_number": "",
"transaction_schedules": [
{
"amount": "123.00",
"comment": "",
"created_at": "2019-04-16T14:40:38.000-05:00",
"frequency": "Once",
"id": 333215,
"installments": 1,
"next_process_date": "2019-04-16",
"process_date": "2019-04-16",
"updated_at": "2019-04-16T14:40:38.000-05:00"
}
],
"transit_number": "11111",
"updated_at": "2015-05-18T12:23:58.739-05:00"
}
{
"account_number": "23123132"
"active": true,
"address": {
"address_1": "123 Main Street",
"address_2": "Unit 4",
"city": "Birmingham",
"id": 114397,
"postal_code": "36016",
"province_code": "AL"
},
"authorization_type": "Online",
"bank_account_type": "Checking",
"bank_name": "Scotiabank",
"created_at": "2015-02-10T23:50:45.000-06:00",
"custom_identifier": "new custom identifier",
"customer_type": "Personal",
"email": "[email protected]",
"financial_transactions": [],
"home_phone": "(204) 555 5555",
"id": 1,
"identifier": "Mikey",
"institution_number": "",
"name": "MADE WITH API 4040",
"phone": "(204) 555 4444",
"routing_number": "111111111",
"transaction_schedules": [
{
"amount": "123.00",
"comment": "",
"created_at": "2019-04-16T14:40:38.000-05:00",
"frequency": "Once",
"id": 333215,
"installments": 1,
"next_process_date": "2019-04-16",
"process_date": "2019-04-16",
"updated_at": "2019-04-16T14:40:38.000-05:00"
}
],
"transit_number": "",
"updated_at": "2015-05-18T12:23:58.739-05:00"
}
This endpoint updates a customer
HTTP REQUEST
POST https://api.rotessa.com/v1/customers/update_via_post
URL PARAMETERS
Parameter | Description |
---|---|
ID | The ID of the customer to retrieve |
Transaction Schedules
Transaction schedules are the method by which recurring or one time payments are scheduled in Rotessa for a customer. Payments require a schedule date, which must be in the future, as well as a frequency.
Parameter | Description |
---|---|
ID | ID of the transaction schedule. |
process_date | The initial date to begin withdrawing funds. (e.g. November 20, 2016) |
installments | The number of installments. Leave blank to continue withdrawing funds indefinitely. |
comment | A place to enter notes for the transaction schedule. |
next_process_date | The next date that funds will be withdrawn. |
financial_transactions | A list of financial transactions generated as a result of the payment schedule specified. |
Schedule Frequency
The frequency of a transaction schedule must be one of the following values:
Frequency | Description |
---|---|
Once | One time payment |
Weekly | Every week |
Every Other Week | Every two weeks |
Monthly | Every month |
Every Other Month | Every two months |
Quarterly | Every 3 months |
Semi-Annually | Every six months |
Yearly | Once a year |
Transaction schedules have an optional installments parameter that allow you to schedule a set number of payments. To schedule payments indefinitely simply omit this parameter and Rotessa will continue withdrawing funds until the schedule is cancelled.
Get A Specific Transaction Schedule
curl "<rotessa_endpoint>/transaction_schedules/<ID>" -H "Authorization: Token token=\"<api_key>\""
The above command returns JSON structured like this:
{
"amount": "123.00",
"comment": "",
"created_at": "2019-04-16T14:40:38.000-05:00",
"financial_transactions": [],
"frequency": "Once",
"id": 333215,
"installments": 1,
"next_process_date": "2019-04-16",
"process_date": "2019-04-16",
"updated_at": "2019-04-16T14:40:38.000-05:00"
}
This endpoint creates a transaction schedule for a customer.
HTTP REQUEST
GET https://api.rotessa.com/v1/transaction_schedules/<ID>
URL PARAMETERS
Parameter | Description |
---|---|
ID | The ID of the transaction schedule to retrieve |
Create A Transaction Schedule with Rotessa Customer ID
curl -X POST -H 'Content-Type: application/json' -H "Authorization: Token token=\"<api_key>\"" -d '{"customer_id":1, "amount": 100, "frequency": "Monthly", "process_date": "November 24, 2017", "comment": "Membership fees"}' <rotessa_endpoint>/transaction_schedules
The above command returns JSON structured like this:
{
"amount": "100.00",
"comment": "Membership fees (Created with API)",
"created_at": "2017-04-29T13:31:54.000-05:00",
"financial_transactions": [],
"frequency": "Monthly",
"id": 111111,
"installments": null,
"next_process_date": "2017-11-24",
"process_date": "2017-11-24",
"updated_at": "2017-04-29T13:31:54.000-05:00"
}
This endpoint creates a transaction schedule for a customer.
HTTP REQUEST
POST https://api.rotessa.com/v1/transaction_schedules
POST PARAMETERS
Parameter | Description |
---|---|
customer_id | ID of customer |
amount | Amount for schedule |
process_date | The initial date to begin withdrawing funds. (e.g. November 20, 2016) |
frequency | Frequecy of transaction. Must be one of preceding valid frequecies |
installments | The number of installments. If value is excluded, schedule is indefinite |
comment | Optional comment for schedule |
Create A Transaction Schedule with Custom Identifier
curl -X POST -H 'Content-Type: application/json' -H "Authorization: Token token=\"<api_key>\"" -d '{"custom_identifier":"MikeSmith0001", "amount": 100, "frequency": "Monthly", "process_date": "November 24, 2019", "comment": "Membership fees"}' <rotessa_endpoint>/v1/transaction_schedules/create_with_custom_identifier
The above command returns JSON structured like this:
{
"amount": "100.00",
"comment": "Membership fees (Created with API)",
"created_at": "2019-04-29T15:45:18.000-05:00",
"financial_transactions": [],
"frequency": "Monthly",
"id": 435194,
"installments": null,
"next_process_date": "2019-11-24",
"process_date": "2019-11-24",
"updated_at": "2019-04-29T15:45:18.000-05:00"
}
This endpoint creates a transaction schedule for a customer.
HTTP REQUEST
POST https://api.rotessa.com/v1/transaction_schedules/create_with_custom_identifier
POST PARAMETERS
Parameter | Description |
---|---|
custom_identifier | Your own unique custom identifier for the customer |
amount | Amount for schedule |
process_date | The initial date to begin withdrawing funds. (e.g. November 20, 2016) |
frequency | Frequecy of transaction. Must be one of preceding valid frequecies |
installments | The number of installments. If value is excluded, schedule is indefinite |
comment | Optional comment for schedule |
Update A Specific Transaction Schedule with Transaction ID
curl -X PATCH -H 'Content-Type: application/json' -H "Authorization: Token token=\"<api_key>\"" -d '{"amount": 150, "comment": "New Membership fees"}' <rotessa_endpoint>/transaction_schedules/435191
The above command returns JSON structured like this:
{
"amount": "150.00",
"comment": "New Membership fees",
"created_at": "2019-04-29T14:55:16.000-05:00",
"financial_transactions": [],
"frequency": "Monthly",
"id": 435191,
"installments": null,
"next_process_date": "2019-11-24",
"process_date": "2019-11-24",
"updated_at": "2019-04-29T14:58:29.000-05:00"
}
This endpoint updates a transaction schedule for a customer.
HTTP REQUEST
PATCH https://api.rotessa.com/v1/transaction_schedules/<ID>
URL PARAMETERS
Parameter | Description |
---|---|
id | The ID of the transaction schedule to update |
comment | Optional comment for schedule |
Update A Specific Transaction Schedule with Transaction ID via POST
curl -X POST -H 'Content-Type: application/json' -H "Authorization: Token token=\"<api_key>\"" -d '{"id":12345, "amount": 150, "comment": "New Membership fees"}' <rotessa_endpoint>/transaction_schedules/update_via_post
The above command returns JSON structured like this:
{
"amount": "150.00",
"comment": "New Membership fees",
"created_at": "2019-04-29T14:55:16.000-05:00",
"financial_transactions": [],
"frequency": "Monthly",
"id": 435191,
"installments": null,
"next_process_date": "2019-11-24",
"process_date": "2019-11-24",
"updated_at": "2019-04-29T14:58:29.000-05:00"
}
This endpoint updates a transaction schedule for a customer.
HTTP REQUEST
POST https://api.rotessa.com/v1/transaction_schedules/update_via_post
URL PARAMETERS
Parameter | Description |
---|---|
id | The ID of the transaction schedule to update |
comment | Optional comment for schedule |
Delete A Specific Transaction Schedule
curl -X DELETE -H "Authorization: Token token=\"<api_key>\"" "<rotessa_endpoint>/transaction_schedules/<id>"
This endpoint deletes a transaction schedule for a customer.
A successfully deleted transaction schedule will return no errors.
HTTP REQUEST
DELETE https://api.rotessa.com/v1/transaction_schedules/<ID>
URL PARAMETERS
Parameter | Description |
---|---|
ID | The ID of the transaction schedule to retrieve |
Financial Transactions
Financial transactions are a history of the payments made for a customer. Financial transactions are created as a result of Transaction Schedules, and typcially move from a status of Pending
-> Approved
or Pending
-> Declined
. If a later chargeback occurs after a successful payment has been reported, financial transactions will be moved to a status of Chargeback
.
Field | Description |
---|---|
id | ID of the financial transaction |
amount | Transaction amount |
process_date | The scheduled process date of the transaction |
status | The current status of the transaction |
status_reason | The reason for the Declined or Chargeback status of a transaction |
transaction_schedule_id | ID of the transction schedule that created this financial transaction |
bank_name | Bank name |
institution_number | Bank institution number |
transit_number | Bank transit number |
account_number | Bank account number |
Status
Financial transactions can be in one of the following statuses.
Status | Description |
---|---|
Future | The financial transaction has not yet been scheduled |
Pending | The financial transaction is being processed |
Approved | The financial transaction was successful |
Declined | The financial transaction was declined for the reason specified in status_reason |
Status Reasons
Financial transactions, if Declined
or Chargeback
will have a value in the status_reason
field.
Reason |
---|
NSF |
Payment Stopped/Recalled |
Edit Reject |
Funds Not Cleared |
Account Closed |
Invalid/Incorrect Account No. |
Account Not Found |
Account Frozen |
Agreement Revoked |
No Debit Allowed |
Transaction Report
The transaction report endpoint is the main interface by which your system can determine the current state of payments processed by Rotessa. The transaction report is limited to transcations 3 years into the future and is paginated, showing up to 1000 transactions per page.
Show Transaction Report
curl -X GET -H 'Content-Type: application/json' -H "Authorization: Token token=\"<api_key>\"" -d '{"start_date":"2018-09-12", "end_date":"2019-03-12", "filter":"All", "page":1}' <rotessa_endpoint>/transaction_report
The above command returns JSON structured like this:
[
{
"account_number": 111111,
"amount": "100.00",
"created_at": "2019-01-29T15:46:03.000-05:00",
"comment": "May Fees",
"custom_identifier": "MIKEY",
"customer_id": 1,
"earliest_approval_date": null,
"id": 1233,
"institution_number": null,
"process_date": "2019-02-28",
"settlement_date": "2019-03-7",
"status": "Future",
"status_reason": null,
"transaction_number": null,
"transaction_schedule_id": 330374,
"transit_number": null,
"updated_at": null
},
{
"account_number": 121212,
"amount": "100.00",
"created_at": "2019-02-29T14:55:16.000-05:00",
"comment": null,
"custom_identifier": "MIKEY",
"customer_id": 1,
"earliest_approval_date": null,
"id": 1234,
"institution_number": null,
"process_date": "2019-03-07",
"settlement_date": "2019-03-14",
"status": "Future",
"status_reason": null,
"transaction_number": null,
"transaction_schedule_id": 330374,
"transit_number": null,
"updated_at": null
}
]
The endpoint provides 4 parameters which can be queried.
HTTP REQUEST
GET https://api.rotessa.com/v1/transaction_report
Parameter | Description |
---|---|
start_date | The earliest process date (YYYY-MM-DD) of the list of transactions |
end_date | The last process date (YYYY-MM-DD) of the list of transactions. Optional |
status | Filter by the given financial status of the transactions |
page | Page selected based on 1000 transactions per page |
The status
parameter can be one of the following values.
Parameter | Description |
---|---|
'All' | Return all the transactions. This is the default value |
'Pending' | Only pending transactions. These are transactions still being processed by Rotessa |
'Approved' | Only approved transactions. These are considered successful transactions |
'Declined' | Only declined transactions. These are failed transactions |
'Chargeback' | Only chargeback transactions. These are failed transactions |
Errors
Errors are structured in the following format:
{
"errors": [
{
"error_code": "installments_required",
"error_message": "Installments value must be at least 1."
},
{
"error_code": "process_date_timing",
"error_message": "Process date must be at least 2 business days in the future."
}
]
}
ERROR FORMAT
Errors are returned from Rotessa in the form of a list of values in the errors
key of response. Each error has an error_code
and error_message
, corresponding to the type of error that has occurred.
HTTP RESPONSE CODES
The Rotessa API uses the following http error codes:
Error Code | Meaning |
---|---|
400 | Bad Request – Your request includes invalid parameters |
401 | Unauthorized – Your API key is not valid or is missing |
404 | Not Found – The specified resource could not be found |
406 | Not Acceptable – You requested a format that isn’t json |
422 | Unprocessable Entity – Your request results in invalid data |
500 | Internal Server Error -- We had a problem with our server. Try again later. |
503 | Service Unavailable -- We're temporarily offline for maintenance. Please try again later. |