Back to top

API v1.0 - Documentation

First of all, thanks for using our API. This documentation will guide you how to implement your application to take advantage of our payment, delivery and fraud control solutions.


Authorization

To do so, we need use keys in http headers for all requests as specified below:

X-Hubcash-Code: string
X-Hubcash-Token: string

Keys

If you don’t have these keys yet, you can can gain access following the links:

  • Production keys to your production environment;

  • Development keys to your development environment and testing;

“For both environments you can use the default endpoint.”


Support

Contact support team, you can always contact us to get more information.


Cards

Credit and debit cards can be saved to be used by the consumer recurrently transactions.

Cards

Details
GET/cards/{CardId}

Example URI

GET https://api.hubcash.com/v1/cards/CardId
URI Parameters
HideShow
CardId
string (required) 

Identifier

Request  example
HideShow
Headers
Content-Type: application/json
X-Hubcash-Code: <code>
X-Hubcash-Token: <token>
Response  200
HideShow
Headers
Content-Type: application/json
Body
{
  "Card": {
    "CardId": "58c040b32d8baf18526217f5",
    "Brand": "Visa",
    "HolderName": "Maria da Silva",
    "Document": "223.112.333.112",
    "Phone": "93 912323322",
    "LastDigits": "1234",
    "ExpMonth": "03",
    "ExpYear": "2022"
  }
}
Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "Card": {
      "type": "object",
      "properties": {
        "CardId": {
          "type": "string",
          "description": "Unique identifier"
        },
        "Brand": {
          "type": "string",
          "description": "Card brand name"
        },
        "HolderName": {
          "type": "string",
          "description": "Holder name"
        },
        "Document": {
          "type": "string",
          "description": "22 (required) - Document of the holder"
        },
        "Phone": {
          "type": "string",
          "description": "Optional phone of the holder"
        },
        "LastDigits": {
          "type": "string",
          "description": "Last digits of the cards"
        },
        "ExpMonth": {
          "type": "string",
          "description": "Card expiration month (mm)"
        },
        "ExpYear": {
          "type": "string",
          "description": "Card expiration year (yyyy)"
        }
      },
      "required": [
        "Brand",
        "HolderName",
        "ExpMonth",
        "ExpYear"
      ]
    }
  }
}
Response  401
HideShow
Headers
Content-Type: application/json
Body
{
  "Errors": [
    {
      "Type": "Authorization",
      "Field": "headers",
      "Description": "Authorization with the API failed"
    }
  ]
}
Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "Errors": {
      "type": "array"
    }
  }
}

Edit
PUT/cards/{CardId}

Example URI

PUT https://api.hubcash.com/v1/cards/CardId
URI Parameters
HideShow
CardId
string (required) 

Identifier

Request  example
HideShow
Headers
Content-Type: application/json
X-Hubcash-Code: <code>
X-Hubcash-Token: <token>
Body
{
  "Card": {
    "Brand": "Visa",
    "HolderName": "Maria da Silva",
    "Document": "223.112.333.112",
    "Phone": "93 912323322",
    "ExpMonth": "03",
    "ExpYear": "2022"
  }
}
Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "Card": {
      "type": "object",
      "properties": {
        "Brand": {
          "type": "string",
          "description": "Card brand name"
        },
        "HolderName": {
          "type": "string",
          "description": "Holder name"
        },
        "Document": {
          "type": "string",
          "description": "22 (required) - Document of the holder"
        },
        "Phone": {
          "type": "string",
          "description": "Optional phone of the holder"
        },
        "ExpMonth": {
          "type": "string",
          "description": "Card expiration month (mm)"
        },
        "ExpYear": {
          "type": "string",
          "description": "Card expiration year (yyyy)"
        }
      },
      "required": [
        "Brand",
        "HolderName",
        "ExpMonth",
        "ExpYear"
      ]
    }
  }
}
Response  200
HideShow
Headers
Content-Type: application/json
Body
{
  "Card": {
    "CardId": "58c040b32d8baf18526217f5",
    "Brand": "Visa",
    "HolderName": "Maria da Silva",
    "Document": "223.112.333.112",
    "Phone": "93 912323322",
    "LastDigits": "1234",
    "ExpMonth": "03",
    "ExpYear": "2022"
  }
}
Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "Card": {
      "type": "object",
      "properties": {
        "CardId": {
          "type": "string",
          "description": "Unique identifier"
        },
        "Brand": {
          "type": "string",
          "description": "Card brand name"
        },
        "HolderName": {
          "type": "string",
          "description": "Holder name"
        },
        "Document": {
          "type": "string",
          "description": "22 (required) - Document of the holder"
        },
        "Phone": {
          "type": "string",
          "description": "Optional phone of the holder"
        },
        "LastDigits": {
          "type": "string",
          "description": "Last digits of the cards"
        },
        "ExpMonth": {
          "type": "string",
          "description": "Card expiration month (mm)"
        },
        "ExpYear": {
          "type": "string",
          "description": "Card expiration year (yyyy)"
        }
      },
      "required": [
        "Brand",
        "HolderName",
        "ExpMonth",
        "ExpYear"
      ]
    }
  }
}
Response  400
HideShow
Headers
Content-Type: application/json
Body
{
  "Errors": [
    {
      "Type": "Error",
      "Field": "Name",
      "Description": "Required"
    }
  ]
}
Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "Errors": {
      "type": "array"
    }
  }
}
Response  401
HideShow
Headers
Content-Type: application/json
Body
{
  "Errors": [
    {
      "Type": "Authorization",
      "Field": "headers",
      "Description": "Authorization with the API failed"
    }
  ]
}
Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "Errors": {
      "type": "array"
    }
  }
}

Delete
DELETE/cards/{CardId}

Example URI

DELETE https://api.hubcash.com/v1/cards/CardId
URI Parameters
HideShow
CardId
string (required) 

Identifier

Request  example
HideShow
Headers
Content-Type: application/json
X-Hubcash-Code: <code>
X-Hubcash-Token: <token>
Response  200
HideShow
Headers
Content-Type: application/json
Body
{
  "Success": "Hello, world!"
}
Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "Success": {
      "type": "string"
    }
  }
}
Response  400
HideShow
Headers
Content-Type: application/json
Body
{
  "Errors": [
    {
      "Type": "Error",
      "Field": "Name",
      "Description": "Required"
    }
  ]
}
Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "Errors": {
      "type": "array"
    }
  }
}
Response  401
HideShow
Headers
Content-Type: application/json
Body
{
  "Errors": [
    {
      "Type": "Authorization",
      "Field": "headers",
      "Description": "Authorization with the API failed"
    }
  ]
}
Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "Errors": {
      "type": "array"
    }
  }
}

List of cards by document

Get a list of cards by consumer document.

List
GET/cards/document/{document}{?offset,rows}

Example URI

GET https://api.hubcash.com/v1/cards/document/document?offset=0&rows=10
URI Parameters
HideShow
document
string (required) 

Document of the consumer

offset
number (optional) Example: 0

Offset of rows

rows
number (optional) Example: 10

Number of rows

Request  example
HideShow
Headers
Content-Type: application/json
X-Hubcash-Code: <code>
X-Hubcash-Token: <token>
Response  200
HideShow
Headers
Content-Type: application/json
Body
{
  "Cards": [
    {
      "CardId": "58c040b32d8baf18526217f5",
      "Brand": "Visa",
      "HolderName": "Maria da Silva",
      "Document": "223.112.333.112",
      "Phone": "93 912323322",
      "LastDigits": "1234",
      "ExpMonth": "03",
      "ExpYear": "2022"
    }
  ]
}
Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "Cards": {
      "type": "array"
    }
  }
}
Response  401
HideShow
Headers
Content-Type: application/json
Body
{
  "Errors": [
    {
      "Type": "Authorization",
      "Field": "headers",
      "Description": "Authorization with the API failed"
    }
  ]
}
Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "Errors": {
      "type": "array"
    }
  }
}

Create New Card

Create
POST/cards

Example URI

POST https://api.hubcash.com/v1/cards
Request  example
HideShow
Headers
Content-Type: application/json
X-Hubcash-Code: <code>
X-Hubcash-Token: <token>
Body
{
  "Card": {
    "Brand": "Visa",
    "HolderName": "Maria da Silva",
    "Document": "223.112.333.112",
    "Phone": "93 912323322",
    "ExpMonth": "03",
    "ExpYear": "2022",
    "Number": "5162321366555222331234",
    "SecurityCode": "233"
  }
}
Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "Card": {
      "type": "object",
      "properties": {
        "Brand": {
          "type": "string",
          "description": "Card brand name"
        },
        "HolderName": {
          "type": "string",
          "description": "Holder name"
        },
        "Document": {
          "type": "string",
          "description": "22 (required) - Document of the holder"
        },
        "Phone": {
          "type": "string",
          "description": "Optional phone of the holder"
        },
        "ExpMonth": {
          "type": "string",
          "description": "Card expiration month (mm)"
        },
        "ExpYear": {
          "type": "string",
          "description": "Card expiration year (yyyy)"
        },
        "Number": {
          "type": "string",
          "description": "(Requests) Card number"
        },
        "SecurityCode": {
          "type": "string",
          "description": "Card security code"
        }
      },
      "required": [
        "Brand",
        "HolderName",
        "ExpMonth",
        "ExpYear",
        "Number",
        "SecurityCode"
      ]
    }
  }
}
Response  201
HideShow
Headers
Content-Type: application/json
Body
{
  "Card": {
    "CardId": "58c040b32d8baf18526217f5",
    "Brand": "Visa",
    "HolderName": "Maria da Silva",
    "Document": "223.112.333.112",
    "Phone": "93 912323322",
    "LastDigits": "1234",
    "ExpMonth": "03",
    "ExpYear": "2022"
  }
}
Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "Card": {
      "type": "object",
      "properties": {
        "CardId": {
          "type": "string",
          "description": "Unique identifier"
        },
        "Brand": {
          "type": "string",
          "description": "Card brand name"
        },
        "HolderName": {
          "type": "string",
          "description": "Holder name"
        },
        "Document": {
          "type": "string",
          "description": "22 (required) - Document of the holder"
        },
        "Phone": {
          "type": "string",
          "description": "Optional phone of the holder"
        },
        "LastDigits": {
          "type": "string",
          "description": "Last digits of the cards"
        },
        "ExpMonth": {
          "type": "string",
          "description": "Card expiration month (mm)"
        },
        "ExpYear": {
          "type": "string",
          "description": "Card expiration year (yyyy)"
        }
      },
      "required": [
        "Brand",
        "HolderName",
        "ExpMonth",
        "ExpYear"
      ]
    }
  }
}
Response  400
HideShow
Headers
Content-Type: application/json
Body
{
  "Errors": [
    {
      "Type": "Error",
      "Field": "Name",
      "Description": "Required"
    }
  ]
}
Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "Errors": {
      "type": "array"
    }
  }
}
Response  401
HideShow
Headers
Content-Type: application/json
Body
{
  "Errors": [
    {
      "Type": "Authorization",
      "Field": "headers",
      "Description": "Authorization with the API failed"
    }
  ]
}
Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "Errors": {
      "type": "array"
    }
  }
}

Sales

Status

The table below describes the list of possible status for Sales:

ID Name Description
1 Processed The sale has been received and processed
2 Analyzing The sale is in pending because fraud analysis
3 Capturing Waiting to capture
4 Waiting Payment For billets, awaiting payment confirmation
5 Fail The sale failed
6 Canceled Canceled
7 Done All the process of the sale was completed

Methods

The table below describes the list of possible methods for Sales:

ID Description
Credit Using credit card, accept installments
Debit Using debit card, does not accept installments
Billet Using billet, does not accept installments, has optional configuration in the panel

List of Sales

List
GET/sales{?offset,rows,Ref,Currency,Method,Capture,Status}

Example URI

GET https://api.hubcash.com/v1/sales?offset=0&rows=10&Ref=123456abc&Currency=BRL&Method=Credit&Capture=true&Status=7
URI Parameters
HideShow
offset
number (optional) Example: 0

Offset of rows

rows
number (optional) Example: 10

Number of rows

Ref
string (optional) Example: 123456abc

Your internal identifier, order or sale ID for your store

Currency
string (optional) Example: BRL

Currency identifier

Method
string (optional) Example: Credit

Sale method identifier

Capture
boolean (optional) Example: true

If the sale will be captured after creation

Status
number (required) Example: 7

Sale status

Request  example
HideShow
Headers
Content-Type: application/json
X-Hubcash-Code: <code>
X-Hubcash-Token: <token>
Response  200
HideShow
Headers
Content-Type: application/json
Body
{
  "Sales": [
    {
      "SaleId": "58c040b32d8baf18526217f5",
      "Ref": "123456abc",
      "SoftDescriptor": "MyCompany",
      "Amount": 100,
      "Quota": true,
      "QuotaQty": 12,
      "Currency": "BRL",
      "Method": "Credit",
      "Capture": true,
      "DateCanceled": "Y-m-dTH:i:s GMT",
      "DateCaptured": "Y-m-dTH:i:s GMT",
      "DateReversed": "Y-m-dTH:i:s GMT",
      "DateUpdated": "Y-m-dTH:i:s GMT",
      "DateAdded": "Y-m-dTH:i:s GMT",
      "Consumer": {
        "Name": "Maria da Silva",
        "Email": "maria@dasilva.com.net",
        "Birthdate": "Y-m-dTH:i:s GMT",
        "DocumentNumber": "223.112.333.112",
        "DocumentType": "CPF",
        "Gender": "Feminino",
        "HomePhone": "93 912323322",
        "MobilePhone": "93 912323322",
        "WorkPhone": "93 912323322"
      },
      "BillingAddress": {
        "City": "Curitiba",
        "Complement": "Second floor",
        "Country": "Brazil",
        "District": "Centro",
        "Number": "3523",
        "State": "Paraná",
        "Street": "Rua das Palmeiras do alvoredo",
        "ZipCode": "88202"
      },
      "ShippingAddress": {
        "City": "Curitiba",
        "Complement": "Second floor",
        "Country": "Brazil",
        "District": "Centro",
        "Number": "3523",
        "State": "Paraná",
        "Street": "Rua das Palmeiras do alvoredo",
        "ZipCode": "88202"
      },
      "Analyze": [
        {
          "Level": "72",
          "Description": "Approved"
        }
      ],
      "Rollback": [
        {
          "Reason": "Consumer asked",
          "Obs": "Mastercard message",
          "Date": "Y-m-dTH:i:s GMT"
        }
      ],
      "History": [
        {
          "Action": "Data received",
          "DateAdded": "Y-m-dTH:i:s GMT"
        }
      ],
      "Items": [
        {
          "Name": "Notebook",
          "Description": "Model 2017",
          "Amount": "100",
          "Qty": "1"
        }
      ],
      "Card": {
        "CardId": "58c040b32d8baf18526217f5",
        "Brand": "Visa",
        "HolderName": "Maria da Silva",
        "Document": "223.112.333.112",
        "Phone": "93 912323322",
        "LastDigits": "1234",
        "ExpMonth": "03",
        "ExpYear": "2022"
      },
      "Billet": {
        "OurNumber": 222312,
        "Instructions": [
          "Hello, world!"
        ],
        "ExpiresIn": 7,
        "Digitable": "223123.223123222.3566313.333222123.3455123",
        "Image": "base64"
      },
      "Status": 7
    }
  ]
}
Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "Sales": {
      "type": "array"
    }
  }
}
Response  401
HideShow
Headers
Content-Type: application/json
Body
{
  "Errors": [
    {
      "Type": "Authorization",
      "Field": "headers",
      "Description": "Authorization with the API failed"
    }
  ]
}
Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "Errors": {
      "type": "array"
    }
  }
}

Details

Details
GET/sales/{SaleId}

Example URI

GET https://api.hubcash.com/v1/sales/SaleId
URI Parameters
HideShow
SaleId
string (required) 

Identifier

Request  example
HideShow
Headers
Content-Type: application/json
X-Hubcash-Code: <code>
X-Hubcash-Token: <token>
Response  200
HideShow
Headers
Content-Type: application/json
Body
{
  "Sale": {
    "SaleId": "58c040b32d8baf18526217f5",
    "Ref": "123456abc",
    "SoftDescriptor": "MyCompany",
    "Amount": 100,
    "Quota": true,
    "QuotaQty": 12,
    "Currency": "BRL",
    "Method": "Credit",
    "Capture": true,
    "DateCanceled": "Y-m-dTH:i:s GMT",
    "DateCaptured": "Y-m-dTH:i:s GMT",
    "DateReversed": "Y-m-dTH:i:s GMT",
    "DateUpdated": "Y-m-dTH:i:s GMT",
    "DateAdded": "Y-m-dTH:i:s GMT",
    "Consumer": {
      "Name": "Maria da Silva",
      "Email": "maria@dasilva.com.net",
      "Birthdate": "Y-m-dTH:i:s GMT",
      "DocumentNumber": "223.112.333.112",
      "DocumentType": "CPF",
      "Gender": "Feminino",
      "HomePhone": "93 912323322",
      "MobilePhone": "93 912323322",
      "WorkPhone": "93 912323322"
    },
    "BillingAddress": {
      "City": "Curitiba",
      "Complement": "Second floor",
      "Country": "Brazil",
      "District": "Centro",
      "Number": "3523",
      "State": "Paraná",
      "Street": "Rua das Palmeiras do alvoredo",
      "ZipCode": "88202"
    },
    "ShippingAddress": {
      "City": "Curitiba",
      "Complement": "Second floor",
      "Country": "Brazil",
      "District": "Centro",
      "Number": "3523",
      "State": "Paraná",
      "Street": "Rua das Palmeiras do alvoredo",
      "ZipCode": "88202"
    },
    "Analyze": [
      {
        "Level": "72",
        "Description": "Approved"
      }
    ],
    "Rollback": [
      {
        "Reason": "Consumer asked",
        "Obs": "Mastercard message",
        "Date": "Y-m-dTH:i:s GMT"
      }
    ],
    "History": [
      {
        "Action": "Data received",
        "DateAdded": "Y-m-dTH:i:s GMT"
      }
    ],
    "Items": [
      {
        "Name": "Notebook",
        "Description": "Model 2017",
        "Amount": "100",
        "Qty": "1"
      }
    ],
    "Card": {
      "CardId": "58c040b32d8baf18526217f5",
      "Brand": "Visa",
      "HolderName": "Maria da Silva",
      "Document": "223.112.333.112",
      "Phone": "93 912323322",
      "LastDigits": "1234",
      "ExpMonth": "03",
      "ExpYear": "2022"
    },
    "Billet": {
      "OurNumber": 222312,
      "Instructions": [
        "Hello, world!"
      ],
      "ExpiresIn": 7,
      "Digitable": "223123.223123222.3566313.333222123.3455123",
      "Image": "base64"
    },
    "Status": 7
  }
}
Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "Sale": {
      "type": "object",
      "properties": {
        "SaleId": {
          "type": "string",
          "description": "Sale unique identifier"
        },
        "Ref": {
          "type": "string",
          "description": "Your internal identifier, order or sale ID for your store"
        },
        "SoftDescriptor": {
          "type": "string",
          "description": "The descriptor with appears in the consumer credit card bill. Default is your company name."
        },
        "Amount": {
          "type": "number",
          "description": "Amount in cents"
        },
        "Quota": {
          "type": "boolean",
          "description": "If the sale has installments/quota"
        },
        "QuotaQty": {
          "type": "number",
          "description": "Number of installments, if sale has quota"
        },
        "Currency": {
          "type": "string",
          "description": "Currency identifier"
        },
        "Method": {
          "type": "string",
          "description": "Sale method identifier"
        },
        "Capture": {
          "type": "boolean",
          "description": "If the sale will be captured after creation"
        },
        "DateCanceled": {
          "type": "string",
          "description": "Date canceled"
        },
        "DateCaptured": {
          "type": "string",
          "description": "Date captured"
        },
        "DateReversed": {
          "type": "string",
          "description": "Date reversed"
        },
        "DateUpdated": {
          "type": "string",
          "description": "Date updated"
        },
        "DateAdded": {
          "type": "string",
          "description": "Date added"
        },
        "Consumer": {
          "type": "object",
          "properties": {
            "Name": {
              "type": "string",
              "description": "Consumer name"
            },
            "Email": {
              "type": "string",
              "description": "Consumer email"
            },
            "Birthdate": {
              "type": "string",
              "description": "Birthdate"
            },
            "DocumentNumber": {
              "type": "string",
              "description": "22 (optional) - Document"
            },
            "DocumentType": {
              "type": "string",
              "description": "Document type"
            },
            "Gender": {
              "type": "string",
              "description": "Gender, can be also M/F"
            },
            "HomePhone": {
              "type": "string",
              "description": "Consumer home phone"
            },
            "MobilePhone": {
              "type": "string",
              "description": "Consumer mobile phone"
            },
            "WorkPhone": {
              "type": "string",
              "description": "Consumer work phone"
            }
          }
        },
        "BillingAddress": {
          "type": "object",
          "properties": {
            "City": {
              "type": "string",
              "description": "City name"
            },
            "Complement": {
              "type": "string",
              "description": "Complement of an address"
            },
            "Country": {
              "type": "string",
              "description": "Country"
            },
            "District": {
              "type": "string",
              "description": "District"
            },
            "Number": {
              "type": "string",
              "description": "Number of the address"
            },
            "State": {
              "type": "string",
              "description": "State"
            },
            "Street": {
              "type": "string",
              "description": "Street name"
            },
            "ZipCode": {
              "type": "string",
              "description": "000 (optional) - ZipCode"
            }
          }
        },
        "ShippingAddress": {
          "type": "object",
          "properties": {
            "City": {
              "type": "string",
              "description": "City name"
            },
            "Complement": {
              "type": "string",
              "description": "Complement of an address"
            },
            "Country": {
              "type": "string",
              "description": "Country"
            },
            "District": {
              "type": "string",
              "description": "District"
            },
            "Number": {
              "type": "string",
              "description": "Number of the address"
            },
            "State": {
              "type": "string",
              "description": "State"
            },
            "Street": {
              "type": "string",
              "description": "Street name"
            },
            "ZipCode": {
              "type": "string",
              "description": "000 (optional) - ZipCode"
            }
          }
        },
        "Analyze": {
          "type": "array"
        },
        "Rollback": {
          "type": "array"
        },
        "History": {
          "type": "array"
        },
        "Items": {
          "type": "array"
        },
        "Card": {
          "type": "object",
          "properties": {
            "CardId": {
              "type": "string",
              "description": "Unique identifier"
            },
            "Brand": {
              "type": "string",
              "description": "Card brand name"
            },
            "HolderName": {
              "type": "string",
              "description": "Holder name"
            },
            "Document": {
              "type": "string",
              "description": "22 (required) - Document of the holder"
            },
            "Phone": {
              "type": "string",
              "description": "Optional phone of the holder"
            },
            "LastDigits": {
              "type": "string",
              "description": "Last digits of the cards"
            },
            "ExpMonth": {
              "type": "string",
              "description": "Card expiration month (mm)"
            },
            "ExpYear": {
              "type": "string",
              "description": "Card expiration year (yyyy)"
            }
          },
          "required": [
            "Brand",
            "HolderName",
            "ExpMonth",
            "ExpYear"
          ]
        },
        "Billet": {
          "type": "object",
          "properties": {
            "OurNumber": {
              "type": "number",
              "description": "OurNumber"
            },
            "Instructions": {
              "type": "array",
              "description": "Instructions of the billet, max of 6"
            },
            "ExpiresIn": {
              "type": "number",
              "description": "Days to expire the billet, will be added to the expiration date"
            },
            "Digitable": {
              "type": "string",
              "description": "Digitable number"
            },
            "Image": {
              "type": "string",
              "description": "Base64 containing the barcode image"
            }
          },
          "required": [
            "OurNumber",
            "ExpiresIn",
            "Digitable",
            "Image"
          ]
        },
        "Status": {
          "type": "number",
          "description": "Sale status"
        }
      },
      "required": [
        "SaleId",
        "Amount",
        "Currency",
        "Method",
        "DateAdded"
      ]
    }
  }
}
Response  401
HideShow
Headers
Content-Type: application/json
Body
{
  "Errors": [
    {
      "Type": "Authorization",
      "Field": "headers",
      "Description": "Authorization with the API failed"
    }
  ]
}
Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "Errors": {
      "type": "array"
    }
  }
}

Capture

Capture
PUT/sales/capture/{SaleId}

Sales can be captured after creation. The capture action effective the sale in the payment operator. Sales that does not have been captured will just allocated credit limits.

Example URI

PUT https://api.hubcash.com/v1/sales/capture/SaleId
URI Parameters
HideShow
SaleId
string (required) 

Identifier

Request  example
HideShow
Headers
Content-Type: application/json
X-Hubcash-Code: <code>
X-Hubcash-Token: <token>
Response  200
HideShow
Headers
Content-Type: application/json
Body
{
  "Sale": {
    "SaleId": "58c040b32d8baf18526217f5",
    "Ref": "123456abc",
    "SoftDescriptor": "MyCompany",
    "Amount": 100,
    "Quota": true,
    "QuotaQty": 12,
    "Currency": "BRL",
    "Method": "Credit",
    "Capture": true,
    "DateCanceled": "Y-m-dTH:i:s GMT",
    "DateCaptured": "Y-m-dTH:i:s GMT",
    "DateReversed": "Y-m-dTH:i:s GMT",
    "DateUpdated": "Y-m-dTH:i:s GMT",
    "DateAdded": "Y-m-dTH:i:s GMT",
    "Consumer": {
      "Name": "Maria da Silva",
      "Email": "maria@dasilva.com.net",
      "Birthdate": "Y-m-dTH:i:s GMT",
      "DocumentNumber": "223.112.333.112",
      "DocumentType": "CPF",
      "Gender": "Feminino",
      "HomePhone": "93 912323322",
      "MobilePhone": "93 912323322",
      "WorkPhone": "93 912323322"
    },
    "BillingAddress": {
      "City": "Curitiba",
      "Complement": "Second floor",
      "Country": "Brazil",
      "District": "Centro",
      "Number": "3523",
      "State": "Paraná",
      "Street": "Rua das Palmeiras do alvoredo",
      "ZipCode": "88202"
    },
    "ShippingAddress": {
      "City": "Curitiba",
      "Complement": "Second floor",
      "Country": "Brazil",
      "District": "Centro",
      "Number": "3523",
      "State": "Paraná",
      "Street": "Rua das Palmeiras do alvoredo",
      "ZipCode": "88202"
    },
    "Analyze": [
      {
        "Level": "72",
        "Description": "Approved"
      }
    ],
    "Rollback": [
      {
        "Reason": "Consumer asked",
        "Obs": "Mastercard message",
        "Date": "Y-m-dTH:i:s GMT"
      }
    ],
    "History": [
      {
        "Action": "Data received",
        "DateAdded": "Y-m-dTH:i:s GMT"
      }
    ],
    "Items": [
      {
        "Name": "Notebook",
        "Description": "Model 2017",
        "Amount": "100",
        "Qty": "1"
      }
    ],
    "Card": {
      "CardId": "58c040b32d8baf18526217f5",
      "Brand": "Visa",
      "HolderName": "Maria da Silva",
      "Document": "223.112.333.112",
      "Phone": "93 912323322",
      "LastDigits": "1234",
      "ExpMonth": "03",
      "ExpYear": "2022"
    },
    "Billet": {
      "OurNumber": 222312,
      "Instructions": [
        "Hello, world!"
      ],
      "ExpiresIn": 7,
      "Digitable": "223123.223123222.3566313.333222123.3455123",
      "Image": "base64"
    },
    "Status": 7
  }
}
Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "Sale": {
      "type": "object",
      "properties": {
        "SaleId": {
          "type": "string",
          "description": "Sale unique identifier"
        },
        "Ref": {
          "type": "string",
          "description": "Your internal identifier, order or sale ID for your store"
        },
        "SoftDescriptor": {
          "type": "string",
          "description": "The descriptor with appears in the consumer credit card bill. Default is your company name."
        },
        "Amount": {
          "type": "number",
          "description": "Amount in cents"
        },
        "Quota": {
          "type": "boolean",
          "description": "If the sale has installments/quota"
        },
        "QuotaQty": {
          "type": "number",
          "description": "Number of installments, if sale has quota"
        },
        "Currency": {
          "type": "string",
          "description": "Currency identifier"
        },
        "Method": {
          "type": "string",
          "description": "Sale method identifier"
        },
        "Capture": {
          "type": "boolean",
          "description": "If the sale will be captured after creation"
        },
        "DateCanceled": {
          "type": "string",
          "description": "Date canceled"
        },
        "DateCaptured": {
          "type": "string",
          "description": "Date captured"
        },
        "DateReversed": {
          "type": "string",
          "description": "Date reversed"
        },
        "DateUpdated": {
          "type": "string",
          "description": "Date updated"
        },
        "DateAdded": {
          "type": "string",
          "description": "Date added"
        },
        "Consumer": {
          "type": "object",
          "properties": {
            "Name": {
              "type": "string",
              "description": "Consumer name"
            },
            "Email": {
              "type": "string",
              "description": "Consumer email"
            },
            "Birthdate": {
              "type": "string",
              "description": "Birthdate"
            },
            "DocumentNumber": {
              "type": "string",
              "description": "22 (optional) - Document"
            },
            "DocumentType": {
              "type": "string",
              "description": "Document type"
            },
            "Gender": {
              "type": "string",
              "description": "Gender, can be also M/F"
            },
            "HomePhone": {
              "type": "string",
              "description": "Consumer home phone"
            },
            "MobilePhone": {
              "type": "string",
              "description": "Consumer mobile phone"
            },
            "WorkPhone": {
              "type": "string",
              "description": "Consumer work phone"
            }
          }
        },
        "BillingAddress": {
          "type": "object",
          "properties": {
            "City": {
              "type": "string",
              "description": "City name"
            },
            "Complement": {
              "type": "string",
              "description": "Complement of an address"
            },
            "Country": {
              "type": "string",
              "description": "Country"
            },
            "District": {
              "type": "string",
              "description": "District"
            },
            "Number": {
              "type": "string",
              "description": "Number of the address"
            },
            "State": {
              "type": "string",
              "description": "State"
            },
            "Street": {
              "type": "string",
              "description": "Street name"
            },
            "ZipCode": {
              "type": "string",
              "description": "000 (optional) - ZipCode"
            }
          }
        },
        "ShippingAddress": {
          "type": "object",
          "properties": {
            "City": {
              "type": "string",
              "description": "City name"
            },
            "Complement": {
              "type": "string",
              "description": "Complement of an address"
            },
            "Country": {
              "type": "string",
              "description": "Country"
            },
            "District": {
              "type": "string",
              "description": "District"
            },
            "Number": {
              "type": "string",
              "description": "Number of the address"
            },
            "State": {
              "type": "string",
              "description": "State"
            },
            "Street": {
              "type": "string",
              "description": "Street name"
            },
            "ZipCode": {
              "type": "string",
              "description": "000 (optional) - ZipCode"
            }
          }
        },
        "Analyze": {
          "type": "array"
        },
        "Rollback": {
          "type": "array"
        },
        "History": {
          "type": "array"
        },
        "Items": {
          "type": "array"
        },
        "Card": {
          "type": "object",
          "properties": {
            "CardId": {
              "type": "string",
              "description": "Unique identifier"
            },
            "Brand": {
              "type": "string",
              "description": "Card brand name"
            },
            "HolderName": {
              "type": "string",
              "description": "Holder name"
            },
            "Document": {
              "type": "string",
              "description": "22 (required) - Document of the holder"
            },
            "Phone": {
              "type": "string",
              "description": "Optional phone of the holder"
            },
            "LastDigits": {
              "type": "string",
              "description": "Last digits of the cards"
            },
            "ExpMonth": {
              "type": "string",
              "description": "Card expiration month (mm)"
            },
            "ExpYear": {
              "type": "string",
              "description": "Card expiration year (yyyy)"
            }
          },
          "required": [
            "Brand",
            "HolderName",
            "ExpMonth",
            "ExpYear"
          ]
        },
        "Billet": {
          "type": "object",
          "properties": {
            "OurNumber": {
              "type": "number",
              "description": "OurNumber"
            },
            "Instructions": {
              "type": "array",
              "description": "Instructions of the billet, max of 6"
            },
            "ExpiresIn": {
              "type": "number",
              "description": "Days to expire the billet, will be added to the expiration date"
            },
            "Digitable": {
              "type": "string",
              "description": "Digitable number"
            },
            "Image": {
              "type": "string",
              "description": "Base64 containing the barcode image"
            }
          },
          "required": [
            "OurNumber",
            "ExpiresIn",
            "Digitable",
            "Image"
          ]
        },
        "Status": {
          "type": "number",
          "description": "Sale status"
        }
      },
      "required": [
        "SaleId",
        "Amount",
        "Currency",
        "Method",
        "DateAdded"
      ]
    }
  }
}
Response  400
HideShow
Headers
Content-Type: application/json
Body
{
  "Errors": [
    {
      "Type": "Error",
      "Field": "Name",
      "Description": "Required"
    }
  ]
}
Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "Errors": {
      "type": "array"
    }
  }
}
Response  401
HideShow
Headers
Content-Type: application/json
Body
{
  "Errors": [
    {
      "Type": "Authorization",
      "Field": "headers",
      "Description": "Authorization with the API failed"
    }
  ]
}
Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "Errors": {
      "type": "array"
    }
  }
}

Cancel

Cancel
PUT/sales/cancel/{SaleId}

Example URI

PUT https://api.hubcash.com/v1/sales/cancel/SaleId
URI Parameters
HideShow
SaleId
string (required) 

Identifier

Request  example
HideShow
Headers
Content-Type: application/json
X-Hubcash-Code: <code>
X-Hubcash-Token: <token>
Response  200
HideShow
Headers
Content-Type: application/json
Body
{
  "Sale": {
    "SaleId": "58c040b32d8baf18526217f5",
    "Ref": "123456abc",
    "SoftDescriptor": "MyCompany",
    "Amount": 100,
    "Quota": true,
    "QuotaQty": 12,
    "Currency": "BRL",
    "Method": "Credit",
    "Capture": true,
    "DateCanceled": "Y-m-dTH:i:s GMT",
    "DateCaptured": "Y-m-dTH:i:s GMT",
    "DateReversed": "Y-m-dTH:i:s GMT",
    "DateUpdated": "Y-m-dTH:i:s GMT",
    "DateAdded": "Y-m-dTH:i:s GMT",
    "Consumer": {
      "Name": "Maria da Silva",
      "Email": "maria@dasilva.com.net",
      "Birthdate": "Y-m-dTH:i:s GMT",
      "DocumentNumber": "223.112.333.112",
      "DocumentType": "CPF",
      "Gender": "Feminino",
      "HomePhone": "93 912323322",
      "MobilePhone": "93 912323322",
      "WorkPhone": "93 912323322"
    },
    "BillingAddress": {
      "City": "Curitiba",
      "Complement": "Second floor",
      "Country": "Brazil",
      "District": "Centro",
      "Number": "3523",
      "State": "Paraná",
      "Street": "Rua das Palmeiras do alvoredo",
      "ZipCode": "88202"
    },
    "ShippingAddress": {
      "City": "Curitiba",
      "Complement": "Second floor",
      "Country": "Brazil",
      "District": "Centro",
      "Number": "3523",
      "State": "Paraná",
      "Street": "Rua das Palmeiras do alvoredo",
      "ZipCode": "88202"
    },
    "Analyze": [
      {
        "Level": "72",
        "Description": "Approved"
      }
    ],
    "Rollback": [
      {
        "Reason": "Consumer asked",
        "Obs": "Mastercard message",
        "Date": "Y-m-dTH:i:s GMT"
      }
    ],
    "History": [
      {
        "Action": "Data received",
        "DateAdded": "Y-m-dTH:i:s GMT"
      }
    ],
    "Items": [
      {
        "Name": "Notebook",
        "Description": "Model 2017",
        "Amount": "100",
        "Qty": "1"
      }
    ],
    "Card": {
      "CardId": "58c040b32d8baf18526217f5",
      "Brand": "Visa",
      "HolderName": "Maria da Silva",
      "Document": "223.112.333.112",
      "Phone": "93 912323322",
      "LastDigits": "1234",
      "ExpMonth": "03",
      "ExpYear": "2022"
    },
    "Billet": {
      "OurNumber": 222312,
      "Instructions": [
        "Hello, world!"
      ],
      "ExpiresIn": 7,
      "Digitable": "223123.223123222.3566313.333222123.3455123",
      "Image": "base64"
    },
    "Status": 7
  }
}
Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "Sale": {
      "type": "object",
      "properties": {
        "SaleId": {
          "type": "string",
          "description": "Sale unique identifier"
        },
        "Ref": {
          "type": "string",
          "description": "Your internal identifier, order or sale ID for your store"
        },
        "SoftDescriptor": {
          "type": "string",
          "description": "The descriptor with appears in the consumer credit card bill. Default is your company name."
        },
        "Amount": {
          "type": "number",
          "description": "Amount in cents"
        },
        "Quota": {
          "type": "boolean",
          "description": "If the sale has installments/quota"
        },
        "QuotaQty": {
          "type": "number",
          "description": "Number of installments, if sale has quota"
        },
        "Currency": {
          "type": "string",
          "description": "Currency identifier"
        },
        "Method": {
          "type": "string",
          "description": "Sale method identifier"
        },
        "Capture": {
          "type": "boolean",
          "description": "If the sale will be captured after creation"
        },
        "DateCanceled": {
          "type": "string",
          "description": "Date canceled"
        },
        "DateCaptured": {
          "type": "string",
          "description": "Date captured"
        },
        "DateReversed": {
          "type": "string",
          "description": "Date reversed"
        },
        "DateUpdated": {
          "type": "string",
          "description": "Date updated"
        },
        "DateAdded": {
          "type": "string",
          "description": "Date added"
        },
        "Consumer": {
          "type": "object",
          "properties": {
            "Name": {
              "type": "string",
              "description": "Consumer name"
            },
            "Email": {
              "type": "string",
              "description": "Consumer email"
            },
            "Birthdate": {
              "type": "string",
              "description": "Birthdate"
            },
            "DocumentNumber": {
              "type": "string",
              "description": "22 (optional) - Document"
            },
            "DocumentType": {
              "type": "string",
              "description": "Document type"
            },
            "Gender": {
              "type": "string",
              "description": "Gender, can be also M/F"
            },
            "HomePhone": {
              "type": "string",
              "description": "Consumer home phone"
            },
            "MobilePhone": {
              "type": "string",
              "description": "Consumer mobile phone"
            },
            "WorkPhone": {
              "type": "string",
              "description": "Consumer work phone"
            }
          }
        },
        "BillingAddress": {
          "type": "object",
          "properties": {
            "City": {
              "type": "string",
              "description": "City name"
            },
            "Complement": {
              "type": "string",
              "description": "Complement of an address"
            },
            "Country": {
              "type": "string",
              "description": "Country"
            },
            "District": {
              "type": "string",
              "description": "District"
            },
            "Number": {
              "type": "string",
              "description": "Number of the address"
            },
            "State": {
              "type": "string",
              "description": "State"
            },
            "Street": {
              "type": "string",
              "description": "Street name"
            },
            "ZipCode": {
              "type": "string",
              "description": "000 (optional) - ZipCode"
            }
          }
        },
        "ShippingAddress": {
          "type": "object",
          "properties": {
            "City": {
              "type": "string",
              "description": "City name"
            },
            "Complement": {
              "type": "string",
              "description": "Complement of an address"
            },
            "Country": {
              "type": "string",
              "description": "Country"
            },
            "District": {
              "type": "string",
              "description": "District"
            },
            "Number": {
              "type": "string",
              "description": "Number of the address"
            },
            "State": {
              "type": "string",
              "description": "State"
            },
            "Street": {
              "type": "string",
              "description": "Street name"
            },
            "ZipCode": {
              "type": "string",
              "description": "000 (optional) - ZipCode"
            }
          }
        },
        "Analyze": {
          "type": "array"
        },
        "Rollback": {
          "type": "array"
        },
        "History": {
          "type": "array"
        },
        "Items": {
          "type": "array"
        },
        "Card": {
          "type": "object",
          "properties": {
            "CardId": {
              "type": "string",
              "description": "Unique identifier"
            },
            "Brand": {
              "type": "string",
              "description": "Card brand name"
            },
            "HolderName": {
              "type": "string",
              "description": "Holder name"
            },
            "Document": {
              "type": "string",
              "description": "22 (required) - Document of the holder"
            },
            "Phone": {
              "type": "string",
              "description": "Optional phone of the holder"
            },
            "LastDigits": {
              "type": "string",
              "description": "Last digits of the cards"
            },
            "ExpMonth": {
              "type": "string",
              "description": "Card expiration month (mm)"
            },
            "ExpYear": {
              "type": "string",
              "description": "Card expiration year (yyyy)"
            }
          },
          "required": [
            "Brand",
            "HolderName",
            "ExpMonth",
            "ExpYear"
          ]
        },
        "Billet": {
          "type": "object",
          "properties": {
            "OurNumber": {
              "type": "number",
              "description": "OurNumber"
            },
            "Instructions": {
              "type": "array",
              "description": "Instructions of the billet, max of 6"
            },
            "ExpiresIn": {
              "type": "number",
              "description": "Days to expire the billet, will be added to the expiration date"
            },
            "Digitable": {
              "type": "string",
              "description": "Digitable number"
            },
            "Image": {
              "type": "string",
              "description": "Base64 containing the barcode image"
            }
          },
          "required": [
            "OurNumber",
            "ExpiresIn",
            "Digitable",
            "Image"
          ]
        },
        "Status": {
          "type": "number",
          "description": "Sale status"
        }
      },
      "required": [
        "SaleId",
        "Amount",
        "Currency",
        "Method",
        "DateAdded"
      ]
    }
  }
}
Response  400
HideShow
Headers
Content-Type: application/json
Body
{
  "Errors": [
    {
      "Type": "Error",
      "Field": "Name",
      "Description": "Required"
    }
  ]
}
Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "Errors": {
      "type": "array"
    }
  }
}
Response  401
HideShow
Headers
Content-Type: application/json
Body
{
  "Errors": [
    {
      "Type": "Authorization",
      "Field": "headers",
      "Description": "Authorization with the API failed"
    }
  ]
}
Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "Errors": {
      "type": "array"
    }
  }
}

Create

Create
POST/sales

Caution

Identifiers for Currency, Brand and Method are case sensitive.

Quota value

The lower quota value allowed is R$ 5,00.

Example URI

POST https://api.hubcash.com/v1/sales
Request  with all fields
HideShow
Headers
Content-Type: application/json
X-Hubcash-Code: <code>
X-Hubcash-Token: <token>
Body
{
  "Sale": {
    "Ref": "123456abc",
    "SoftDescriptor": "MyCompany",
    "Amount": 100,
    "Quota": true,
    "QuotaQty": 12,
    "Currency": "BRL",
    "Method": "Credit",
    "Capture": true,
    "Consumer": {
      "Name": "Maria da Silva",
      "Email": "maria@dasilva.com.net",
      "Birthdate": "Y-m-dTH:i:s GMT",
      "DocumentNumber": "223.112.333.112",
      "DocumentType": "CPF",
      "Gender": "Feminino",
      "HomePhone": "93 912323322",
      "MobilePhone": "93 912323322",
      "WorkPhone": "93 912323322"
    },
    "BillingAddress": {
      "City": "Curitiba",
      "Complement": "Second floor",
      "Country": "Brazil",
      "District": "Centro",
      "Number": "3523",
      "State": "Paraná",
      "Street": "Rua das Palmeiras do alvoredo",
      "ZipCode": "88202"
    },
    "ShippingAddress": {
      "City": "Curitiba",
      "Complement": "Second floor",
      "Country": "Brazil",
      "District": "Centro",
      "Number": "3523",
      "State": "Paraná",
      "Street": "Rua das Palmeiras do alvoredo",
      "ZipCode": "88202"
    },
    "Items": [
      {
        "Name": "Notebook",
        "Description": "Model 2017",
        "Amount": "100",
        "Qty": "1"
      }
    ],
    "Card": {
      "Brand": "Visa",
      "HolderName": "Maria da Silva",
      "Document": "223.112.333.112",
      "Phone": "93 912323322",
      "ExpMonth": "03",
      "ExpYear": "2022",
      "Number": "5162321366555222331234",
      "SecurityCode": "233"
    },
    "Billet": {
      "OurNumber": 222312,
      "Instructions": [
        "Hello, world!"
      ],
      "ExpiresIn": 7
    }
  }
}
Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "Sale": {
      "type": "object",
      "properties": {
        "Ref": {
          "type": "string",
          "description": "Your internal identifier, order or sale ID for your store"
        },
        "SoftDescriptor": {
          "type": "string",
          "description": "The descriptor with appears in the consumer credit card bill. Default is your company name."
        },
        "Amount": {
          "type": "number",
          "description": "Amount in cents"
        },
        "Quota": {
          "type": "boolean",
          "description": "If the sale has installments/quota"
        },
        "QuotaQty": {
          "type": "number",
          "description": "Number of installments, if sale has quota"
        },
        "Currency": {
          "type": "string",
          "description": "Currency identifier"
        },
        "Method": {
          "type": "string",
          "description": "Sale method identifier"
        },
        "Capture": {
          "type": "boolean",
          "description": "If the sale will be captured after creation"
        },
        "Consumer": {
          "type": "object",
          "properties": {
            "Name": {
              "type": "string",
              "description": "Consumer name"
            },
            "Email": {
              "type": "string",
              "description": "Consumer email"
            },
            "Birthdate": {
              "type": "string",
              "description": "Birthdate"
            },
            "DocumentNumber": {
              "type": "string",
              "description": "22 (optional) - Document"
            },
            "DocumentType": {
              "type": "string",
              "description": "Document type"
            },
            "Gender": {
              "type": "string",
              "description": "Gender, can be also M/F"
            },
            "HomePhone": {
              "type": "string",
              "description": "Consumer home phone"
            },
            "MobilePhone": {
              "type": "string",
              "description": "Consumer mobile phone"
            },
            "WorkPhone": {
              "type": "string",
              "description": "Consumer work phone"
            }
          }
        },
        "BillingAddress": {
          "type": "object",
          "properties": {
            "City": {
              "type": "string",
              "description": "City name"
            },
            "Complement": {
              "type": "string",
              "description": "Complement of an address"
            },
            "Country": {
              "type": "string",
              "description": "Country"
            },
            "District": {
              "type": "string",
              "description": "District"
            },
            "Number": {
              "type": "string",
              "description": "Number of the address"
            },
            "State": {
              "type": "string",
              "description": "State"
            },
            "Street": {
              "type": "string",
              "description": "Street name"
            },
            "ZipCode": {
              "type": "string",
              "description": "000 (optional) - ZipCode"
            }
          }
        },
        "ShippingAddress": {
          "type": "object",
          "properties": {
            "City": {
              "type": "string",
              "description": "City name"
            },
            "Complement": {
              "type": "string",
              "description": "Complement of an address"
            },
            "Country": {
              "type": "string",
              "description": "Country"
            },
            "District": {
              "type": "string",
              "description": "District"
            },
            "Number": {
              "type": "string",
              "description": "Number of the address"
            },
            "State": {
              "type": "string",
              "description": "State"
            },
            "Street": {
              "type": "string",
              "description": "Street name"
            },
            "ZipCode": {
              "type": "string",
              "description": "000 (optional) - ZipCode"
            }
          }
        },
        "Items": {
          "type": "array"
        },
        "Card": {
          "type": "object",
          "properties": {
            "Brand": {
              "type": "string",
              "description": "Card brand name"
            },
            "HolderName": {
              "type": "string",
              "description": "Holder name"
            },
            "Document": {
              "type": "string",
              "description": "22 (required) - Document of the holder"
            },
            "Phone": {
              "type": "string",
              "description": "Optional phone of the holder"
            },
            "ExpMonth": {
              "type": "string",
              "description": "Card expiration month (mm)"
            },
            "ExpYear": {
              "type": "string",
              "description": "Card expiration year (yyyy)"
            },
            "Number": {
              "type": "string",
              "description": "(Requests) Card number"
            },
            "SecurityCode": {
              "type": "string",
              "description": "Card security code"
            }
          },
          "required": [
            "Brand",
            "HolderName",
            "ExpMonth",
            "ExpYear",
            "Number",
            "SecurityCode"
          ]
        },
        "Billet": {
          "type": "object",
          "properties": {
            "OurNumber": {
              "type": "number",
              "description": "OurNumber"
            },
            "Instructions": {
              "type": "array"
            },
            "ExpiresIn": {
              "type": "number",
              "description": "Days to expire the billet, will be added to the expiration date"
            }
          },
          "required": [
            "OurNumber",
            "ExpiresIn"
          ]
        }
      },
      "required": [
        "Amount",
        "Currency",
        "Method"
      ]
    }
  }
}
Request  with minimal new Credit Card
HideShow
Headers
Content-Type: application/json
X-Hubcash-Code: <code>
X-Hubcash-Token: <token>
Body
{
  "Sale": {
    "Amount": 100,
    "Currency": "BRL",
    "Method": "Credit",
    "SoftDescriptor": "MyCompany",
    "Capture": true,
    "Card": {
      "Brand": "Visa",
      "HolderName": "Maria da Silva",
      "Document": "223.112.333.112",
      "Phone": "93 912323322",
      "ExpMonth": "03",
      "ExpYear": "2022",
      "Number": "5162321366555222331234",
      "SecurityCode": "233"
    }
  }
}
Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "Sale": {
      "type": "object",
      "properties": {
        "Amount": {
          "type": "number",
          "description": "Amount in cents"
        },
        "Currency": {
          "type": "string",
          "description": "Currency identifier"
        },
        "Method": {
          "type": "string",
          "description": "Sale method identifier"
        },
        "SoftDescriptor": {
          "type": "string",
          "description": "The descriptor with appears in the consumer credit card bill. Default is your company name."
        },
        "Capture": {
          "type": "boolean",
          "description": "If the sale will be captured after creation"
        },
        "Card": {
          "type": "object",
          "properties": {
            "Brand": {
              "type": "string",
              "description": "Card brand name"
            },
            "HolderName": {
              "type": "string",
              "description": "Holder name"
            },
            "Document": {
              "type": "string",
              "description": "22 (required) - Document of the holder"
            },
            "Phone": {
              "type": "string",
              "description": "Optional phone of the holder"
            },
            "ExpMonth": {
              "type": "string",
              "description": "Card expiration month (mm)"
            },
            "ExpYear": {
              "type": "string",
              "description": "Card expiration year (yyyy)"
            },
            "Number": {
              "type": "string",
              "description": "(Requests) Card number"
            },
            "SecurityCode": {
              "type": "string",
              "description": "Card security code"
            }
          },
          "required": [
            "Brand",
            "HolderName",
            "ExpMonth",
            "ExpYear",
            "Number",
            "SecurityCode"
          ]
        }
      },
      "required": [
        "Amount",
        "Currency",
        "Method"
      ]
    }
  }
}
Request  with minimal saved Credit Card
HideShow
Headers
Content-Type: application/json
X-Hubcash-Code: <code>
X-Hubcash-Token: <token>
Body
{
  "Sale": {
    "Amount": 100,
    "Currency": "BRL",
    "Method": "Credit",
    "SoftDescriptor": "MyCompany",
    "Capture": true,
    "Card": {
      "CardId": "58c040b32d8baf18526217f5"
    }
  }
}
Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "Sale": {
      "type": "object",
      "properties": {
        "Amount": {
          "type": "number",
          "description": "Amount in cents"
        },
        "Currency": {
          "type": "string",
          "description": "Currency identifier"
        },
        "Method": {
          "type": "string",
          "description": "Sale method identifier"
        },
        "SoftDescriptor": {
          "type": "string",
          "description": "The descriptor with appears in the consumer credit card bill. Default is your company name."
        },
        "Capture": {
          "type": "boolean",
          "description": "If the sale will be captured after creation"
        },
        "Card": {
          "type": "object",
          "properties": {
            "CardId": {
              "type": "string",
              "description": "Unique identifier"
            }
          }
        }
      },
      "required": [
        "Amount",
        "Currency",
        "Method"
      ]
    }
  }
}
Request  with minimal Billet
HideShow
Headers
Content-Type: application/json
X-Hubcash-Code: <code>
X-Hubcash-Token: <token>
Body
{
  "Sale": {
    "Amount": 100,
    "Currency": "BRL",
    "Method": "Billet",
    "Billet": {
      "OurNumber": 222312,
      "Instructions": [
        "Hello, world!"
      ],
      "ExpiresIn": 7
    }
  }
}
Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "Sale": {
      "type": "object",
      "properties": {
        "Amount": {
          "type": "number",
          "description": "Amount in cents"
        },
        "Currency": {
          "type": "string",
          "description": "Currency identifier"
        },
        "Method": {
          "type": "string",
          "description": "Sale method identifier"
        },
        "Billet": {
          "type": "object",
          "properties": {
            "OurNumber": {
              "type": "number",
              "description": "OurNumber"
            },
            "Instructions": {
              "type": "array"
            },
            "ExpiresIn": {
              "type": "number",
              "description": "Days to expire the billet, will be added to the expiration date"
            }
          },
          "required": [
            "OurNumber",
            "ExpiresIn"
          ]
        }
      },
      "required": [
        "Amount",
        "Currency",
        "Method"
      ]
    }
  }
}
Response  201
HideShow
Headers
Content-Type: application/json
Body
{
  "Sale": {
    "SaleId": "58c040b32d8baf18526217f5",
    "Ref": "123456abc",
    "SoftDescriptor": "MyCompany",
    "Amount": 100,
    "Quota": true,
    "QuotaQty": 12,
    "Currency": "BRL",
    "Method": "Credit",
    "Capture": true,
    "DateCanceled": "Y-m-dTH:i:s GMT",
    "DateCaptured": "Y-m-dTH:i:s GMT",
    "DateReversed": "Y-m-dTH:i:s GMT",
    "DateUpdated": "Y-m-dTH:i:s GMT",
    "DateAdded": "Y-m-dTH:i:s GMT",
    "Consumer": {
      "Name": "Maria da Silva",
      "Email": "maria@dasilva.com.net",
      "Birthdate": "Y-m-dTH:i:s GMT",
      "DocumentNumber": "223.112.333.112",
      "DocumentType": "CPF",
      "Gender": "Feminino",
      "HomePhone": "93 912323322",
      "MobilePhone": "93 912323322",
      "WorkPhone": "93 912323322"
    },
    "BillingAddress": {
      "City": "Curitiba",
      "Complement": "Second floor",
      "Country": "Brazil",
      "District": "Centro",
      "Number": "3523",
      "State": "Paraná",
      "Street": "Rua das Palmeiras do alvoredo",
      "ZipCode": "88202"
    },
    "ShippingAddress": {
      "City": "Curitiba",
      "Complement": "Second floor",
      "Country": "Brazil",
      "District": "Centro",
      "Number": "3523",
      "State": "Paraná",
      "Street": "Rua das Palmeiras do alvoredo",
      "ZipCode": "88202"
    },
    "Analyze": [
      {
        "Level": "72",
        "Description": "Approved"
      }
    ],
    "Rollback": [
      {
        "Reason": "Consumer asked",
        "Obs": "Mastercard message",
        "Date": "Y-m-dTH:i:s GMT"
      }
    ],
    "History": [
      {
        "Action": "Data received",
        "DateAdded": "Y-m-dTH:i:s GMT"
      }
    ],
    "Items": [
      {
        "Name": "Notebook",
        "Description": "Model 2017",
        "Amount": "100",
        "Qty": "1"
      }
    ],
    "Card": {
      "CardId": "58c040b32d8baf18526217f5",
      "Brand": "Visa",
      "HolderName": "Maria da Silva",
      "Document": "223.112.333.112",
      "Phone": "93 912323322",
      "LastDigits": "1234",
      "ExpMonth": "03",
      "ExpYear": "2022"
    },
    "Billet": {
      "OurNumber": 222312,
      "Instructions": [
        "Hello, world!"
      ],
      "ExpiresIn": 7,
      "Digitable": "223123.223123222.3566313.333222123.3455123",
      "Image": "base64"
    },
    "Status": 7
  }
}
Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "Sale": {
      "type": "object",
      "properties": {
        "SaleId": {
          "type": "string",
          "description": "Sale unique identifier"
        },
        "Ref": {
          "type": "string",
          "description": "Your internal identifier, order or sale ID for your store"
        },
        "SoftDescriptor": {
          "type": "string",
          "description": "The descriptor with appears in the consumer credit card bill. Default is your company name."
        },
        "Amount": {
          "type": "number",
          "description": "Amount in cents"
        },
        "Quota": {
          "type": "boolean",
          "description": "If the sale has installments/quota"
        },
        "QuotaQty": {
          "type": "number",
          "description": "Number of installments, if sale has quota"
        },
        "Currency": {
          "type": "string",
          "description": "Currency identifier"
        },
        "Method": {
          "type": "string",
          "description": "Sale method identifier"
        },
        "Capture": {
          "type": "boolean",
          "description": "If the sale will be captured after creation"
        },
        "DateCanceled": {
          "type": "string",
          "description": "Date canceled"
        },
        "DateCaptured": {
          "type": "string",
          "description": "Date captured"
        },
        "DateReversed": {
          "type": "string",
          "description": "Date reversed"
        },
        "DateUpdated": {
          "type": "string",
          "description": "Date updated"
        },
        "DateAdded": {
          "type": "string",
          "description": "Date added"
        },
        "Consumer": {
          "type": "object",
          "properties": {
            "Name": {
              "type": "string",
              "description": "Consumer name"
            },
            "Email": {
              "type": "string",
              "description": "Consumer email"
            },
            "Birthdate": {
              "type": "string",
              "description": "Birthdate"
            },
            "DocumentNumber": {
              "type": "string",
              "description": "22 (optional) - Document"
            },
            "DocumentType": {
              "type": "string",
              "description": "Document type"
            },
            "Gender": {
              "type": "string",
              "description": "Gender, can be also M/F"
            },
            "HomePhone": {
              "type": "string",
              "description": "Consumer home phone"
            },
            "MobilePhone": {
              "type": "string",
              "description": "Consumer mobile phone"
            },
            "WorkPhone": {
              "type": "string",
              "description": "Consumer work phone"
            }
          }
        },
        "BillingAddress": {
          "type": "object",
          "properties": {
            "City": {
              "type": "string",
              "description": "City name"
            },
            "Complement": {
              "type": "string",
              "description": "Complement of an address"
            },
            "Country": {
              "type": "string",
              "description": "Country"
            },
            "District": {
              "type": "string",
              "description": "District"
            },
            "Number": {
              "type": "string",
              "description": "Number of the address"
            },
            "State": {
              "type": "string",
              "description": "State"
            },
            "Street": {
              "type": "string",
              "description": "Street name"
            },
            "ZipCode": {
              "type": "string",
              "description": "000 (optional) - ZipCode"
            }
          }
        },
        "ShippingAddress": {
          "type": "object",
          "properties": {
            "City": {
              "type": "string",
              "description": "City name"
            },
            "Complement": {
              "type": "string",
              "description": "Complement of an address"
            },
            "Country": {
              "type": "string",
              "description": "Country"
            },
            "District": {
              "type": "string",
              "description": "District"
            },
            "Number": {
              "type": "string",
              "description": "Number of the address"
            },
            "State": {
              "type": "string",
              "description": "State"
            },
            "Street": {
              "type": "string",
              "description": "Street name"
            },
            "ZipCode": {
              "type": "string",
              "description": "000 (optional) - ZipCode"
            }
          }
        },
        "Analyze": {
          "type": "array"
        },
        "Rollback": {
          "type": "array"
        },
        "History": {
          "type": "array"
        },
        "Items": {
          "type": "array"
        },
        "Card": {
          "type": "object",
          "properties": {
            "CardId": {
              "type": "string",
              "description": "Unique identifier"
            },
            "Brand": {
              "type": "string",
              "description": "Card brand name"
            },
            "HolderName": {
              "type": "string",
              "description": "Holder name"
            },
            "Document": {
              "type": "string",
              "description": "22 (required) - Document of the holder"
            },
            "Phone": {
              "type": "string",
              "description": "Optional phone of the holder"
            },
            "LastDigits": {
              "type": "string",
              "description": "Last digits of the cards"
            },
            "ExpMonth": {
              "type": "string",
              "description": "Card expiration month (mm)"
            },
            "ExpYear": {
              "type": "string",
              "description": "Card expiration year (yyyy)"
            }
          },
          "required": [
            "Brand",
            "HolderName",
            "ExpMonth",
            "ExpYear"
          ]
        },
        "Billet": {
          "type": "object",
          "properties": {
            "OurNumber": {
              "type": "number",
              "description": "OurNumber"
            },
            "Instructions": {
              "type": "array",
              "description": "Instructions of the billet, max of 6"
            },
            "ExpiresIn": {
              "type": "number",
              "description": "Days to expire the billet, will be added to the expiration date"
            },
            "Digitable": {
              "type": "string",
              "description": "Digitable number"
            },
            "Image": {
              "type": "string",
              "description": "Base64 containing the barcode image"
            }
          },
          "required": [
            "OurNumber",
            "ExpiresIn",
            "Digitable",
            "Image"
          ]
        },
        "Status": {
          "type": "number",
          "description": "Sale status"
        }
      },
      "required": [
        "SaleId",
        "Amount",
        "Currency",
        "Method",
        "DateAdded"
      ]
    }
  }
}
Response  400
HideShow
Headers
Content-Type: application/json
Body
{
  "Errors": [
    {
      "Type": "Error",
      "Field": "Name",
      "Description": "Required"
    }
  ]
}
Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "Errors": {
      "type": "array"
    }
  }
}
Response  401
HideShow
Headers
Content-Type: application/json
Body
{
  "Errors": [
    {
      "Type": "Authorization",
      "Field": "headers",
      "Description": "Authorization with the API failed"
    }
  ]
}
Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "Errors": {
      "type": "array"
    }
  }
}

Helpers

Requests to return additional data used in others requests using his identifiers.

Currencies

Currencies
GET/currencies

Example URI

GET https://api.hubcash.com/v1/currencies
Request  example
HideShow
Headers
Content-Type: application/json
X-Hubcash-Code: <code>
X-Hubcash-Token: <token>
Response  200
HideShow
Headers
Content-Type: application/json
Body
{
  "Currencies": [
    {
      "CurrencyId": "58c040b32d8baf18526217f5",
      "Name": "BRL",
      "SymbolLeft": "R$",
      "SymbolRight": "US$",
      "DecimalPlace": 2
    }
  ]
}
Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "Currencies": {
      "type": "array"
    }
  }
}
Response  401
HideShow
Headers
Content-Type: application/json
Body
{
  "Errors": [
    {
      "Type": "Authorization",
      "Field": "headers",
      "Description": "Authorization with the API failed"
    }
  ]
}
Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "Errors": {
      "type": "array"
    }
  }
}

Brands

Brands
GET/brands

Example URI

GET https://api.hubcash.com/v1/brands
Request  example
HideShow
Headers
Content-Type: application/json
X-Hubcash-Code: <code>
X-Hubcash-Token: <token>
Response  200
HideShow
Headers
Content-Type: application/json
Body
{
  "Brands": [
    {
      "Name": "Mastercard",
      "Image": "https://api.hubcash.com/images/brand/mastercard.png",
      "NumberDigits": 22,
      "NumberSecurity": 3
    }
  ]
}
Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "Brands": {
      "type": "array"
    }
  }
}
Response  401
HideShow
Headers
Content-Type: application/json
Body
{
  "Errors": [
    {
      "Type": "Authorization",
      "Field": "headers",
      "Description": "Authorization with the API failed"
    }
  ]
}
Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "Errors": {
      "type": "array"
    }
  }
}

Brand by number

Use this request to return the brand data from first digits of the card number.

Brand by number
GET/brands/{number}

Caution

Do not send full number, with the all digits of the card, just the first ones. There is some cards that only works if you pass the six first digits, but others, the four ones. So, you can request this endpoint multiple times until you get a valid brand. If you passed more then six digits and no cards are founded, probably we are not accepting that brand or the card is already invalid.

Example URI

GET https://api.hubcash.com/v1/brands/number
URI Parameters
HideShow
number
string (required) 

First digits of the card number

Request  example
HideShow
Headers
Content-Type: application/json
X-Hubcash-Code: <code>
X-Hubcash-Token: <token>
Response  200
HideShow
Headers
Content-Type: application/json
Body
{
  "Brand": {
    "Name": "Mastercard",
    "Image": "https://api.hubcash.com/images/brand/mastercard.png",
    "NumberDigits": 22,
    "NumberSecurity": 3
  }
}
Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "Brand": {
      "type": "object",
      "properties": {
        "Name": {
          "type": "string",
          "description": "Unique identifier, brand name"
        },
        "Image": {
          "type": "string",
          "description": "Brand image"
        },
        "NumberDigits": {
          "type": "number",
          "description": "Total number of digits for card number"
        },
        "NumberSecurity": {
          "type": "number",
          "description": "Total number of digits for security number"
        }
      },
      "required": [
        "Name",
        "NumberDigits",
        "NumberSecurity"
      ]
    }
  }
}
Response  401
HideShow
Headers
Content-Type: application/json
Body
{
  "Errors": [
    {
      "Type": "Authorization",
      "Field": "headers",
      "Description": "Authorization with the API failed"
    }
  ]
}
Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "Errors": {
      "type": "array"
    }
  }
}

Notifications

Notifications are used to send data back to your application, when a Sale status changes.

URL

The notification will be sent if you configure a URL, previously in this panel. But in all the cases, the notification will be created and you can resend later.

Notifications

Details
GET/notifications/{NotificationId}

The response below is also the data structure that we send to you after notification creation and resend.

Example URI

GET https://api.hubcash.com/v1/notifications/NotificationId
URI Parameters
HideShow
NotificationId
string (required) 

Identifier

Request  example
HideShow
Headers
Content-Type: application/json
X-Hubcash-Code: <code>
X-Hubcash-Token: <token>
Response  200
HideShow
Headers
Content-Type: application/json
Body
{
  "Notification": {
    "NotificationId": "58c040b32d8baf18526217f5",
    "DateUpdated": "Y-m-dTH:i:s GMT",
    "DateAdded": "Y-m-dTH:i:s GMT",
    "LastResponseCode": 200,
    "Sale": {
      "SaleId": "58c040b32d8baf18526217f5",
      "Status": 1
    }
  }
}
Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "Notification": {
      "type": "object",
      "properties": {
        "NotificationId": {
          "type": "string",
          "description": "Unique identifier"
        },
        "DateUpdated": {
          "type": "string",
          "description": "Date updated"
        },
        "DateAdded": {
          "type": "string",
          "description": "Date added"
        },
        "LastResponseCode": {
          "type": "number",
          "description": "The last http response code obtained"
        },
        "Sale": {
          "type": "object",
          "properties": {
            "SaleId": {
              "type": "string",
              "description": "Sale unique identifier"
            },
            "Status": {
              "type": "number",
              "description": "Sale status"
            }
          },
          "required": [
            "SaleId",
            "Status"
          ]
        }
      },
      "required": [
        "NotificationId",
        "DateAdded",
        "LastResponseCode",
        "Sale"
      ]
    }
  }
}
Response  401
HideShow
Headers
Content-Type: application/json
Body
{
  "Errors": [
    {
      "Type": "Authorization",
      "Field": "headers",
      "Description": "Authorization with the API failed"
    }
  ]
}
Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "Errors": {
      "type": "array"
    }
  }
}

Resend
PUT/notifications/{NotificationId}

Example URI

PUT https://api.hubcash.com/v1/notifications/NotificationId
URI Parameters
HideShow
NotificationId
string (required) 

Identifier

Request  example
HideShow
Headers
Content-Type: application/json
X-Hubcash-Code: <code>
X-Hubcash-Token: <token>
Response  200
HideShow
Headers
Content-Type: application/json
Body
{
  "Notification": {
    "NotificationId": "58c040b32d8baf18526217f5",
    "DateUpdated": "Y-m-dTH:i:s GMT",
    "DateAdded": "Y-m-dTH:i:s GMT",
    "LastResponseCode": 200,
    "Sale": {
      "SaleId": "58c040b32d8baf18526217f5",
      "Status": 1
    }
  }
}
Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "Notification": {
      "type": "object",
      "properties": {
        "NotificationId": {
          "type": "string",
          "description": "Unique identifier"
        },
        "DateUpdated": {
          "type": "string",
          "description": "Date updated"
        },
        "DateAdded": {
          "type": "string",
          "description": "Date added"
        },
        "LastResponseCode": {
          "type": "number",
          "description": "The last http response code obtained"
        },
        "Sale": {
          "type": "object",
          "properties": {
            "SaleId": {
              "type": "string",
              "description": "Sale unique identifier"
            },
            "Status": {
              "type": "number",
              "description": "Sale status"
            }
          },
          "required": [
            "SaleId",
            "Status"
          ]
        }
      },
      "required": [
        "NotificationId",
        "DateAdded",
        "LastResponseCode",
        "Sale"
      ]
    }
  }
}
Response  400
HideShow
Headers
Content-Type: application/json
Body
{
  "Errors": [
    {
      "Type": "Error",
      "Field": "Name",
      "Description": "Required"
    }
  ]
}
Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "Errors": {
      "type": "array"
    }
  }
}
Response  401
HideShow
Headers
Content-Type: application/json
Body
{
  "Errors": [
    {
      "Type": "Authorization",
      "Field": "headers",
      "Description": "Authorization with the API failed"
    }
  ]
}
Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "Errors": {
      "type": "array"
    }
  }
}

List of notifications

List
GET/notifications{?offset,rows}

Example URI

GET https://api.hubcash.com/v1/notifications?offset=0&rows=10
URI Parameters
HideShow
offset
number (optional) Example: 0

Offset of rows

rows
number (optional) Example: 10

Number of rows

Request  example
HideShow
Headers
Content-Type: application/json
X-Hubcash-Code: <code>
X-Hubcash-Token: <token>
Response  200
HideShow
Headers
Content-Type: application/json
Body
{
  "Notifications": [
    {
      "NotificationId": "58c040b32d8baf18526217f5",
      "DateUpdated": "Y-m-dTH:i:s GMT",
      "DateAdded": "Y-m-dTH:i:s GMT",
      "LastResponseCode": 200,
      "Sale": {
        "SaleId": "58c040b32d8baf18526217f5",
        "Status": 1
      }
    }
  ]
}
Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "Notifications": {
      "type": "array"
    }
  }
}
Response  401
HideShow
Headers
Content-Type: application/json
Body
{
  "Errors": [
    {
      "Type": "Authorization",
      "Field": "headers",
      "Description": "Authorization with the API failed"
    }
  ]
}
Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "Errors": {
      "type": "array"
    }
  }
}

Generated by aglio on 09 Nov 2017