Introduction
Welcome to the Slyce API! This API is an extension of the Slyce Plugin providing a convenient RESTful API interface for you to manage features including customers, subscriptions, invoices, payment methods, and running transactions. However, this API is not intended to be used as a replacement to the Plugin. Due to PCI compliance requirements, the API methods do not accept full card numbers. Therefore, the Plugin will need to be implemented to capture and tokenize card data which can then be used in the API methods.
Setup
Base URI: https://api.slycepay.com/v2/
Current Version: 2.0
Authentication
To authorize, use this code:
# With shell, you can just pass the correct header with each request
curl "api_endpoint_here"
-H "X-Authorization: THEAPIKEY"
Make sure to replace
THEAPIKEY
with your API key.
Slyce uses API keys to allow access to the API. You can get you own Slyce API key by contacting our support.
Slyce expects for the API key to be included in all API requests to the server in a header that looks like the following:
X-Authorization: THEAPIKEY
Invoice
Invoice handles all invoices with custom fields, lineitems with/without custom fields.
Create
Returns JSON structured like this:
{
"data": {
"id": 2050,
"hash": "GENERATED_INVOICE_HASH",
"number": "TST-INV0001",
"date": "2017-03-15",
"logo": "LOGO_URL",
"credit": null,
"mail_to": "mailto-email@domain.com",
"mail_body": "An Invoice for your recent medical bill has been created under your account.",
"footer_id": 2,
"include_login": 1,
"login_url": "LOGIN_URL_TO_CUSTOMER_PORTAL",
"include_pdf": 0,
"pdf": "",
"medical_invoice": 1,
"send_now": 1,
"send_reminder":"1",
"invoice_preference":"email",
"webhook_url": "WEBHOOK_URL",
"date_sent": "2017-03-15",
"total": "322.50",
"balance": "0.00",
"status": "outstanding",
"custom_fields": [
{
"name": "Contact Person",
"value": "John Doe",
"tag": "{contact_person}"
},
{
"name": "Secondary Email",
"value": "secondary-email@domain.com",
"tag": "{secondary_email}"
},
{
"name": "Fax",
"value": "123456789",
"tag": "{fax}"
},
{
"name": "Secondary Phone",
"value": "123456789",
"tag": "{secondary_phone}"
},
{
"name": "Secondary Address",
"value": "Address Location",
"tag": "{secondary_address}"
}
],
"customer": {
"custid": "7111177788",
"user_id":142971,
"first_name": "Savy",
"last_name": "Phere",
"email": "customer-email@domain.com",
"phone": "",
"company": "",
"street1": "",
"street2": "",
"city": "",
"state": "",
"zip": "",
"country": ""
},
"line_items": [
{
"id": 123,
"sku": "PN01",
"quantity": 1,
"total_cost": 200,
"due_date": "2017-03-15",
"date_service":"2017-03-15",
"date_paid": "0000-00-00",
"custom_fields": [
{
"name": "Description",
"value": "A simple dummy text of the printing and typesetting industry."
},
{
"name": "Dosage",
"value": "Lorem Ipsum comes from sections 1.10.32 and 1.10.33"
}
],
"child": [
{
"id": 124,
"sku": "PNB01",
"quantity": 1,
"total_cost": 10,
"due_date": "2017-03-15",
"date_paid": "0000-00-00",
"custom_fields": [
{
"name": "Description",
"value": "test industry"
},
{
"name": "Dosage",
"value": "comes from sections 1.10.32"
}
]
},
{
"id": 125,
"sku": "PNM01",
"quantity": 1,
"total_cost": -3,
"due_date": "2017-03-15",
"date_paid": "0000-00-00",
"custom_fields": [
{
"name": "Description",
"value": "typesetting industry"
},
{
"name": "Dosage",
"value": "comes from sections 1.10.32 and 1.10.33"
}
]
}
]
},
{
"id": 130,
"sku": "STBJ",
"quantity": 1,
"total_cost": 115.5,
"due_date": "2017-03-15",
"date_paid": "0000-00-00",
"date_service":"2017-03-15",
"custom_fields": null,
"child": []
}
]
}
}
This method lets you create new invoice.
HTTP Request
POST invoice
Data Object
Field Name | Required | Type | Description |
---|---|---|---|
number | yes | string | Invoice Number |
date | yes | string | Invoice Date (Y-m-d). |
logo | url | Invoice logo url. | |
mail_to | yes | string | Email address for the receiver of the invoice. |
mail_body | string | Email body. Can be html. | |
include_login | boolean | Lets you specify if login link should be included or not in the email invoice. | |
login_url | url | Login url. | |
include_pdf | boolean | Lets you specify if pdf invoice attachment should be included or not in the email. | |
send_now | boolean | Lets you specify whether to send the invoice directly or not. | |
send_reminder | boolean | Lets you specify whether to send the email reminders or not. | |
invoice_preference | varchar | Lets you specify invoice preference data to receive (email, paper, or both). | |
footer_id | integer | The id of the invoice footer. | |
custom_fields | json | The custom fields or additional information needed for this new invoice. Useful for medical industry invoices. Refer to Invoice Custom Fields Json | |
medical_invoice | boolean | Lets you specify if this new invoice is for medical industry or not. | |
credit | amount | Customer credit amount. | |
customer | json | Json data of customer. Refer to Customer Object | |
line_items | array | Array of objects. Refer to Line Item Object |
Invoice Custom Fields Json
Follow the format required here.
Data Json
Field 1 | Field 2 | Field 3 |
---|---|---|
name | value | tag |
Structure
"custom_fields":[
{"name":"Contact Name","value":"John Doe","tag":{contact_name}"},
{"name":"Contact No.","value":"123-4567","tag":{contact_no}"}
]
Customer Object
Field Name | Required | Type | Description |
---|---|---|---|
custid | yes | string | Customer ID |
user_id | int | Customer User Account ID | |
first_name | string | Customer’s firstname | |
last_name | string | Customer’s lastname | |
yes | string | Customer’s email | |
phone | string | Customer’s contact number | |
company | string | Company | |
street1 | string | Street 1 | |
street2 | string | Street 2 | |
city | string | City | |
state | string | State | |
zip | string | ZIP |
Line Item Object
Field Name | Required | Type | Description |
---|---|---|---|
id | yes | integer | ID |
sku | yes | integer | Item identification code |
name | yes | integer | Item name |
quantity | yes | integer | Number of items |
total_cost | yes | float | Total cost of the item |
due_date | yes | string | Date due (Y-m-d) |
date_service | yes | string | Date of Service (Y-m-d) |
order | numeric | Item ordering | |
child | array | Items as a child. Refer to Line Item Child Object | |
custom_fields | json | Lets you add other details through this field. Refer to Lineitem Custom Fields Json |
Line Item Child Object
Field Name | Required | Type | Description |
---|---|---|---|
id | yes | numeric | Item id |
sku | yes | string | Item identification code |
name | yes | string | Item name |
quantity | yes | integer | Number of items |
total_cost | yes | float | Total cost of the item |
order | numeric | Item ordering | |
custom_fields | json | Lets you add other details through this field. Refer to Lineitem Custom Fields Json |
Lineitem Custom Fields Json
Follow the format required here.
Data Json
Field 1 | Field 2 |
---|---|
name | value |
Structure
"custom_fields":[
{"name":"Description","value":"Description details are here."},
{"name":"Dosage","value":"Dosage details are here"}
]
View
Returns JSON structured like this:
{
"data": {
"id": 2050,
"hash": "GENERATED_INVOICE_HASH",
"number": "TST-INV0001",
"date": "2017-03-15",
"logo": "LOGO_URL",
"credit": null,
"mail_to": "mailto-email@domain.com",
"mail_body": "An Invoice for your recent medical bill has been created under your account.",
"footer_id": 2,
"include_login": 1,
"login_url": "LOGIN_URL_TO_CUSTOMER_PORTAL",
"include_pdf": 0,
"pdf": "",
"medical_invoice": 1,
"send_now": 1,
"send_reminder": 1,
"invoice_preference":"email",
"webhook_url": "WEBHOOK_URL",
"date_sent": "2017-03-15",
"total": "322.50",
"balance": "0.00",
"status": "outstanding",
"custom_fields": [
{
"name": "Contact Person",
"value": "John Doe",
"tag": "{contact_person}"
},
{
"name": "Secondary Email",
"value": "customer-email@domain.com",
"tag": "{secondary_email}"
},
{
"name": "Fax",
"value": "123456789",
"tag": "{fax}"
},
{
"name": "Secondary Phone",
"value": "123456789",
"tag": "{secondary_phone}"
},
{
"name": "Secondary Address",
"value": "Address Location",
"tag": "{secondary_address}"
}
],
"customer": {
"custid": "7111177788",
"user_id":142971,
"first_name": "Savy",
"last_name": "Phere",
"email": "customer-email@domain.com",
"phone": "",
"company": "",
"street1": "",
"street2": "",
"city": "",
"state": "",
"zip": "",
"country": ""
},
"line_items": [
{
"id": 123,
"sku": "PN01",
"quantity": 1,
"total_cost": 200,
"due_date": "2017-03-15",
"date_service":"2017-03-15",
"date_paid": "0000-00-00",
"custom_fields": [
{
"name": "Description",
"value": "A simple dummy text of the printing and typesetting industry."
},
{
"name": "Dosage",
"value": "Lorem Ipsum comes from sections 1.10.32 and 1.10.33"
}
],
"child": [
{
"id": 124,
"sku": "PNB01",
"quantity": 1,
"total_cost": 10,
"due_date": "2017-03-15",
"date_paid": "0000-00-00",
"custom_fields": [
{
"name": "Description",
"value": "test industry"
},
{
"name": "Dosage",
"value": "comes from sections 1.10.32"
}
]
},
{
"id": 125,
"sku": "PNM01",
"quantity": 1,
"total_cost": -3,
"due_date": "2017-03-15",
"date_paid": "0000-00-00",
"custom_fields": [
{
"name": "Description",
"value": "typesetting industry"
},
{
"name": "Dosage",
"value": "comes from sections 1.10.32 and 1.10.33"
}
]
}
]
},
{
"id": 130,
"sku": "STBJ",
"quantity": 1,
"total_cost": 115.5,
"due_date": "2017-03-15",
"date_paid": "0000-00-00",
"date_service":"2017-03-15",
"custom_fields": null,
"child": []
}
]
}
}
This method lets you view a specific invoice.
HTTP Request
GET invoice/<ID>
URL Parameters
Parameter | Description |
---|---|
ID | The id of the invoice. |
Update
Returns JSON structured like this:
{
"data": {
"id": 2050,
"hash": "GENERATED_INVOICE_HASH",
"number": "TST-INV0001",
"date": "2017-03-15",
"logo": "LOGO_URL",
"credit": null,
"mail_to": "mailto-email@domain.com",
"mail_body": "An Invoice for your recent medical bill has been created under your account.",
"footer_id": 2,
"include_login": 1,
"login_url": "LOGIN_URL_TO_CUSTOMER_PORTAL",
"include_pdf": 0,
"pdf": "",
"medical_invoice": 1,
"send_now": 1,
"invoice_preference":"email",
"webhook_url": "WEBHOOK_URL",
"date_sent": "2017-03-15",
"total": "322.50",
"balance": "0.00",
"status": "outstanding",
"custom_fields": [
{
"name": "Contact Person",
"value": "John Doe",
"tag": "{contact_person}"
},
{
"name": "Secondary Email",
"value": "secondary-email@domain.com",
"tag": "{secondary_email}"
},
{
"name": "Fax",
"value": "123456789",
"tag": "{fax}"
},
{
"name": "Secondary Phone",
"value": "123456789",
"tag": "{secondary_phone}"
},
{
"name": "Secondary Address",
"value": "Address Location",
"tag": "{secondary_address}"
}
],
"customer": {
"custid": "7111177788",
"user_id":142971,
"first_name": "Savy",
"last_name": "Phere",
"email": "customer-email@domain.com",
"phone": "",
"company": "",
"street1": "",
"street2": "",
"city": "",
"state": "",
"zip": "",
"country": ""
},
"line_items": [
{
"id": 123,
"sku": "PN01",
"quantity": 1,
"total_cost": 200,
"due_date": "2017-03-15",
"date_service":"2017-03-15",
"date_paid": "0000-00-00",
"custom_fields": [
{
"name": "Description",
"value": "A simple dummy text of the printing and typesetting industry."
},
{
"name": "Dosage",
"value": "Lorem Ipsum comes from sections 1.10.32 and 1.10.33"
}
],
"child": [
{
"id": 124,
"sku": "PNB01",
"quantity": 1,
"total_cost": 10,
"due_date": "2017-03-15",
"date_paid": "0000-00-00",
"custom_fields": [
{
"name": "Description",
"value": "test industry"
},
{
"name": "Dosage",
"value": "comes from sections 1.10.32"
}
]
},
{
"id": 125,
"sku": "PNM01",
"quantity": 1,
"total_cost": -3,
"due_date": "2017-03-15",
"date_paid": "0000-00-00",
"custom_fields": [
{
"name": "Description",
"value": "typesetting industry"
},
{
"name": "Dosage",
"value": "comes from sections 1.10.32 and 1.10.33"
}
]
}
]
},
{
"id": 130,
"sku": "STBJ",
"quantity": 1,
"total_cost": 115.5,
"due_date": "2017-03-15",
"date_service":"2017-03-15",
"date_paid": "0000-00-00",
"custom_fields": null,
"child": []
}
]
}
}
Request JSON structure like this:
{
"number": "TST-INV0001",
"date": "2017-03-22",
"logo": "",
"credit": "50.00",
"mail_body": "An Invoice for your recent bill has been created under your account.",
"footer_id":2,
"mail_to": "mailto-email@domain.com",
"logo":"",
"include_pdf": "0",
"include_login": "0",
"medical_invoice": "1",
"send_now":"0",
"send_reminder":1,
"invoice_preference":"email",
"login_url": "LOGIN_URL_TO_CUSTOMER_PORTAL",
"webhook_url": "WEBHOOK_URL",
"custom_fields":[
{"name":"Contact Person","value":"John Doe","tag":"{contact_person}"},
{"name":"Secondary Email","value":"email2@domain.com","tag":"{secondary_email}"}
],
"customer": {
"custid": "7111177788",
"user_id":142971,
"first_name": "Savy",
"last_name": "Phere",
"email": "customer-email@domain.com",
"phone": "",
"company": "",
"street1": "",
"street2": "",
"city": "",
"state": "",
"zip": "",
"country": ""
},
"line_items": [
{
"id": "123",
"sku": "PN01",
"name": "Peanut",
"quantity": "1",
"total_cost": "200.00",
"due_date": "2017-03-22",
"date_service": "2017-03-22",
"child" : [
{
"id": 124,
"sku": "PNB01",
"name": "PButter",
"quantity": "1",
"total_cost": "10.00",
"custom_fields":[
{"name":"Description","value":"test industry"},
{"name":"Dosage","value":"comes from sections 1.10.32"}
]
},
{
"id": 125,
"sku": "PNM01",
"name": "PMayo",
"quantity": "1",
"total_cost": "-3.00",
"custom_fields":[
{"name":"Description","value":"typesetting industry"},
{"name":"Dosage","value":"comes from sections 1.10.32 and 1.10.33"}
]
}
],
"custom_fields":[
{"name":"Description","value":"A simple dummy text of the printing and typesetting industry."},
{"name":"Dosage","value":"Lorem Ipsum comes from sections 1.10.32 and 1.10.33"}
]
},
{
"id": 130,
"sku": "STBJ",
"name": "Strawberry Jam",
"quantity": "1",
"total_cost": "115.50",
"due_date": "2017-03-22",
"date_service": "2017-03-22",
"child":[]
}
]
}
This method lets you update a specific invoice.
HTTP Request
PUT invoice/{id}
Data Object
Field Name | Required | Type | Description |
---|---|---|---|
number | yes | string | Invoice Number |
date | yes | string | Invoice Date (Y-m-d). |
logo | url | Invoice logo url. | |
mail_to | yes | string | Email address for the receiver of the invoice. |
mail_body | string | Email body. Can be html. | |
include_login | boolean | Lets you specify if login link should be included or not in the email invoice. | |
login_url | url | Login url. | |
include_pdf | boolean | Lets you specify if pdf invoice attachment should be included or not in the email. | |
send_now | boolean | Lets you specify whether to send the invoice directly or not. | |
send_reminder | boolean | Lets you specify whether to send the email reminders or not. | |
invoice_preference | varchar | Lets you specify invoice preference data to receive (email, paper, or both). | |
footer_id | integer | The id of the invoice footer. | |
custom_fields | json | The custom fields or additional information needed for this new invoice. Useful for medical industry invoices. Refer to Invoice Custom Fields Json | |
medical_invoice | boolean | Lets you specify if this new invoice is for medical industry or not. | |
credit | amount | Customer credit amount. | |
customer | json | Json data of customer. Refer to Customer Object | |
line_items | array | Array of objects. Refer to Line Item Object | |
status | string | Status of the invoice. Refer to Status Supported. |
Status Supported
- unsent
- outstanding
- partial payment
- paid
- canceled
Send
Returns JSON structured like this:
{
"data": {
"id": 2050,
"hash": "GENERATED_INVOICE_HASH",
"number": "TST-INV0001",
"date": "2017-03-15",
"logo": "LOGO_URL",
"credit": null,
"mail_to": "mailto-email@domain.com",
"mail_body": "An Invoice for your recent medical bill has been created under your account.",
"footer_id": 2,
"include_login": 1,
"login_url": "LOGIN_URL_TO_CUSTOMER_PORTAL",
"include_pdf": 0,
"pdf": "",
"medical_invoice": 1,
"send_now": 1,
"send_reminder": 1,
"invoice_preference": "email",
"webhook_url": "WEBHOOK_URL",
"date_sent": "2017-03-15",
"total": "322.50",
"balance": "0.00",
"status": "outstanding",
"custom_fields": [
{
"name": "Contact Person",
"value": "John Doe",
"tag": "{contact_person}"
},
{
"name": "Secondary Email",
"value": "secondary-email@domain.com",
"tag": "{secondary_email}"
},
{
"name": "Fax",
"value": "123456789",
"tag": "{fax}"
},
{
"name": "Secondary Phone",
"value": "123456789",
"tag": "{secondary_phone}"
},
{
"name": "Secondary Address",
"value": "Address Location",
"tag": "{secondary_address}"
}
],
"customer": {
"custid": "7111177788",
"user_id":142971,
"first_name": "Savy",
"last_name": "Phere",
"email": "customer-email@domain.com",
"phone": "",
"company": "",
"street1": "",
"street2": "",
"city": "",
"state": "",
"zip": "",
"country": ""
},
"line_items": [
{
"id": 123,
"sku": "PN01",
"quantity": 1,
"total_cost": 200,
"due_date": "2017-03-15",
"date_service": "2017-03-15",
"date_paid": "0000-00-00",
"custom_fields": [
{
"name": "Description",
"value": "A simple dummy text of the printing and typesetting industry."
},
{
"name": "Dosage",
"value": "Lorem Ipsum comes from sections 1.10.32 and 1.10.33"
}
],
"child": [
{
"id": 124,
"sku": "PNB01",
"quantity": 1,
"total_cost": 10,
"due_date": "2017-03-15",
"date_paid": "0000-00-00",
"custom_fields": [
{
"name": "Description",
"value": "test industry"
},
{
"name": "Dosage",
"value": "comes from sections 1.10.32"
}
]
},
{
"id": 125,
"sku": "PNM01",
"quantity": 1,
"total_cost": -3,
"due_date": "2017-03-15",
"date_paid": "0000-00-00",
"custom_fields": [
{
"name": "Description",
"value": "typesetting industry"
},
{
"name": "Dosage",
"value": "comes from sections 1.10.32 and 1.10.33"
}
]
}
]
},
{
"id": 130,
"sku": "STBJ",
"quantity": 1,
"total_cost": 115.5,
"due_date": "2017-03-15",
"date_paid": "0000-00-00",
"date_service": "2017-03-15",
"custom_fields": null,
"child": []
}
]
}
}
This method lets you send a specific invoice.
HTTP Request
POST invoice/send/<ID>
Data Object
** With or without the following data*
Field Name | Required | Type | Description |
---|---|---|---|
mail_to | no | string | Email address for the receiver of the invoice. |
mail_body | no | string | Email body. Can be html. |
Invoice Footer
Invoice footer handles all invoice footer templates with/without custom fields tags.
View
Returns JSON structured like this:
{
"data": {
"id": 1,
"footer_value":"<div class=\"row\">\r\n<div class=\"col-md-4 pull-right\">\r\n<strong>Total Tax:<\/strong>\r\n<span>{currency}{total_tax}<\/span>\r\n<\/div>\r\n<\/div>\r\n<div class=\"row\">\r\n <div class=\"col-md-4 pull-right\">\r\n <strong>Total:<\/strong>\r\n<span>{currency}{invoice_total}<\/span>\r\n<\/div>\r\n<\/div>\r\n\r\n<div class=\"row\">\r\n<div class=\"col-md-4 pull-right\">\r\n<strong>Current Balance:<\/strong>\r\n<span>{currency}{invoice_current_balance}<\/span>\r\n<\/div>\r\n<\/div>\r\n\r\n<div class=\"row\"> <\/div>\r\n\r\n<div class=\"row\">\r\n<div class=\"col-md-12\">\r\nWe accept MasterCard, VISA, Discover, American Express and ACH payments. Do you have billing or payment questions? Contact billing at <b>{merchant_contact}<\/b>. We can also be reached via email, <b>{merchant_email}<\/b>.\r\n<\/div>\r\n<\/div>\r\n\r\n<div class=\"row\"> <\/div>"
}
}
This method lets you view a specific invoice footer.
HTTP Request
GET invoicefooter/{id}
URL Parameters
Parameter | Description |
---|---|
ID | The id of the invoice footer. |
View All
Returns JSON structured like this:
{
"data": [
{
"id": 2,
"footer_value":"<div class=\"row\">\r\n<div class=\"col-md-4 pull-right\">\r\n<strong>Total Tax:<\/strong>\r\n<span>{currency}{total_tax}<\/span>\r\n<\/div>\r\n<\/div>\r\n<div class=\"row\">\r\n <div class=\"col-md-4 pull-right\">\r\n <strong>Total:<\/strong>\r\n<span>{currency}{invoice_total}<\/span>\r\n<\/div>\r\n<\/div>\r\n\r\n<div class=\"row\">\r\n<div class=\"col-md-4 pull-right\">\r\n<strong>Current Balance:<\/strong>\r\n<span>{currency}{invoice_current_balance}<\/span>\r\n<\/div>\r\n<\/div>\r\n\r\n<div class=\"row\"> <\/div>\r\n\r\n<div class=\"row\">\r\n<div class=\"col-md-12\">\r\nWe accept MasterCard, VISA, Discover, American Express and ACH payments. Do you have billing or payment questions? Contact billing at <b>{merchant_contact}<\/b>. We can also be reached via email, <b>{merchant_email}<\/b>.\r\n<\/div>\r\n<\/div>\r\n\r\n<div class=\"row\"> <\/div>"
},
{
"id": 1,
"footer_value":"<div class=\"row\">\r\n<div class=\"col-md-4 pull-right\">\r\n<strong>Total Tax:<\/strong>\r\n<span>{currency}{total_tax}<\/span>\r\n<\/div>\r\n<\/div>\r\n<div class=\"row\">\r\n <div class=\"col-md-4 pull-right\">\r\n <strong>Total:<\/strong>\r\n<span>{currency}{invoice_total}<\/span>\r\n<\/div>\r\n<\/div>\r\n\r\n<div class=\"row\">\r\n<div class=\"col-md-4 pull-right\">\r\n<strong>Current Balance:<\/strong>\r\n<span>{currency}{invoice_current_balance}<\/span>\r\n<\/div>\r\n<\/div>\r\n\r\n<div class=\"row\"> <\/div>\r\n\r\n<div class=\"row\">\r\n<div class=\"col-md-12\">\r\nWe accept MasterCard, VISA, Discover, American Express and ACH payments. Do you have billing or payment questions? Contact billing at <b>{merchant_contact}<\/b>. We can also be reached via email, <b>{merchant_email}<\/b>.\r\n<\/div>\r\n<\/div>\r\n\r\n<div class=\"row\"> <\/div>"
}
],
"meta": {
"pagination": {
"total": 2,
"count": 2,
"per_page": 20,
"current_page": 1,
"total_pages": 1,
"links": []
}
}
}
This endpoint retrieves all invoice footer template.
HTTP Request
GET invoicefooter
Query Parameters
Parameter | Default | Description |
---|---|---|
limit | 20 | Number of items to show per page. |
page | 1 | Page number. |
Create
Returns JSON structured like this:
{
"data": {
"id": 1,
"footer_value":"<div class=\"row\">\r\n<div class=\"col-md-4 pull-right\">\r\n<strong>Total Tax:<\/strong>\r\n<span>{currency}{total_tax}<\/span>\r\n<\/div>\r\n<\/div>\r\n<div class=\"row\">\r\n <div class=\"col-md-4 pull-right\">\r\n <strong>Total:<\/strong>\r\n<span>{currency}{invoice_total}<\/span>\r\n<\/div>\r\n<\/div>\r\n\r\n<div class=\"row\">\r\n<div class=\"col-md-4 pull-right\">\r\n<strong>Current Balance:<\/strong>\r\n<span>{currency}{invoice_current_balance}<\/span>\r\n<\/div>\r\n<\/div>\r\n\r\n<div class=\"row\"> <\/div>\r\n\r\n<div class=\"row\">\r\n<div class=\"col-md-12\">\r\nWe accept MasterCard, VISA, Discover, American Express and ACH payments. Do you have billing or payment questions? Contact billing at <b>{merchant_contact}<\/b>. We can also be reached via email, <b>{merchant_email}<\/b>.\r\n<\/div>\r\n<\/div>\r\n\r\n<div class=\"row\"> <\/div>"
}
}
This method lets you create new invoice footer.
HTTP Request
POST invoicefooter
Data Object
Field Name | Required | Type | Description |
---|---|---|---|
footer_value | yes | string | Can be an html content. |
Update
Returns JSON structured like this:
{
"data": {
"id": 1,
"footer_value":"<div class=\"row\">\r\n<div class=\"col-md-4 pull-right\">\r\n<strong>Total Tax:<\/strong>\r\n<span>{currency}{total_tax}<\/span>\r\n<\/div>\r\n<\/div>\r\n<div class=\"row\">\r\n <div class=\"col-md-4 pull-right\">\r\n <strong>Total:<\/strong>\r\n<span>{currency}{invoice_total}<\/span>\r\n<\/div>\r\n<\/div>\r\n\r\n<div class=\"row\">\r\n<div class=\"col-md-4 pull-right\">\r\n<strong>Current Balance:<\/strong>\r\n<span>{currency}{invoice_current_balance}<\/span>\r\n<\/div>\r\n<\/div>\r\n\r\n<div class=\"row\"> <\/div>\r\n\r\n<div class=\"row\">\r\n<div class=\"col-md-12\">\r\nWe accept MasterCard, VISA, Discover, American Express and ACH payments. Do you have billing or payment questions? Contact billing at <b>{merchant_contact}<\/b>. We can also be reached via email, <b>{merchant_email}<\/b>.\r\n<\/div>\r\n<\/div>\r\n\r\n<div class=\"row\"> <\/div>"
}
}
This method lets you update a specific invoice footer.
HTTP Request
PUT invoicefooter/{id}
Data Object
Field Name | Required | Type | Description |
---|---|---|---|
footer_value | yes | string | Can be an html content. |
Remove
Returns true if successfull:
true
This method lets you remove a specific invoice footer.
HTTP Request
DELETE invoicefooter/{id}
Recurring
Recurring handles all types of recurring plans.
View
Returns JSON structured like this:
{
"data": {
"customer": {
"custID": "tokenex-0010",
"name": "CMS Test"
},
"paymentDetails": {
"payID": 51,
"method": "card",
"lastfour": "XXXXXXXXXXXX2223",
"token": "6e7c016b-ce56-4c2b-8151-f7a12ec4b670",
"cardType": "visa",
"source": "tokenex"
},
"recurring": {
"id": 558,
"status": "ongoing",
"type": "payplan",
"scheme": "monthly",
"amount": "12.50",
"total": "87.50",
"duration": 8,
"startDate": "2017-03-07",
"completedDate": "",
"nextDueDate": "2017-04-07",
"paidCount": 1,
"refnum": null,
"logs": [
{
"refnum": "8a8294495a8ed807015aa7d19ea22a06",
"date": "2017-03-07",
"error": 0,
"reason": "",
"total": "12.50"
}
]
},
"info": {
"gatewayID": 1,
"name": "usaepay",
"referrer": null,
"clientIP": "127.0.0.1",
"mid": "100000000000088",
"userID": 18,
"userKey": "userkeylocal",
"proccessTime": 0,
"tranToken": null
}
}
}
This endpoint retrieves a specific recurring.
HTTP Request
GET recurring/<PLANID>
URL Parameters
Parameter | Description |
---|---|
PLANID | The ID of the recurring plan to retrieve. |
View All
Returns JSON structured like this:
{
"data": [
{
"customer": {
"custID": "tokenex-0016",
"name": "CMS Test"
},
"paymentDetails": {
"payID": 79,
"method": "card",
"lastfour": "XXXXXXXXXXXX2224",
"token": "1m7q-46i2-qr7k-lstu",
"cardType": "visa",
"source": "usaepay"
},
"recurring": {
"id": 558,
"status": "ongoing",
"type": "payplan",
"scheme": "monthly",
"amount": "12.50",
"total": "87.50",
"duration": 8,
"startDate": "2017-03-07",
"completedDate": "",
"nextDueDate": "2017-04-07",
"paidCount": 1,
"refnum": null,
"logs": [
{
"refnum": "8a8294495a8ed807015aa7d19ea22a06",
"date": "2017-03-07",
"error": 0,
"reason": "",
"total": "12.50"
}
]
},
"info": {
"gatewayID": 1,
"name": "usaepay",
"referrer": null,
"clientIP": "127.0.0.1",
"mid": "100000000000088",
"userID": 18,
"userKey": "userkeylocal",
"proccessTime": 0,
"tranToken": null
}
},
{
"customer": {
"custID": "tokenex-0016",
"name": "CMS Test"
},
"paymentDetails": {
"payID": 80,
"method": "card",
"lastfour": "XXXXXXXXXXXX2224",
"token": "deed1544-84c7-4ba5-8d2a-a24ef5c5407e",
"cardType": "visa",
"source": "tokenex"
},
"recurring": {
"id": 538,
"status": "ongoing",
"type": "subscription",
"scheme": "monthly",
"amount": "1.00",
"total": "0.00",
"duration": 0,
"startDate": "2017-02-14",
"completedDate": "",
"nextDueDate": "2017-03-14",
"paidCount": 1,
"refnum": null,
"logs": [
{
"refnum": "8a8294495a8ed807015aa7d19ea22a06",
"date": "2017-03-07",
"error": 0,
"reason": "",
"total": "12.50"
}
]
},
"info": {
"gatewayID": 1,
"name": "usaepay",
"referrer": null,
"clientIP": "127.0.0.1",
"mid": "100000000000088",
"userID": 18,
"userKey": "userkeylocal",
"proccessTime": 0,
"tranToken": null
}
},
{
"customer": {
"custID": "tokenex-0016",
"name": "CMS Test"
},
"paymentDetails": {
"payID": 79,
"method": "card",
"lastfour": "XXXXXXXXXXXX2224",
"token": "1m7q-46i2-qr7k-lstu",
"cardType": "visa",
"source": "usaepay"
},
"recurring": {
"id": 520,
"status": "completed",
"type": "payplan",
"scheme": "monthly",
"amount": "3.12",
"total": "-2.12",
"duration": 6,
"startDate": "2017-02-14",
"completedDate": {
"date": "2017-02-14 20:29:09.000000",
"timezone_type": 3,
"timezone": "America/Los_Angeles"
},
"nextDueDate": "2017-02-14",
"paidCount": 1,
"refnum": null,
"logs": [
{
"refnum": "8a8294495a8ed807015aa7d19ea22a06",
"date": "2017-03-07",
"error": 0,
"reason": "",
"total": "12.50"
}
]
},
"info": {
"gatewayID": 1,
"name": "usaepay",
"referrer": null,
"clientIP": "127.0.0.1",
"mid": "100000000000088",
"userID": 18,
"userKey": "userkeylocal",
"proccessTime": 0,
"tranToken": null
}
}
],
"meta": {
"pagination": {
"total": 539,
"count": 3,
"per_page": 3,
"current_page": 1,
"total_pages": 27,
"links": {
"next": "http://api.slycepay.com/v2/recurring?page=2"
}
}
}
}
This endpoint retrieves all recurring plans.
HTTP Request
GET recurring
Query Parameters
Parameter | Default | Description |
---|---|---|
customer | If set, the result will include only recurring plans associated with specific customer. | |
status | If set, the result will include only recurring plans with specific status. Possible values are “ongoing”, “cancelled”, and “completed”. | |
type | If set, the result will include only recurring plans with specific type. Possible values are “subscription” and “payplan”. | |
limit | 20 | Number of items to show per page. |
page | 1 | Page number. |
Create
Returns JSON structured like this:
{
"data": {
"customer": {
"custID": "tokenex-0016",
"name": "CMS Test"
},
"paymentDetails": {
"payID": 72,
"method": "card",
"lastfour": "XXXXXXXXXXXX2224",
"token": "78631c9b-a28c-4d69-af09-313b439783c7",
"cardType": "visa",
"source": "tokenex"
},
"recurring": {
"id": 540,
"status": "ongoing",
"type": "payplan",
"scheme": "monthly",
"amount": "1.00",
"total": "1.00",
"duration": 6,
"startDate": "2017-03-01",
"completedDate": "",
"nextDueDate": "2017-03-01",
"paidCount": 0,
"refnum": null,
"logs": [
{
"refnum": "8a8294495a8ed807015aa7d19ea22a06",
"date": "2017-03-07",
"error": 0,
"reason": "",
"total": "12.50"
}
]
},
"info": {
"gatewayID": 4,
"name": "acapture",
"referrer": null,
"clientIP": "127.0.0.1",
"mid": "100000000000088",
"userID": 32,
"userKey": "userkeylocal",
"proccessTime": 0,
"tranToken": null
}
}
}
This method lets you create new recurring plan.
HTTP Request
POST recurring
Query Parameters
Parameter | Description |
---|---|
customer* | The customer ID. |
method* | The payment method to use. Format: cc:<id> for cards. ach:<id> for ACH/Check payments. E.g.: cc:12 . |
type* | Plan type. “S” for subscription and “P” for recurring plan. |
scheme* | The plan scheme type. “M” for monthly, “Y” for annually/yearly, “W” for weekly, “BW” for bi-weekly, and “Q” for quarterly. |
amount* | The due amount. |
start* | The date the plan will start in YYYY-MM-DD format. (e.g 2015-10-12). |
fee | Initial fee amount. |
callback | The URL that will be use by the system when a payment has been made. |
duration | The payment count limit. Applies only to payplan. |
total | Total amount that will be charge for the entire plan period. Applies only to payplan. |
Update
Returns JSON structured like this:
{
"data": {
"customer": {
"custID": "tokenex-0016",
"name": "CMS Test"
},
"paymentDetails": {
"payID": 72,
"method": "card",
"lastfour": "XXXXXXXXXXXX2224",
"token": "78631c9b-a28c-4d69-af09-313b439783c7",
"cardType": "visa",
"source": "tokenex"
},
"recurring": {
"id": 540,
"status": "ongoing",
"type": "payplan",
"scheme": "monthly",
"amount": "1.00",
"total": "1.00",
"duration": 6,
"startDate": "2017-03-01",
"completedDate": "",
"nextDueDate": "2017-03-01",
"paidCount": 0,
"refnum": null,
"logs": [
{
"refnum": "8a8294495a8ed807015aa7d19ea22a06",
"date": "2017-03-07",
"error": 0,
"reason": "",
"total": "12.50"
}
]
},
"info": {
"gatewayID": 4,
"name": "acapture",
"referrer": null,
"clientIP": "127.0.0.1",
"mid": "100000000000088",
"userID": 32,
"userKey": "userkeylocal",
"proccessTime": 0,
"tranToken": null
}
}
}
This method lets you update existing recurring plan.
HTTP Request
PUT recurring/<PLANID>
URL Parameters
Parameter | Description |
---|---|
PLANID | The ID of the recurring plan to retrieve. |
Query Parameters
Parameter | Description |
---|---|
method | The payment method to use. Format: cc:<id> for cards. ach:<id> for ACH/Check payments. E.g.: cc:12 . |
scheme | The plan scheme type. “M” for monthly, “Y” for annually/yearly, “W” for weekly, “BW” for bi-weekly, and “Q” for quarterly. |
amount | The due amount. |
callback | The URL that will be use by the system when a payment has been made. |
Cancel Plan
Returns
[]
on successful
This method lets you cancel recurring plan
HTTP Request
DELETE recurring/<PLANID>
URL Parameters
Parameter | Description |
---|---|
PLANID | The ID of the recurring plan to be cancelled. |
Logs
Returns JSON structured like this:
{
"data": [
{
"customer": [],
"paymentDetails": [],
"recurring": {
"logs": {
"refnum": "8a82944a5a8ee61d015aa7d2cc845f70",
"date": "2017-03-07",
"total": "10.00",
"error": false,
"reason": ""
}
},
"info": []
},
{
"customer": [],
"paymentDetails": [],
"recurring": {
"logs": {
"refnum": "8a82944a5a8ee61d015aa7d37f1b6045",
"date": "2017-03-07",
"total": "10.00",
"error": false,
"reason": ""
}
},
"info": []
},
],
"meta": {
"pagination": {
"total": 35,
"count": 2,
"per_page": 2,
"current_page": 1,
"total_pages": 2,
"links": {
"next": "http://api.slycepay.com/v2/recurring/559/logs?page=2"
}
}
}
}
This method lets view all logs in a specific plan.
HTTP Request
GET recurring/<PLANID>/logs
URL Parameters
Parameter | Description |
---|---|
PLANID | The ID of the recurring plan to retrieve logs. |
Fees
View
Returns JSON structured like this:
{
"data": {
"id": 1,
"payplan_id": 1,
"sku": "123",
"amount": "123.50",
"description": "Test fee.",
"completed": true
}
}
This method lets you view specific fee.
HTTP Request
GET recurring/<PLANID>/fees/<FEEID>
URL Parameters
Parameter | Description |
---|---|
PLANID | The ID of the recurring plan to retrieve fees. |
FEEID | The ID of the fee. |
View All
Returns JSON structured like this:
{
"data": [
{
"id": 1,
"payplan_id": 1,
"sku": "123",
"amount": "12.00",
"description": "Test Fee.",
"completed": true
},
{
"id": 2,
"payplan_id": 1,
"sku": "",
"amount": "10.00",
"description": "",
"completed": true
}
],
"meta": {
"pagination": {
"total": 6,
"count": 2,
"per_page": 2,
"current_page": 1,
"total_pages": 3,
"links": {
"next": "http://api.slycepay.com/v1/recurring/1/fees/?limit=2&page=1"
}
}
}
}
This method lets you view all fees in a specific plan.
HTTP Request
GET recurring/<PLANID>/fees
URL Parameters
Parameter | Description |
---|---|
PLANID | The ID of the recurring plan to retrieve fees. |
Create
Returns JSON structured like this:
{
"data": {
"id": 1,
"payplan_id": 1,
"sku": "123",
"amount": "12.52",
"description": "Test fee 2.",
"completed": true
}
}
This method lets you create new fee.
HTTP Request
POST recurring/<PLANID>/fees
URL Parameters
Parameter | Description |
---|---|
PLANID | The ID of the recurring plan to retrieve fees. |
Query Parameters
Parameter | Default | Description |
---|---|---|
amount | Fee amount. | |
sku | Tracking id for keeping purposes. |
Delete
Returns
true
on successful
This method lets you remove the unpaid fees identified by an SKU.
HTTP Request
DELETE recurring/<PLANID>/fees/<SKU>
URL Parameters
Parameter | Description |
---|---|
PLANID | The ID of the recurring plan to retrieve fees. |
SKU | Sku id provided. |
Customers
View
Returns JSON structured like this:
{
"data": {
"customer": {
"id": "tokenex-0016",
"firstname": "CMS Test",
"lastname": "last name",
"email": "email@domain.com",
"company": "Zylun PH",
"phone": "123-1234-123",
"fax": "123-1234-123",
"city": "Cebu",
"street": "Andresasdfsdfsd Abellana St.",
"street2": "Andres Abellana St.",
"state": "Cebu",
"country": "Philippines",
"zip": "6000",
"custom_fields": [],
"created": 1486093551,
"updated": 1486093551
},
"paymentDetails": [
{
"payID": 72,
"method": "card",
"lastfour": "XXXXXXXXXXXX2224",
"token": "78631c9b-a28c-4d69-af09-313b439783c7",
"cardType": "visa",
"source": "tokenex"
},
{
"payID": 73,
"method": "card",
"lastfour": "XXXXXXXXXXXX2224",
"token": "7b11f685-8aa9-46ba-b7fc-6629457f2e4e",
"cardType": "visa",
"source": "tokenex"
}
]
}
}
This endpoint retrieves specific customer.
HTTP Request
GET customers/<CUSTID>
URL Parameters
Parameter | Description |
---|---|
CUSTID | The ID of the customer to retrieve. |
View All
Returns JSON structured like this:
{
"data": [
{
"customer": {
"id": "CUST-199x",
"firstname": "Kimmy Inc.",
"lastname": "Bond",
"email": "email@domain.com",
"company": "Zylun PH",
"phone": "123-1234-123",
"fax": "123-1234-123",
"city": "Cebu",
"street": "Andres Abellana St.",
"street2": "Andres Abellana St.",
"state": "Cebu",
"country": "Philippines",
"zip": "6000",
"custom_fields": [],
"created": 1458284184,
"updated": 1458284184
},
"paymentDetails": [
{
"payID": 2,
"method": "card",
"lastfour": "XXXXXXXXXXXX2220",
"token": "y6zf-cmq0-s4jk-eabo",
"cardType": "Visa",
"source": "usaepay"
},
{
"id": 1,
"method": "ach",
"number": "123",
"account": "XXXX-X678-9",
"routing": "XXXX-X678-9",
"type": "checking",
"active": true
}
]
},
{
"customer": {
"id": "test-235",
"firstname": "CMS Test",
"lastname": "Bond",
"email": "email@domain.com",
"company": "Zylun PH",
"phone": "123-1234-123",
"fax": "123-1234-123",
"city": "Cebu",
"street": "Compostela",
"street2": "Compostela",
"state": "Cebu",
"country": "Philippines",
"zip": "6003",
"custom_fields": [],
"created": 1477455361,
"updated": 1477455361
},
"paymentDetails": []
},
{
"customer": {
"id": "TESTAGAIN",
"firstname": "Vault Test",
"lastname": "Bond",
"email": "email@domain.com",
"company": "Zylun PH",
"phone": "123-1234-123",
"fax": "123-1234-123",
"city": "Cebu",
"street": "Compostela",
"street2": "Compostela",
"state": "Cebu",
"country": "Philippines",
"zip": "6003",
"custom_fields": [],
"created": 1477458149,
"updated": 1477458149
},
"paymentDetails": []
},
],
"meta": {
"pagination": {
"total": 27,
"count": 20,
"per_page": 20,
"current_page": 1,
"total_pages": 2,
"links": {
"next": "http://api.slycepay.com/v2/customers?page=2"
}
}
}
}
This endpoint retrieves all customers.
HTTP Request
GET customers
Query Parameters
Parameter | Default | Description |
---|---|---|
limit | 20 | Number of items to show per page. |
page | 1 | Page number. |
Create
Returns JSON structured like this:
{
"data": {
"customer": {
"id": "cust-212",
"firstname": "erwin",
"lastname": "zylun",
"email": "email@domain.com",
"company": "CMS",
"phone": "1234-1234-1234",
"fax": "1234-1234-1234",
"city": "Cebu",
"street": "it park",
"street2": "it park",
"state": "cebu",
"country": "Philippines",
"zip": "6000",
"custom_fields": [],
"created": 1489733229,
"updated": 1489733229
},
"paymentDetails": []
}
}
This endpoint creates new customer.
HTTP Request
POST customers
Query Parameters
Parameter | Default | Description |
---|---|---|
custid* | Customer ID. | |
firstname* | First name. | |
lastname* | Last name. | |
email* | The email address. | |
company | Company name if applicable. | |
phone | The phone number. | |
fax | The fax number. | |
city | City address. | |
street | Address. | |
street2 | Alternate address. | |
state | State address. | |
country | Country. | |
zip | Zip/Postal code. |
Update
Returns JSON structured like this:
{
"data": {
"customer": {
"id": "cust-212",
"firstname": "marlonx7",
"lastname": "gallego",
"email": "email@domain.com",
"company": "Zylun PH",
"phone": "123-1234-123",
"fax": "123-1234-123",
"city": "mandaue2",
"street": "upper tabok, pc suico st.",
"street2": "it park",
"state": "cebu",
"country": "philippines",
"zip": "6014",
"custom_fields": [
"user_account": "123456"
],
"created": 1489733229,
"updated": 1489733272
},
"paymentDetails": []
}
}
This endpoint updates existing customer.
HTTP Request
PUT customers/<ID>
Query Parameters
Parameter | Default | Description |
---|---|---|
firstname | First name. | |
lastname | Last name. | |
The email address. | ||
company | Company name if applicable. | |
phone | The phone number. | |
fax | The fax number. | |
city | City address. | |
street | Address. | |
street2 | Alternate address. | |
state | State address. | |
country | Country. | |
zip | Zip/Postal code. | |
userid | The id of the user account of this customer. |
Cards
Add Card
Returns JSON structured like this:
{
"data": {
"customer": {
"custID": "cust-212",
"name": "marlonx7"
},
"paymentDetails": {
"payID": 95,
"method": "card",
"lastfour": "XXXXXXXXXXXX2228",
"token": "102931293810294012983109238",
"cardType": "visa",
"source": "tokenex"
},
"info": {
"gatewayID": 5,
"name": "nmi",
"referrer": null,
"clientIP": "127.0.0.1",
"mid": "513485000208199",
"userID": 84,
"userKey": "userkeylocal",
"proccessTime": 0
}
}
}
This method lets you add a card token to a customer. Full card numbers are only accepted through the Plugin.
HTTP Request
POST customers/<CUSTID>/cards
URL Parameters
Parameter | Description |
---|---|
CUSTID | The ID of the customer. |
Query Parameters
Parameter | Default | Description |
---|---|---|
lastfour* | Last Four digits of the card number. | |
reference* | Card Reference token. Accepts only tokens generated by the Plugin. | |
type* | Type of card (Visa, Mastercard, etc). | |
name | Nickname for the card. This is not the Card Holder Name. |
View
Returns JSON structured like this:
{
"data": {
"paymentDetails": {
"payID": 95,
"method": "card",
"lastfour": "XXXXXXXXXXXX2228",
"token": "102931293810294012983109238",
"cardType": "visa",
"source": "tokenex"
}
}
}
This endpoint retrieves specific customer’s credit method details.
HTTP Request
GET customers/<CUSTID>/cards/<METHODID>
URL Parameters
Parameter | Description |
---|---|
CUSTID | The ID of the customer. |
METHODID | Method ID. |
View All
Returns JSON structured like this:
{
"data": [
{
"paymentDetails": {
"payID": 95,
"method": "card",
"lastfour": "XXXXXXXXXXXX2228",
"token": "102931293810294012983109238",
"cardType": "visa",
"source": "tokenex"
}
}
],
"meta": {
"pagination": {
"total": 1,
"count": 1,
"per_page": 20,
"current_page": 1,
"total_pages": 1,
"links": []
}
}
}
This endpoint retrieves all customer’s cards.
HTTP Request
GET customers/<CUSTID>/cards
URL Parameters
Parameter | Description |
---|---|
CUSTID | The ID of the customer. |
Delete
Returns
true
on successful
This method lets you remove saved credit.
HTTP Request
DELETE customers/<CUSTID>/cards/<METHODID>
URL Parameters
Parameter | Description |
---|---|
CUSTID | The ID of the customer. |
METHODID | Payment method ID. |
Checks
View
Returns JSON structured like this:
{
"data": {
"id": 1600,
"method": "check",
"name": "Test ACH",
"account": "XXXX-X678-9",
"routing": "XXXX-X678-9"
}
}
This endpoint retrieves specific customer’s check details.
HTTP Request
GET customers/<CUSTID>/checks/<METHODID>
URL Parameters
Parameter | Description |
---|---|
CUSTID | The ID of the customer. |
METHODID | Method ID. |
View All
Returns JSON structured like this:
{
"data": [
{
"customer": {
"custID": "cust-212",
"name": "marlonx7"
},
"paymentDetails": {
"id": 7,
"method": "ach",
"number": "123456789",
"account": "XXXX-X678-9",
"routing": "XXXX-X678-9",
"type": "checking",
"active": true
},
"info": {
"gatewayID": 1,
"name": "usaepay",
"referrer": null,
"clientIP": "127.0.0.1",
"mid": "513485000208199",
"userID": 18,
"userKey": "userkeylocal",
"proccessTime": 0
}
},
{
"customer": {
"custID": "cust-212",
"name": "marlonx7"
},
"paymentDetails": {
"id": 8,
"method": "ach",
"number": "123456789",
"account": "XXXX-X678-9",
"routing": "XXXX-X678-9",
"type": "checking",
"active": true
},
"info": {
"gatewayID": 1,
"name": "usaepay",
"referrer": null,
"clientIP": "127.0.0.1",
"mid": "513485000208199",
"userID": 18,
"userKey": "userkeylocal",
"proccessTime": 0
}
},
{
"customer": {
"custID": "cust-212",
"name": "marlonx7"
},
"paymentDetails": {
"id": 9,
"method": "ach",
"number": "123456789",
"account": "XXXX-X678-9",
"routing": "XXXX-X678-9",
"type": "checking",
"active": true
},
"info": {
"gatewayID": 1,
"name": "usaepay",
"referrer": null,
"clientIP": "127.0.0.1",
"mid": "513485000208199",
"userID": 18,
"userKey": "userkeylocal",
"proccessTime": 0
}
},
{
"customer": {
"custID": "cust-212",
"name": "marlonx7"
},
"paymentDetails": {
"id": 10,
"method": "ach",
"number": "123456789",
"account": "XXXX-X678-9",
"routing": "XXXX-X678-9",
"type": "checking",
"active": true
},
"info": {
"gatewayID": 1,
"name": "usaepay",
"referrer": null,
"clientIP": "127.0.0.1",
"mid": "513485000208199",
"userID": 18,
"userKey": "userkeylocal",
"proccessTime": 0
}
},
{
"customer": {
"custID": "cust-212",
"name": "marlonx7"
},
"paymentDetails": {
"id": 11,
"method": "ach",
"number": "123456789",
"account": "XXXX-X678-9",
"routing": "XXXX-X678-9",
"type": "checking",
"active": true
},
"info": {
"gatewayID": 1,
"name": "usaepay",
"referrer": null,
"clientIP": "127.0.0.1",
"mid": "513485000208199",
"userID": 18,
"userKey": "userkeylocal",
"proccessTime": 0
}
}
]
}
This endpoint retrieves all customer’s saved checks.
HTTP Request
GET customers/<CUSTID>/checks
URL Parameters
Parameter | Description |
---|---|
CUSTID | The ID of the customer. |
Create
Returns JSON structured like this:
{
"data": {
"customer": {
"custID": "cust-212",
"name": "marlonx7"
},
"paymentDetails": {
"id": 11,
"method": "ach",
"number": "123456789",
"account": "XXXX-X678-9",
"routing": "XXXX-X678-9",
"type": "checking",
"active": true
},
"info": {
"gatewayID": 5,
"name": "nmi",
"referrer": null,
"clientIP": "127.0.0.1",
"mid": "513485000208199",
"userID": 84,
"userKey": "userkeylocal",
"proccessTime": 0
}
}
}
This endpoint creates new customer’s check.
HTTP Request
POST customers/<CUSTID>/checks
URL Parameters
Parameter | Description |
---|---|
CUSTID | The ID of the customer. |
Query Parameters
Parameter | Default | Description |
---|---|---|
account* | Account number. | |
routing* | Routing number. | |
check | Check number. | |
name | Nickname for payment Method. |
Delete
Returns
true
on successful
This method lets you remove saved checks.
HTTP Request
DELETE customers/<CUSTID>/checks/<METHODID>
URL Parameters
Parameter | Description |
---|---|
CUSTID | The ID of the customer. |
METHODID | Payment method ID. |
User
View
Returns JSON structured like this:
{
"data": {
"id": 142968,
"username": "nbieuser",
"name": "Newbie Custy",
"email": "email@domain.com",
"recent_login": null,
"date_added": "2017-06-28 22:20:05"
}
}
This endpoint retrieves customer’s user account.
HTTP Request
GET customers/<CUSTID>/user
URL Parameters
Parameter | Description |
---|---|
CUSTID | The ID of the customer. |
Create
Returns JSON structured like this:
{
"data": {
"id": 142968,
"username": "nbieuser",
"name": "Newbie Custy",
"email": "email@domain.com",
"recent_login": null,
"date_added": "2017-06-28 22:20:05"
}
}
This endpoint creates new customer’s user account.
HTTP Request
POST customers/<CUSTID>/user
URL Parameters
Parameter | Description |
---|---|
CUSTID | The ID of the customer. |
Query Parameters
Field Name | Required | Type | Description |
---|---|---|---|
firstname | yes | string | |
lastname | yes | string | |
yes | string | Should be email | |
username | yes | string | Should be unique |
password | yes | string |
Update
Returns JSON structured like this:
{
"data": {
"id": 142968,
"username": "nbieuser",
"name": "Newbie Custy",
"email": "email@domain.com",
"recent_login": null,
"date_added": "2017-06-28 22:20:05"
}
}
This endpoint updates existing customer’s user account.
HTTP Request
POST customers/<CUSTID>/user/<USERID>
URL Parameters
Parameter | Description |
---|---|
CUSTID | The ID of the customer. |
USERID | User ID. |
Query Parameters
Field Name | Required | Type | Description |
---|---|---|---|
firstname | yes | string | |
lastname | yes | string | |
yes | string | Should be email | |
username | yes | string | Should be unique |
Delete
Returns
true
on successful
This method lets you remove customer’s user account.
HTTP Request
DELETE customers/<CUSTID>/user/<USERID>
URL Parameters
Parameter | Description |
---|---|
CUSTID | The ID of the customer. |
USERID | User ID. |
Transactions
Auth Only
Returns JSON structured like this:
{
"data": {
"status": {
"result": "authonly",
"resultCode": "A",
"status": "pending",
"statusCode": "P",
"error": "",
"message": ""
},
"details": {
"amount": "131.5",
"type": "authonly",
"refNum": "8a82944a5a184b46015a269cfc832f8c",
"authCode": "400010",
"transactionDate": "2017-02-09 22:01:45",
"batchID": "",
"invoice": "",
"orderID": "",
"description": "",
"callbackURL": "",
"submittedBy": "",
"comments": "",
"custom": null,
"userCustom": null,
"lineitems": []
},
"customer": {
"custID": "wilson-007",
"name": "Wilson Empleo",
"company": "Zylun PH"
},
"paymentDetails": {
"payID": 1,
"method": "card",
"cardNum": "XXXXXXXXXXXX2224",
"cardType": "visa"
},
"info": {
"gatewayID": 4,
"name": "acapture",
"referrer": "",
"clientIP": "127.0.0.1",
"mid": "513485000208199",
"userID": 29,
"userKey": "slicelocal_acapture",
"proccessTime": "4213.60",
"tranToken": "89893b3e5b8edefcc1480557e5f35fb6"
}
}
}
This method is for running a auth only transaction. It supports only card transactions. This method will only accept payIDs or card tokens generated by the Plugin. It will not accept full card numbers. The details for saving cards through the Plugin can be found in the Plugin documentation.
HTTP Request
POST transactions/authonly
Query Parameters
Parameter | Default | Description |
---|---|---|
amount* | Full amount to be authorized. Pass 0 to run a zero auth(cannot be captured later). | |
paymethod* | Payment method to be used. Can either be a payID or card token. Full card numbers will not be accepted. | |
customer | Unique Customer ID | |
billing[firstname] | First name | |
billing[lastname] | Last name | |
custom_field[one] | First custom field | |
custom_field[two] | Second custom field | |
lineitem1[sku] | Lineitem sku | |
lineitem1[productname] | Lineitem product name | |
lineitem1[description] | Lineitem description | |
lineitem1[unitprice] | Lineitem unit price | |
lineitem1[qty] | Lineitem quantity | |
lineitem1[taxable] | Lineitem taxable |
Capture Sale
Returns JSON structured like this:
{
"data": {
"status": {
"result": "approved",
"resultCode": "A",
"status": "settled",
"statusCode": "S",
"error": "",
"message": ""
},
"details": {
"amount": "131.50",
"type": "capture",
"refNum": "8a8294495a18272f015a269da9a57084",
"authCode": "",
"transactionDate": "2017-02-09 22:02:28",
"batchID": "",
"invoice": "",
"orderID": "",
"description": "",
"callbackURL": "",
"submittedBy": "",
"comments": "",
"custom": null,
"userCustom": null,
"lineitems": []
},
"customer": {
"custID": "wilson-007",
"name": "Wilson Empleo",
"company": "Zylun PH"
},
"paymentDetails": [],
"info": {
"gatewayID": 4,
"name": "acapture",
"referrer": "",
"clientIP": "127.0.0.1",
"mid": "513485000208199",
"userID": 29,
"userKey": "slicelocal_acapture",
"proccessTime": "2002.23",
"tranToken": "976035d82bd81273b2eee783bbc7f2d6"
}
}
}
This method will capture an Auth Only transaction. This action will complete the transaction and the customer’s card will be charged.
HTTP Request
GET transactions/<REFNUM>/capture
URL Parameters
Parameter | Description |
---|---|
REFNUM | Transaction reference number |
Run Sale
Returns JSON structured like this:
{
"data": {
"status": {
"result": "approved",
"resultCode": "A",
"status": "settled",
"statusCode": "S",
"error": "",
"message": ""
},
"details": {
"amount": "1.34",
"type": "sale",
"refNum": "8a8294495a18272f015a268f85e06d12",
"authCode": "400010",
"transactionDate": "2017-02-09 21:46:50",
"batchID": "",
"invoice": "",
"orderID": "",
"description": "",
"callbackURL": "",
"submittedBy": "",
"comments": "",
"custom": null,
"userCustom": null,
"lineitems": []
},
"customer": null,
"paymentDetails": {
"payID": 40,
"method": "card",
"cardNum": "XXXXXXXXXXXX2224",
"cardType": "visa"
},
"info": {
"gatewayID": 4,
"name": "acapture",
"referrer": null,
"clientIP": "127.0.0.1",
"mid": "513485000208199",
"userID": 32,
"userKey": "slicelocal_acapture",
"proccessTime": "2920.87",
"tranToken": "bd04353ce87d8972dc9d257c9c86e9c4"
}
}
}
This method is for running a transaction. It supports either card(*) or eCheck/ACH(~) transactions. For card transactions you will use the paymethod. For eCheck/ACH you will use an account and routing number. The paymethod field will only accept payIDs or card tokens generated by the Plugin. It will not accept full card numbers. The details for saving cards through the Plugin can be found in the Plugin documentation.
HTTP Request
POST transactions/run
Query Parameters
Parameter | Default | Description |
---|---|---|
amount*~ | Full amount to be charged. | |
paymethod* | Payment method to be used. Can either be a payID or card token. Full card numbers will not be accepted. | |
customer | Unique Customer ID | |
checkData[account]~ | Bank Account Number | |
checkData[routing]~ | Bank Routing Number | |
billing[firstname] | First name | |
billing[lastname] | Last name | |
custom_field[one] | First custom field | |
custom_field[two] | Second custom field | |
lineitem1[sku] | Lineitem sku | |
lineitem1[productname] | Lineitem product name | |
lineitem1[description] | Lineitem description | |
lineitem1[unitprice] | Lineitem unit price | |
lineitem1[qty] | Lineitem quantity | |
lineitem1[taxable] | Lineitem taxable |
Refund Transaction
Returns JSON structured like this:
{
"data": {
"status": {
"result": "approved",
"resultCode": "A",
"status": "settled",
"statusCode": "S",
"error": "",
"message": ""
},
"details": {
"amount": ".1",
"type": "refund",
"refNum": "8a82944a5a184b46015a269301f32ce1",
"authCode": "",
"transactionDate": "2017-02-09 21:50:39",
"batchID": "",
"invoice": "",
"orderID": "",
"description": "",
"callbackURL": "",
"submittedBy": "",
"comments": "",
"custom": null,
"userCustom": null,
"lineitems": []
},
"customer": {
"custID": "tokenex-0016",
"name": "CMS Test last name",
"company": "Zylun PH"
},
"paymentDetails": [],
"info": {
"gatewayID": 4,
"name": "acapture",
"referrer": null,
"clientIP": "127.0.0.1",
"mid": "513485000208199",
"userID": 32,
"userKey": "slicelocal_acapture",
"proccessTime": "1728.68",
"tranToken": "e0b8e2fcafc2dd4082bff3206fc3a7d4"
}
}
}
This method lets you refund a transaction. Only transactions with status=settled can be refunded.
HTTP Request
POST transactions/<REFNUM>/refund
URL Parameters
Parameter | Description |
---|---|
REFNUM | Transaction reference number |
Query Parameters
Parameter | Default | Description |
---|---|---|
amount* | Amount of the transaction. Cannot exceed original transaction amount. |
Void Transaction
Returns JSON structured like this:
{
"data": {
"status": {
"result": "approved",
"resultCode": "A",
"status": "settled",
"statusCode": "S",
"error": "",
"message": ""
},
"details": {
"amount": "3.00",
"type": "void",
"refNum": "8a82944a5a184b46015a268ee42c2c08",
"authCode": "",
"transactionDate": "2017-02-09 21:46:09",
"batchID": "",
"invoice": "",
"orderID": "",
"description": "",
"callbackURL": "",
"submittedBy": "",
"comments": "",
"custom": null,
"userCustom": null,
"lineitems": []
},
"customer": {
"custID": "tokenex-0016",
"name": "CMS Test last name",
"company": "Zylun PH"
},
"paymentDetails": [],
"info": {
"gatewayID": 4,
"name": "acapture",
"referrer": null,
"clientIP": "127.0.0.1",
"mid": "513485000208199",
"userID": 32,
"userKey": "slicelocal_acapture",
"proccessTime": "1682.40",
"tranToken": "866069963b55ebe1c1b1839f38c075f3"
}
}
}
This method lets you void a transaction. Only transactions with status=pending can be voided. Partial amounts are not possible with voids, the entire amount will be voided.
HTTP Request
POST transactions/<REFNUM>/void
URL Parameters
Parameter | Description |
---|---|
REFNUM | Transaction reference number |
Reverse ACH
Returns JSON structured like this:
{
"data": {
"status": {
"result": "approved",
"resultCode": "A",
"status": "Pending",
"statusCode": "P",
"error": null,
"message": null
},
"details": {
"amount": "1",
"type": "reverse",
"refNum": "131435864",
"authCode": "TM3B06",
"transactionDate": "2018-01-26 10:13:18",
"batchID": -1,
"invoice": "",
"orderID": "",
"description": "",
"callbackURL": "",
"submittedBy": "",
"comments": "",
"custom": null,
"userCustom": null,
"lineitems": [],
"repID": "",
"source": "api"
},
"customer": {
"custID": "0001",
"name": "Andy Rogers",
"company": "Complete Merchant Solutions"
},
"paymentDetails": {
"method": "check",
"cardType": "checking",
"account": "XXXXX6789",
"routing": "XXXXX6789"
},
"info": {
"gatewayID": 380,
"name": "usaepay",
"referrer": "",
"clientIP": "64.77.244.75",
"mid": "100039",
"userID": 1000,
"userKey": "P0Rbr94flHNrQPXr",
"proccessTime": "1677.75",
"tranToken": "8ed0f0153020729730784d4cc20cfbe4"
}
}
}
This method is for running a a Reverse ACH transaction.
HTTP Request
POST transactions/reverse
Query Parameters
Parameter | Default | Description |
---|---|---|
amount* | Full amount to be charged. | |
checkData[account]* | Bank Account Number | |
checkData[routing]* | Bank Routing Number | |
customer | Unique Customer ID | |
billing[firstname] | First name | |
billing[lastname] | Last name | |
custom_field[one] | First custom field | |
custom_field[two] | Second custom field | |
lineitem1[sku] | Lineitem sku | |
lineitem1[productname] | Lineitem product name | |
lineitem1[description] | Lineitem description | |
lineitem1[unitprice] | Lineitem unit price | |
lineitem1[qty] | Lineitem quantity | |
lineitem1[taxable] | Lineitem taxable |
Reporting
View Transaction
Example of json return
{
"data": {
"status": {
"result": "approved",
"resultCode": "A",
"status": "pending",
"statusCode": "P",
"error": "",
"message": ""
},
"customer": {
"custID": "0001",
"name": "Andy Rogers"
},
"details": {
"amount": "1.00",
"type": "sale",
"refNum": "129785632",
"authCode": "965664",
"transactionDate": "2017-12-01 09:52:09",
"batchID": 43128,
"invoice": "1512150926",
"orderID": null,
"description": "Onetime Sale",
"callbackURL": null,
"submittedBy": null,
"comments": null,
"custom": null,
"lineitems": null,
"repID": null,
"source": "vault",
"trackingCode": null
},
"paymentDetails": {
"payID": 127667,
"method": "card",
"lastfour": "XXXXXXXXXXXX2224",
"token": "4099bce0-97aa-478b-a6b7-f34h11e4658c",
"cardType": "visa",
"source": "tokenex"
},
"info": {
"gatewayID": 999,
"name": "usaepay",
"referrer": null,
"clientIP": "64.77.244.00",
"mid": "100999",
"userID": 9999,
"userKey": "P0Rbrj87lHNrQPXr",
"proccessTime": "668.54"
}
}
}
View a single transaction record.
HTTP Request
GET transactions/<REFNUM>
View All Transactions
Example of pagination in the return.
{
"data": [
{}
],
"meta": {
"pagination": {
"total": 100,
"count": 10,
"per_page": 10,
"current_page": 1,
"total_pages": 10,
"links": {
"next": "https://api.slycepay.com/v2/transactions?limit=10&page=2"
}
}
}
}
View multiple transaction records.
This method makes use of different filter types.
- Comma separated lists. Example: status=pending,settled
- Greater then(gt) and less than(lt) available for numerical values. Example: amount=gt|100
- Dates are in YYYY-MM-DD format. Example: start=2017-10-24
HTTP Request
GET transactions/
Query Parameters
Parameter | Filter type | Available Values |
---|---|---|
refnum | List | |
amount | gt/lt | Decimal Numbers |
start | Date | YYYY-MM-DD |
end | Date | YYYY-MM-DD |
status | List | pending, settled, declined, error, void |
result | List | approved, declined, error |
type | List | sale, refund, recurring, authonly |
method | List | card, ach |
source | List | keyed, chip, swipe, mobile |
cardtype | List | visa, mastercard, discovery |
custom1-10 | Single Value | Parameter should be the word “custom” with a number after. Example: custom4=value |
Pagination
The returned results are separated into “Pages”. The number of results to return per page can be controlled with the parameter limit
(E.g. limit=20). The default is 20 results, max is 1000.
Representatives
View Representative
View a single Representative.
HTTP Request
GET representative/<REPID>
View All Representatives
View all Representatives.
HTTP Request
GET representative/
Create Representative
Create an Representative.
HTTP Request
POST representative/
Query Parameters
Parameter | Description |
---|---|
company | The Representative’s Company |
contact* | The contact name for the Representative |
address | The Representative’s Address |
phone | The Representative’s contact phone number |
The Representative’s email address | |
account | Bank Account number |
routing | Bank Account routing number |
Update Representative
Update an Representative.
HTTP Request
PUT representative/<REPID>
Query Parameters
Parameter | Description |
---|---|
company | The Representative’s Company |
contact | The contact name for the Representative |
address | The Representative’s Address |
phone | The Representative’s contact phone number |
The Representative’s email address | |
account | Bank Account number |
routing | Bank Account routing number |
Delete Representative
Permanently deletes an Representative.
HTTP Request
DELETE representative/<REPID>
Errors
Slyce API uses the following error codes:
Error response returned:
{
"error":
{
"code": "GEN-NOT-FOUND",
"http_code": 404,
"message": "Resource Not Found"
}
}
Error Code | Meaning |
---|---|
400 | Bad Request – Wrong arguments or parameters |
401 | Unauthorized – Your API key is invalid |
403 | Forbidden – The resource requested is hidden for administrators only |
404 | Not Found – The specified resource could not be found |
405 | Method Not Allowed – You tried to access a resource with an invalid method |
500 | Internal Server Error – We had a problem with our server. Try again later. |
503 | Service Unavailable – We’re temporarially offline for maintanance. Please try again later. |