CubedPay

Get Token From Callback Code

 
posthttps://api.cubedpay.com/auth/oauth/token
curl --request POST \
  --url 'https://api.cubedpay.com/auth/oauth/token?code=code'
var request = require("request");

var options = { method: 'POST',
  url: 'https://api.cubedpay.com/auth/oauth/token',
  qs: { code: 'code' } };

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});
require 'uri'
require 'net/http'

url = URI("https://api.cubedpay.com/auth/oauth/token?code=code")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Post.new(url)

response = http.request(request)
puts response.read_body
var data = JSON.stringify(false);

var xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener("readystatechange", function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open("POST", "https://api.cubedpay.com/auth/oauth/token?code=code");

xhr.send(data);
import requests

url = "https://api.cubedpay.com/auth/oauth/token"

querystring = {"code":"code"}

response = requests.request("POST", url, params=querystring)

print(response.text)
A binary file was returned

You couldn't be authenticated

{
  "success": true,
  "return": {
    "access_token": "<token>",
    "refresh_token": "<token>",
    "scopes": ["user","shop","user:profile"],
    "expires_in": 123456
  }
}

Query Params

code
string
required

Code handed to you by the OAuth flow

 

Refresh Token

 
gethttps://api.cubedpay.com/auth/oauth/refresh
curl --request GET \
  --url 'https://api.cubedpay.com/auth/oauth/refresh?refresh_token=refresh_token'
var request = require("request");

var options = { method: 'GET',
  url: 'https://api.cubedpay.com/auth/oauth/refresh',
  qs: { refresh_token: 'refresh_token' } };

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});
require 'uri'
require 'net/http'

url = URI("https://api.cubedpay.com/auth/oauth/refresh?refresh_token=refresh_token")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Get.new(url)

response = http.request(request)
puts response.read_body
var data = JSON.stringify(false);

var xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener("readystatechange", function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open("GET", "https://api.cubedpay.com/auth/oauth/refresh?refresh_token=refresh_token");

xhr.send(data);
import requests

url = "https://api.cubedpay.com/auth/oauth/refresh"

querystring = {"refresh_token":"refresh_token"}

response = requests.request("GET", url, params=querystring)

print(response.text)
A binary file was returned

You couldn't be authenticated

{
  "success": true,
  "return": {
    "access_token": "<token>",
    "refresh_token": "<token>",
    "scopes": ["user","shop","user:profile"],
    "expires_in": 123456
  }
}

Query Params

refresh_token
string
required

This token is passed to your application when converting the auth code to a auth token.

 

List Shops

API Scope: shop

 

Query Auth

 Authentication is required for this endpoint.
gethttps://api.cubedpay.com/shop
curl --request GET \
  --url https://api.cubedpay.com/shop
var request = require("request");

var options = { method: 'GET', url: 'https://api.cubedpay.com/shop' };

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});
require 'uri'
require 'net/http'

url = URI("https://api.cubedpay.com/shop")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Get.new(url)

response = http.request(request)
puts response.read_body
var data = JSON.stringify(false);

var xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener("readystatechange", function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open("GET", "https://api.cubedpay.com/shop");

xhr.send(data);
import requests

url = "https://api.cubedpay.com/shop"

response = requests.request("GET", url)

print(response.text)
A binary file was returned

You couldn't be authenticated

{
    "success": true,
    "return": {
        "cursor": {
            "current_page": 1,
            "total_pages": 1,
            "total_items": 1,
            "per_page": 10
        },
        "data": [
            {
                "id": "shop_PHQfsZ5St9X",
                "url": "keoir",
                "name": "Keoir's Store",
                "active": "1",
                "disabled": "0",
                "disabled_reason": "",
                "time_zone": "America/Chicago",
                "members": [
                    {
                        "user": {
                            "id": "17",
                            "username": "keoir2"
                        },
                        "grant_all": true,
                        "permissions": [
                            "*"
                        ]
                    }
                ],
                "created": {
                    "numeric": 1516398073,
                    "timestamp": "2018-01-19 21:41:13",
                    "datetime": "01/19/18 9:41 PM",
                    "date": "01/19/18",
                    "relative": "5 minutes ago",
                    "timezone": "UTC"
                }
            }
        ]
    }
}
{
    "success": false,
    "return": {
        "code": 400,
        "message": "ERROR MESSAGE"
    }
}

Query Params

page
int32
perpage
int32
 

Get Shop

API Scope: shop

 

Query Auth

 Authentication is required for this endpoint.
gethttps://api.cubedpay.com/shop/shop_id
curl --request GET \
  --url https://api.cubedpay.com/shop/shop_id
var request = require("request");

var options = { method: 'GET',
  url: 'https://api.cubedpay.com/shop/shop_id' };

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});
require 'uri'
require 'net/http'

url = URI("https://api.cubedpay.com/shop/shop_id")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Get.new(url)

response = http.request(request)
puts response.read_body
var data = JSON.stringify(false);

var xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener("readystatechange", function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open("GET", "https://api.cubedpay.com/shop/shop_id");

xhr.send(data);
import requests

url = "https://api.cubedpay.com/shop/shop_id"

response = requests.request("GET", url)

print(response.text)
A binary file was returned

You couldn't be authenticated

{
    "success": true,
    "return": {
        "id": "shop_PHQfsZ5St9X",
        "url": "keoir",
        "name": "Keoir's Store",
        "active": "1",
        "disabled": "0",
        "disabled_reason": "",
        "time_zone": "America/Chicago",
        "members": [
            {
                "user": {
                    "id": "17",
                    "username": "keoir2"
                },
                "grant_all": true,
                "permissions": [
                    "*"
                ]
            }
        ],
        "created": {
            "numeric": 1516398073,
            "timestamp": "2018-01-19 21:41:13",
            "datetime": "01/19/18 9:41 PM",
            "date": "01/19/18",
            "relative": "4 minutes ago",
            "timezone": "UTC"
        }
    }
}
{
    "success": false,
    "return": {
        "code": 400,
        "message": "ERROR MESSAGE"
    }
}

Path Params

shop_id
string
required

ID of the shop you wish to get

 

Required Scope: user-manage

Update Shop

API Scope: shop

 

Query Auth

 Authentication is required for this endpoint.
posthttps://api.cubedpay.com/shop/shop_id/update
curl --request POST \
  --url https://api.cubedpay.com/shop/shop_id/update
var request = require("request");

var options = { method: 'POST',
  url: 'https://api.cubedpay.com/shop/shop_id/update' };

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});
require 'uri'
require 'net/http'

url = URI("https://api.cubedpay.com/shop/shop_id/update")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Post.new(url)

response = http.request(request)
puts response.read_body
var data = JSON.stringify(false);

var xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener("readystatechange", function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open("POST", "https://api.cubedpay.com/shop/shop_id/update");

xhr.send(data);
import requests

url = "https://api.cubedpay.com/shop/shop_id/update"

response = requests.request("POST", url)

print(response.text)
A binary file was returned

You couldn't be authenticated

{
    "success": true,
    "return": {
        "id": "shop_PHQfsZ5St9X",
        "url": "keoir",
        "name": "Keoir's Store",
        "active": "1",
        "disabled": "0",
        "disabled_reason": "",
        "time_zone": "America/Chicago",
        "members": [
            {
                "user": {
                    "id": "17",
                    "username": "keoir2"
                },
                "grant_all": true,
                "permissions": [
                    "*"
                ]
            }
        ],
        "created": {
            "numeric": 1516398073,
            "timestamp": "2018-01-19 21:41:13",
            "datetime": "01/19/18 9:41 PM",
            "date": "01/19/18",
            "relative": "4 minutes ago",
            "timezone": "UTC"
        }
    }
}
{
    "success": false,
    "return": {
        "code": 400,
        "message": "ERROR MESSAGE"
    }
}

Path Params

shop_id
string
required

ID of the shop you want to update

Form Data

name
string

New name of the store

timezone
string

New timezone of the store

game
string

New default game type of the store (See Extra -> Get Games)

home_text
string

New text to display on the webstore homepage

sandbox
boolean

Whether to put the shop into sandbox mode or not

logo
file

New store logo

 

Required Scope: user-manage

Get Customers

API Scope: shop:customer

 

Query Auth

 Authentication is required for this endpoint.
gethttps://api.cubedpay.com/shop/shop_id/customer
curl --request GET \
  --url https://api.cubedpay.com/shop/shop_id/customer
var request = require("request");

var options = { method: 'GET',
  url: 'https://api.cubedpay.com/shop/shop_id/customer' };

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});
require 'uri'
require 'net/http'

url = URI("https://api.cubedpay.com/shop/shop_id/customer")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Get.new(url)

response = http.request(request)
puts response.read_body
var data = JSON.stringify(false);

var xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener("readystatechange", function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open("GET", "https://api.cubedpay.com/shop/shop_id/customer");

xhr.send(data);
import requests

url = "https://api.cubedpay.com/shop/shop_id/customer"

response = requests.request("GET", url)

print(response.text)
A binary file was returned

You couldn't be authenticated

{
    "success": true,
    "return": {
        "cursor": {
            "current_page": 1,
            "total_pages": 1,
            "total_items": 1,
            "per_page": 10
        },
        "data": [
          {
            "id": "1",
            "username": "user",
            "first_name": "The",
            "last_name": "User"
          }
        ]
    }
}

Path Params

shop_id
string
required

Shop ID

Query Params

page
string
perpage
string
 

Managers

 

Invite User To Manage Store

API Scope: shop:manager

 

Query Auth

 Authentication is required for this endpoint.
posthttps://api.cubedpay.com/shop/shop_id/manager
curl --request POST \
  --url https://api.cubedpay.com/shop/shop_id/manager
var request = require("request");

var options = { method: 'POST',
  url: 'https://api.cubedpay.com/shop/shop_id/manager' };

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});
require 'uri'
require 'net/http'

url = URI("https://api.cubedpay.com/shop/shop_id/manager")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Post.new(url)

response = http.request(request)
puts response.read_body
var data = JSON.stringify(false);

var xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener("readystatechange", function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open("POST", "https://api.cubedpay.com/shop/shop_id/manager");

xhr.send(data);
import requests

url = "https://api.cubedpay.com/shop/shop_id/manager"

response = requests.request("POST", url)

print(response.text)
A binary file was returned

You couldn't be authenticated

{
    "success": true,
    "return": {
        "user": {
            "id": "1",
            "username": "username",
            "first_name": "The",
          	"last_name": "User"
        },
        "grant_all": true,
        "permissions": [
            "*"
        ]
    }
}
{
    "success": false,
    "return": {
        "code": 400,
        "message": "ERROR MESSAGE"
    }
}

Path Params

shop_id
string
required

Shop ID

Form Data

manager_id
string
required

Cubedpay Username, Email, or ID

permissions
string
required

Comma separated permission nodes (See Global -> Permissions)

 

Grant Single Permission

API Scope: shop:manager

 

Query Auth

 Authentication is required for this endpoint.
posthttps://api.cubedpay.com/shop/shop_id/manager/manager_id
curl --request POST \
  --url https://api.cubedpay.com/shop/shop_id/manager/manager_id
var request = require("request");

var options = { method: 'POST',
  url: 'https://api.cubedpay.com/shop/shop_id/manager/manager_id' };

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});
require 'uri'
require 'net/http'

url = URI("https://api.cubedpay.com/shop/shop_id/manager/manager_id")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Post.new(url)

response = http.request(request)
puts response.read_body
var data = JSON.stringify(false);

var xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener("readystatechange", function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open("POST", "https://api.cubedpay.com/shop/shop_id/manager/manager_id");

xhr.send(data);
import requests

url = "https://api.cubedpay.com/shop/shop_id/manager/manager_id"

response = requests.request("POST", url)

print(response.text)
A binary file was returned

You couldn't be authenticated

{
    "success": true,
    "return": {
        "user": {
            "id": "1",
            "username": "username",
          	"first_name": "The",
          	"last_Name": "User"
        },
        "grant_all": true,
        "permissions": [
            "*"
        ]
    }
}
{
    "success": false,
    "return": {
        "code": 400,
        "message": "ERROR MESSAGE"
    }
}

Path Params

shop_id
string
required

Shop ID

manager_id
string
required

Manager to grant permission for

Form Data

permission
string
required

Permission node (See Global -> Permissions)

 

Revoke Single Permission/Manager

API Scope: shop:manager

 

Query Auth

 Authentication is required for this endpoint.
deletehttps://api.cubedpay.com/shop/shop_id/manager/manager_id
curl --request DELETE \
  --url https://api.cubedpay.com/shop/shop_id/manager/manager_id
var request = require("request");

var options = { method: 'DELETE',
  url: 'https://api.cubedpay.com/shop/shop_id/manager/manager_id' };

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});
require 'uri'
require 'net/http'

url = URI("https://api.cubedpay.com/shop/shop_id/manager/manager_id")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Delete.new(url)

response = http.request(request)
puts response.read_body
var data = JSON.stringify(false);

var xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener("readystatechange", function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open("DELETE", "https://api.cubedpay.com/shop/shop_id/manager/manager_id");

xhr.send(data);
import requests

url = "https://api.cubedpay.com/shop/shop_id/manager/manager_id"

response = requests.request("DELETE", url)

print(response.text)
A binary file was returned

You couldn't be authenticated

{
    "success": true,
    "return": {
        "deleted": true
    }
}
{
    "success": false,
    "return": {
        "code": 400,
        "message": "ERROR MESSAGE"
    }
}

Path Params

shop_id
string
required

Shop ID

manager_id
string
required

Manager to revoke permission for

Form Data

permission
string
required

Permission Node (all to revoke all permissions and remove manager)

 

Update Permissions

API Scope: shop:manager

 

Query Auth

 Authentication is required for this endpoint.
patchhttps://api.cubedpay.com/shop/shop_id/manager/manager_id
curl --request PATCH \
  --url https://api.cubedpay.com/shop/shop_id/manager/manager_id
var request = require("request");

var options = { method: 'PATCH',
  url: 'https://api.cubedpay.com/shop/shop_id/manager/manager_id' };

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});
require 'uri'
require 'net/http'

url = URI("https://api.cubedpay.com/shop/shop_id/manager/manager_id")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Patch.new(url)

response = http.request(request)
puts response.read_body
var data = JSON.stringify(false);

var xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener("readystatechange", function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open("PATCH", "https://api.cubedpay.com/shop/shop_id/manager/manager_id");

xhr.send(data);
import requests

url = "https://api.cubedpay.com/shop/shop_id/manager/manager_id"

response = requests.request("PATCH", url)

print(response.text)
A binary file was returned

You couldn't be authenticated

{
	"success": true,
  "return": {
    "changes": 2,
    "log": {
      "a.permission": "grant",
      "b.permission": "revoke"
    }
  }
}

Path Params

shop_id
string
required

Shop ID

manager_id
string
required

Manager to update permissions for

Form Data

permissions
string
required

Comma separated permission nodes (See Global -> Permissions)

 

Packages

 

List Packages

API Scope: shop:package

 

Query Auth

 Authentication is required for this endpoint.
gethttps://api.cubedpay.com/shop/shop_id/package
curl --request GET \
  --url https://api.cubedpay.com/shop/shop_id/package
var request = require("request");

var options = { method: 'GET',
  url: 'https://api.cubedpay.com/shop/shop_id/package' };

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});
require 'uri'
require 'net/http'

url = URI("https://api.cubedpay.com/shop/shop_id/package")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Get.new(url)

response = http.request(request)
puts response.read_body
var data = JSON.stringify(false);

var xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener("readystatechange", function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open("GET", "https://api.cubedpay.com/shop/shop_id/package");

xhr.send(data);
import requests

url = "https://api.cubedpay.com/shop/shop_id/package"

response = requests.request("GET", url)

print(response.text)
A binary file was returned

You couldn't be authenticated

{
    "success": true,
    "return": {
        "cursor": {
            "current_page": 1,
            "total_pages": 1,
            "total_items": 1,
            "per_page": 10
        },
        "data": [{
            "id": "package_5O6YifVH5ulY4hxTGHJH1fVW",
            "name": "Demo Package",
            "description": "Something...",
            "price": "10.00",
            "is_public": "0"
        }]
    }
}
{
    "success": false,
    "return": {
        "code": 400,
        "message": "ERROR MESSAGE"
    }
}

Path Params

shop_id
string
required

Shop ID

Form Data

page
int32
perpage
int32
 

Get Package

API Scope: shop:package

 

Query Auth

 Authentication is required for this endpoint.
gethttps://api.cubedpay.com/shop/shop_id/package/package_id
curl --request GET \
  --url https://api.cubedpay.com/shop/shop_id/package/package_id
var request = require("request");

var options = { method: 'GET',
  url: 'https://api.cubedpay.com/shop/shop_id/package/package_id' };

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});
require 'uri'
require 'net/http'

url = URI("https://api.cubedpay.com/shop/shop_id/package/package_id")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Get.new(url)

response = http.request(request)
puts response.read_body
var data = JSON.stringify(false);

var xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener("readystatechange", function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open("GET", "https://api.cubedpay.com/shop/shop_id/package/package_id");

xhr.send(data);
import requests

url = "https://api.cubedpay.com/shop/shop_id/package/package_id"

response = requests.request("GET", url)

print(response.text)
A binary file was returned

You couldn't be authenticated

{
    "success": true,
    "return": {
        "id": "package_5O6YifVH5ulY4hxTGHJH1fVW",
        "name": "Demo Package",
        "description": "Something...",
        "price": "10.00",
        "is_public": "0"
    }
}
{
    "success": false,
    "return": {
        "code": 400,
        "message": "ERROR MESSAGE"
    }
}

Path Params

shop_id
string
required

Shop ID

package_id
string
required

Package to get

 

Create Package

API Scope: shop:package

 

Query Auth

 Authentication is required for this endpoint.
posthttps://api.cubedpay.com/shop/shop_id/package
curl --request POST \
  --url https://api.cubedpay.com/shop/shop_id/package
var request = require("request");

var options = { method: 'POST',
  url: 'https://api.cubedpay.com/shop/shop_id/package' };

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});
require 'uri'
require 'net/http'

url = URI("https://api.cubedpay.com/shop/shop_id/package")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Post.new(url)

response = http.request(request)
puts response.read_body
var data = JSON.stringify(false);

var xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener("readystatechange", function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open("POST", "https://api.cubedpay.com/shop/shop_id/package");

xhr.send(data);
import requests

url = "https://api.cubedpay.com/shop/shop_id/package"

response = requests.request("POST", url)

print(response.text)
A binary file was returned

You couldn't be authenticated

{
    "success": true,
    "return": {
        "id": "package_5O6YifVH5ulY4hxTGHJH1fVW",
        "name": "Demo Package",
        "description": "Something...",
        "price": "10.00",
        "is_public": "0"
    }
}
{
    "success": false,
    "return": {
        "code": 400,
        "message": "ERROR MESSAGE"
    }
}

Path Params

shop_id
string
required

Shop ID

Form Data

name
string
required

Name of the package

description
string
required

Description of the package (used on the webstore)

price
double
required

Price of the package

public
boolean
required

Whether to show the package on the webstore or not

icon
file

Icon of the package

 

Update Package

API Scope: shop:package

 

Query Auth

 Authentication is required for this endpoint.
patchhttps://api.cubedpay.com/shop/shop_id/package/package_id
curl --request PATCH \
  --url https://api.cubedpay.com/shop/shop_id/package/package_id
var request = require("request");

var options = { method: 'PATCH',
  url: 'https://api.cubedpay.com/shop/shop_id/package/package_id' };

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});
require 'uri'
require 'net/http'

url = URI("https://api.cubedpay.com/shop/shop_id/package/package_id")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Patch.new(url)

response = http.request(request)
puts response.read_body
var data = JSON.stringify(false);

var xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener("readystatechange", function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open("PATCH", "https://api.cubedpay.com/shop/shop_id/package/package_id");

xhr.send(data);
import requests

url = "https://api.cubedpay.com/shop/shop_id/package/package_id"

response = requests.request("PATCH", url)

print(response.text)
A binary file was returned

You couldn't be authenticated

{
    "success": true,
    "return": {
        "id": "package_5O6YifVH5ulY4hxTGHJH1fVW",
        "name": "Demo Package",
        "description": "Something...",
        "price": "10.00",
        "is_public": "0"
    }
}

Path Params

shop_id
string
required

Shop ID

package_id
string
required

Package to update

Form Data

name
string

Name of the package

description
string

Description of the package (used on the webstore)

price
double

Price of the package

public
boolean

Whether to show the package on the webstore or not

icon
file

Icon of the package

 

Delete Package

API Scope: shop:package

 

Query Auth

 Authentication is required for this endpoint.
deletehttps://api.cubedpay.com/shop/shop_id/package/package_id
curl --request DELETE \
  --url https://api.cubedpay.com/shop/shop_id/package/package_id
var request = require("request");

var options = { method: 'DELETE',
  url: 'https://api.cubedpay.com/shop/shop_id/package/package_id' };

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});
require 'uri'
require 'net/http'

url = URI("https://api.cubedpay.com/shop/shop_id/package/package_id")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Delete.new(url)

response = http.request(request)
puts response.read_body
var data = JSON.stringify(false);

var xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener("readystatechange", function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open("DELETE", "https://api.cubedpay.com/shop/shop_id/package/package_id");

xhr.send(data);
import requests

url = "https://api.cubedpay.com/shop/shop_id/package/package_id"

response = requests.request("DELETE", url)

print(response.text)
A binary file was returned

You couldn't be authenticated

{
    "success": true,
    "return": {
        "deleted": true
    }
}
{
    "success": false,
    "return": {
        "code": 400,
        "message": "ERROR MESSAGE"
    }
}

Path Params

shop_id
string
required

Shop ID

package_id
string
required

Package to delete

 

Discounts

 

List Discounts

API Scope: shop:discount

 

Query Auth

 Authentication is required for this endpoint.
gethttps://api.cubedpay.com/shop/shop_id/discount
curl --request GET \
  --url https://api.cubedpay.com/shop/shop_id/discount
var request = require("request");

var options = { method: 'GET',
  url: 'https://api.cubedpay.com/shop/shop_id/discount' };

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});
require 'uri'
require 'net/http'

url = URI("https://api.cubedpay.com/shop/shop_id/discount")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Get.new(url)

response = http.request(request)
puts response.read_body
var data = JSON.stringify(false);

var xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener("readystatechange", function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open("GET", "https://api.cubedpay.com/shop/shop_id/discount");

xhr.send(data);
import requests

url = "https://api.cubedpay.com/shop/shop_id/discount"

response = requests.request("GET", url)

print(response.text)
A binary file was returned

You couldn't be authenticated

{
  "success": true,
  "return": {
    "cursor": {
      "current_page": 1,
      "total_pages": 1,
      "total_items": 1,
      "per_page": 10
    },
    "data": [{
      "id": "discount_3rq45nwi5n656n56onw56nwn56",
      "name": "DAB Discount",
      "starts": 0,
      "ends": 0,
      "active": "1",
      "amount": 10.00,
      "percent": "0",
      "code": "DAB",
      "maxUses": 100,
      "uses": 1
    }]
  }
}

Path Params

shop_Id
string
required

Shop ID

Query Params

page
int32
perpage
int32
 

Get Discount

API Scope: shop:discount

 

Query Auth

 Authentication is required for this endpoint.
gethttps://api.cubedpay.com/shop/shop_id/discount/discount_id
curl --request GET \
  --url https://api.cubedpay.com/shop/shop_id/discount/discount_id
var request = require("request");

var options = { method: 'GET',
  url: 'https://api.cubedpay.com/shop/shop_id/discount/discount_id' };

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});
require 'uri'
require 'net/http'

url = URI("https://api.cubedpay.com/shop/shop_id/discount/discount_id")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Get.new(url)

response = http.request(request)
puts response.read_body
var data = JSON.stringify(false);

var xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener("readystatechange", function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open("GET", "https://api.cubedpay.com/shop/shop_id/discount/discount_id");

xhr.send(data);
import requests

url = "https://api.cubedpay.com/shop/shop_id/discount/discount_id"

response = requests.request("GET", url)

print(response.text)
A binary file was returned

You couldn't be authenticated

{
	"success": true,
  "return": {
    "id": "discount_3rq45nwi5n656n56onw56nwn56",
    "name": "DAB Discount",
    "starts": 0,
    "ends": 0,
    "active": "1",
    "amount": 10.00,
    "percent": "0",
    "code": "DAB",
    "maxUses": 100,
    "uses": 1
  }
}

Path Params

shop_id
string
required

Shop ID

discount_id
string
required

Discount ID

 

Create Discount

API Scope: shop:discount

 

Query Auth

 Authentication is required for this endpoint.
posthttps://api.cubedpay.com/shop/shop_id/discount
curl --request POST \
  --url https://api.cubedpay.com/shop/shop_id/discount
var request = require("request");

var options = { method: 'POST',
  url: 'https://api.cubedpay.com/shop/shop_id/discount' };

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});
require 'uri'
require 'net/http'

url = URI("https://api.cubedpay.com/shop/shop_id/discount")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Post.new(url)

response = http.request(request)
puts response.read_body
var data = JSON.stringify(false);

var xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener("readystatechange", function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open("POST", "https://api.cubedpay.com/shop/shop_id/discount");

xhr.send(data);
import requests

url = "https://api.cubedpay.com/shop/shop_id/discount"

response = requests.request("POST", url)

print(response.text)
A binary file was returned

You couldn't be authenticated

{
	"success": true,
  "return": {
    "id": "discount_3rq45nwi5n656n56onw56nwn56",
    "name": "DAB Discount",
    "starts": 0,
    "ends": 0,
    "active": "1",
    "amount": 10.00,
    "percent": "0",
    "code": "DAB",
    "maxUses": 100,
    "uses": 1
  }
}

Path Params

shop_id
string
required

Shop ID

Form Data

name
string
required

Name of the Discount

amount
double
required

Amount of the discount

percent
boolean
required

Whether to apply the amount as a percentage or raw value

active
boolean

Whether to allow customers to use the discount or not

starts
date-time
ends
date-time
code
string
required

Code that people will enter to apply the discount

maxUses
int32
required

How many times the code can be used

useWithSale
boolean
required

Whether the discount will apply to items that are already on sale or not

 

Update Discount

API Scope: shop:discount

 

Query Auth

 Authentication is required for this endpoint.
patchhttps://api.cubedpay.com/shop/shop_id/discount/discount_id
curl --request PATCH \
  --url https://api.cubedpay.com/shop/shop_id/discount/discount_id
var request = require("request");

var options = { method: 'PATCH',
  url: 'https://api.cubedpay.com/shop/shop_id/discount/discount_id' };

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});
require 'uri'
require 'net/http'

url = URI("https://api.cubedpay.com/shop/shop_id/discount/discount_id")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Patch.new(url)

response = http.request(request)
puts response.read_body
var data = JSON.stringify(false);

var xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener("readystatechange", function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open("PATCH", "https://api.cubedpay.com/shop/shop_id/discount/discount_id");

xhr.send(data);
import requests

url = "https://api.cubedpay.com/shop/shop_id/discount/discount_id"

response = requests.request("PATCH", url)

print(response.text)
A binary file was returned

You couldn't be authenticated

{
	"success": true,
  "return": {
    "id": "discount_3rq45nwi5n656n56onw56nwn56",
    "name": "DAB Discount",
    "starts": 0,
    "ends": 0,
    "active": "1",
    "amount": 10.00,
    "percent": "0",
    "code": "DAB",
    "maxUses": 100,
    "uses": 1
  }
}

Path Params

shop_id
string
required

Shop ID

discount_id
string
required

Discount ID

Form Data

name
string

Name of the Discount

amount
double

Amount of the discount

percent
boolean

Whether to apply the amount as a percentage or raw value

active
boolean

Whether to allow customers to use the discount or not

starts
date-time
ends
date-time
code
string

Code that people will enter to apply the discount

maxUses
int32

How many times the code can be used

useWithSale
boolean

Whether the discount will apply to items that are already on sale or not

 

Delete Discount

API Scope: shop:discount

 

Query Auth

 Authentication is required for this endpoint.
deletehttps://api.cubedpay.com/shop/shop_id/discount/discount_id
curl --request DELETE \
  --url https://api.cubedpay.com/shop/shop_id/discount/discount_id
var request = require("request");

var options = { method: 'DELETE',
  url: 'https://api.cubedpay.com/shop/shop_id/discount/discount_id' };

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});
require 'uri'
require 'net/http'

url = URI("https://api.cubedpay.com/shop/shop_id/discount/discount_id")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Delete.new(url)

response = http.request(request)
puts response.read_body
var data = JSON.stringify(false);

var xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener("readystatechange", function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open("DELETE", "https://api.cubedpay.com/shop/shop_id/discount/discount_id");

xhr.send(data);
import requests

url = "https://api.cubedpay.com/shop/shop_id/discount/discount_id"

response = requests.request("DELETE", url)

print(response.text)
A binary file was returned

You couldn't be authenticated

{
  "success": true,
  "return": {
    "deleted": true
  }
}

Path Params

shop_id
string
required

Shop ID

discount_id
string
required

Discount ID

 

Add Package Ref To Discount

API Scope: shop:discount

 

Query Auth

 Authentication is required for this endpoint.
posthttps://api.cubedpay.com/shop/shop_id/discount/discount_id/packageRef
curl --request POST \
  --url 'https://api.cubedpay.com/shop/shop_id/discount/discount_id/packageRef?type=type&data=data'
var request = require("request");

var options = { method: 'POST',
  url: 'https://api.cubedpay.com/shop/shop_id/discount/discount_id/packageRef',
  qs: 
   { type: 'type',
     data: 'data' } };

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});
require 'uri'
require 'net/http'

url = URI("https://api.cubedpay.com/shop/shop_id/discount/discount_id/packageRef?type=type&data=data")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Post.new(url)

response = http.request(request)
puts response.read_body
var data = JSON.stringify(false);

var xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener("readystatechange", function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open("POST", "https://api.cubedpay.com/shop/shop_id/discount/discount_id/packageRef?type=type&data=data");

xhr.send(data);
import requests

url = "https://api.cubedpay.com/shop/shop_id/discount/discount_id/packageRef"

querystring = {"type":"type","data":"data"}

response = requests.request("POST", url, params=querystring)

print(response.text)
A binary file was returned

You couldn't be authenticated

{
	"success": true,
  "return": {
    "id": "packageref_ddkl3knlkn65lkn7ln54346k",
    "type": "id",
    "data": "package_sdfgndfgdgn54kn5nl4k5"
  }
}

Path Params

shop_id
string
required

Shop ID

discount_id
string
required

Discount ID

Query Params

type
string
required

Type of Package Ref (Currently: id)

data
string
required

Data of the Package Ref Type (ID = package id)

 

List Package Refs On Discount

API Scope: shop:discount

 

Query Auth

 Authentication is required for this endpoint.
gethttps://api.cubedpay.com/shop/shop_id/discount/discount_id/packageRef
curl --request GET \
  --url https://api.cubedpay.com/shop/shop_id/discount/discount_id/packageRef
var request = require("request");

var options = { method: 'GET',
  url: 'https://api.cubedpay.com/shop/shop_id/discount/discount_id/packageRef' };

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});
require 'uri'
require 'net/http'

url = URI("https://api.cubedpay.com/shop/shop_id/discount/discount_id/packageRef")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Get.new(url)

response = http.request(request)
puts response.read_body
var data = JSON.stringify(false);

var xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener("readystatechange", function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open("GET", "https://api.cubedpay.com/shop/shop_id/discount/discount_id/packageRef");

xhr.send(data);
import requests

url = "https://api.cubedpay.com/shop/shop_id/discount/discount_id/packageRef"

response = requests.request("GET", url)

print(response.text)
A binary file was returned

You couldn't be authenticated

{
  "success": true,
  "return": {
    "cursor": {
      "current_pages": 1,
      "total_pages": 1,
      "total_items": 1,
      "per_page": 10
    },
    "data": [{
	    "id": "packageref_ddkl3knlkn65lkn7ln54346k",
 	    "type": "id",
 	    "data": "package_sdfgndfgdgn54kn5nl4k5"
		}]
  }
}

Path Params

shop_id
string
required

Shop ID

discount_id
string
required

Discount ID

Query Params

page
int32
perpage
int32
 

Remove Package Ref From Discount

API Scope: shop:discount

 

Query Auth

 Authentication is required for this endpoint.
deletehttps://api.cubedpay.com/shop/shop_id/discount/discount_id/packageRef/ref_id
curl --request DELETE \
  --url https://api.cubedpay.com/shop/shop_id/discount/discount_id/packageRef/ref_id
var request = require("request");

var options = { method: 'DELETE',
  url: 'https://api.cubedpay.com/shop/shop_id/discount/discount_id/packageRef/ref_id' };

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});
require 'uri'
require 'net/http'

url = URI("https://api.cubedpay.com/shop/shop_id/discount/discount_id/packageRef/ref_id")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Delete.new(url)

response = http.request(request)
puts response.read_body
var data = JSON.stringify(false);

var xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener("readystatechange", function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open("DELETE", "https://api.cubedpay.com/shop/shop_id/discount/discount_id/packageRef/ref_id");

xhr.send(data);
import requests

url = "https://api.cubedpay.com/shop/shop_id/discount/discount_id/packageRef/ref_id"

response = requests.request("DELETE", url)

print(response.text)
A binary file was returned

You couldn't be authenticated

{
  "success": true,
  "return": {
    "deleted": true
  }
}

Path Params

shop_id
string
required

Shop ID

discount_id
string
required

Discount ID

ref_id
string
required

Package Reference ID

 

Sales

 

List Sales

API Scope: shop:sale

 

Query Auth

 Authentication is required for this endpoint.
gethttps://api.cubedpay.com/shop/shop_id/sale
curl --request GET \
  --url https://api.cubedpay.com/shop/shop_id/sale
var request = require("request");

var options = { method: 'GET',
  url: 'https://api.cubedpay.com/shop/shop_id/sale' };

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});
require 'uri'
require 'net/http'

url = URI("https://api.cubedpay.com/shop/shop_id/sale")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Get.new(url)

response = http.request(request)
puts response.read_body
var data = JSON.stringify(false);

var xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener("readystatechange", function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open("GET", "https://api.cubedpay.com/shop/shop_id/sale");

xhr.send(data);
import requests

url = "https://api.cubedpay.com/shop/shop_id/sale"

response = requests.request("GET", url)

print(response.text)
A binary file was returned

You couldn't be authenticated

{
  "success": true,
  "return": {
    "cursor": {
      "current_page": 1,
      "total_pages": 1,
      "total_items": 1,
      "per_page": 10
    },
    "data": [{
      "id": "discount_3rq45nwi5n656n56onw56nwn56",
      "name": "DAB Sale",
      "starts": 0,
      "ends": 0,
      "active": "1",
      "amount": 10.00,
      "percent": "0",
      "banner": "DAB Sale: $10 off memes",
      "visible": "1"
    }]
  }
}

Path Params

shop_id
string
required

Shop ID

Query Params

page
int32
perpage
int32
 

Get Sale

API Scope: shop:sale

 

Query Auth

 Authentication is required for this endpoint.
gethttps://api.cubedpay.com/shop/shop_id/sale/sale_id
curl --request GET \
  --url https://api.cubedpay.com/shop/shop_id/sale/sale_id
var request = require("request");

var options = { method: 'GET',
  url: 'https://api.cubedpay.com/shop/shop_id/sale/sale_id' };

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});
require 'uri'
require 'net/http'

url = URI("https://api.cubedpay.com/shop/shop_id/sale/sale_id")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Get.new(url)

response = http.request(request)
puts response.read_body
var data = JSON.stringify(false);

var xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener("readystatechange", function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open("GET", "https://api.cubedpay.com/shop/shop_id/sale/sale_id");

xhr.send(data);
import requests

url = "https://api.cubedpay.com/shop/shop_id/sale/sale_id"

response = requests.request("GET", url)

print(response.text)
A binary file was returned

You couldn't be authenticated

{
	"success": true,
  "return": {
    "id": "sale_3rq45nwi5n656n56onw56nwn56",
    "name": "DAB Sale",
    "starts": 0,
    "ends": 0,
    "active": "1",
    "amount": 10.00,
    "percent": "0",
    "banner": "DAB Sale: $10 off memes",
    "visible": "1"
  }
}

Path Params

shop_id
string
required

Shop ID

sale_id
string
required

Sale ID

 

Create Sale

API Scope: shop:sale

 

Query Auth

 Authentication is required for this endpoint.
posthttps://api.cubedpay.com/shop/shop_id/sale
curl --request POST \
  --url https://api.cubedpay.com/shop/shop_id/sale
var request = require("request");

var options = { method: 'POST',
  url: 'https://api.cubedpay.com/shop/shop_id/sale' };

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});
require 'uri'
require 'net/http'

url = URI("https://api.cubedpay.com/shop/shop_id/sale")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Post.new(url)

response = http.request(request)
puts response.read_body
var data = JSON.stringify(false);

var xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener("readystatechange", function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open("POST", "https://api.cubedpay.com/shop/shop_id/sale");

xhr.send(data);
import requests

url = "https://api.cubedpay.com/shop/shop_id/sale"

response = requests.request("POST", url)

print(response.text)
A binary file was returned

You couldn't be authenticated

{
	"success": true,
  "return": {
    "id": "sale_3rq45nwi5n656n56onw56nwn56",
    "name": "DAB Sale",
    "starts": 0,
    "ends": 0,
    "active": "1",
    "amount": 10.00,
    "percent": "0",
    "banner": "DAB Sale: $10 off memes",
    "visible": "1"
  }
}

Path Params

shop_id
string
required

Shop ID

Form Data

name
string
required

Name of the Sale

amount
double
required

Amount of the sale

percent
boolean
required

Whether to apply the amount as a percentage or raw value

active
boolean

Whether to allow customers to use the sale or not

starts
date-time
required
ends
date-time
required
banner
string
required

Banner to display in the webstore

visible
boolean
required

Whether to show the banner in the webstore

 

Update Sale

API Scope: shop:sale

 

Query Auth

 Authentication is required for this endpoint.
patchhttps://api.cubedpay.com/shop/shop_id/sale/sale_id
curl --request PATCH \
  --url https://api.cubedpay.com/shop/shop_id/sale/sale_id
var request = require("request");

var options = { method: 'PATCH',
  url: 'https://api.cubedpay.com/shop/shop_id/sale/sale_id' };

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});
require 'uri'
require 'net/http'

url = URI("https://api.cubedpay.com/shop/shop_id/sale/sale_id")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Patch.new(url)

response = http.request(request)
puts response.read_body
var data = JSON.stringify(false);

var xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener("readystatechange", function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open("PATCH", "https://api.cubedpay.com/shop/shop_id/sale/sale_id");

xhr.send(data);
import requests

url = "https://api.cubedpay.com/shop/shop_id/sale/sale_id"

response = requests.request("PATCH", url)

print(response.text)
A binary file was returned

You couldn't be authenticated

{
	"success": true,
  "return": {
    "id": "sale_3rq45nwi5n656n56onw56nwn56",
    "name": "DAB Sale",
    "starts": 0,
    "ends": 0,
    "active": "1",
    "amount": 10.00,
    "percent": "0",
    "banner": "DAB Sale: $10 off memes",
    "visible": "1"
  }
}

Path Params

shop_id
string
required

Shop ID

sale_id
string
required

Sale ID

Form Data

name
string

Name of the Sale

amount
double

Amount of the sale

percent
boolean

Whether to apply the amount as a percentage or raw value

active
boolean

Whether to allow customers to use the sale or not

starts
date-time
ends
date-time
banner
string

Banner to display in the webstore

visible
boolean

Whether to show the banner in the webstore

 

Delete Sale

API Scope: shop:sale

 

Query Auth

 Authentication is required for this endpoint.
deletehttps://api.cubedpay.com/shop/shop_id/sale/sale_id
curl --request DELETE \
  --url https://api.cubedpay.com/shop/shop_id/sale/sale_id
var request = require("request");

var options = { method: 'DELETE',
  url: 'https://api.cubedpay.com/shop/shop_id/sale/sale_id' };

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});
require 'uri'
require 'net/http'

url = URI("https://api.cubedpay.com/shop/shop_id/sale/sale_id")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Delete.new(url)

response = http.request(request)
puts response.read_body
var data = JSON.stringify(false);

var xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener("readystatechange", function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open("DELETE", "https://api.cubedpay.com/shop/shop_id/sale/sale_id");

xhr.send(data);
import requests

url = "https://api.cubedpay.com/shop/shop_id/sale/sale_id"

response = requests.request("DELETE", url)

print(response.text)
A binary file was returned

You couldn't be authenticated

{
  "success": true,
  "return": {
    "deleted": true
  }
}

Path Params

shop_id
string
required

Shop ID

sale_id
string
required

Sale ID

 

Add Package Ref To Sale

API Scope: shop:sale

 

Query Auth

 Authentication is required for this endpoint.
posthttps://api.cubedpay.com/shop/shop_id/sale/sale_id/packageRef
curl --request POST \
  --url 'https://api.cubedpay.com/shop/shop_id/sale/sale_id/packageRef?type=type&data=data'
var request = require("request");

var options = { method: 'POST',
  url: 'https://api.cubedpay.com/shop/shop_id/sale/sale_id/packageRef',
  qs: 
   { type: 'type',
     data: 'data' } };

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});
require 'uri'
require 'net/http'

url = URI("https://api.cubedpay.com/shop/shop_id/sale/sale_id/packageRef?type=type&data=data")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Post.new(url)

response = http.request(request)
puts response.read_body
var data = JSON.stringify(false);

var xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener("readystatechange", function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open("POST", "https://api.cubedpay.com/shop/shop_id/sale/sale_id/packageRef?type=type&data=data");

xhr.send(data);
import requests

url = "https://api.cubedpay.com/shop/shop_id/sale/sale_id/packageRef"

querystring = {"type":"type","data":"data"}

response = requests.request("POST", url, params=querystring)

print(response.text)
A binary file was returned

You couldn't be authenticated

{
	"success": true,
  "return": {
    "id": "packageref_ddkl3knlkn65lkn7ln54346k",
    "type": "id",
    "data": "package_sdfgndfgdgn54kn5nl4k5"
  }
}

Path Params

shop_id
string
required

Shop ID

sale_id
string
required

Sale ID

Query Params

type
string
required

Type of Package Ref (Currently: id)

data
string
required

Data of the Package Ref Type (ID = package id)

 

List Package Refs On Sale

API Scope: shop:sale

 

Query Auth

 Authentication is required for this endpoint.
gethttps://api.cubedpay.com/shop/shop_id/sale/sale_id/packageRef
curl --request GET \
  --url https://api.cubedpay.com/shop/shop_id/sale/sale_id/packageRef
var request = require("request");

var options = { method: 'GET',
  url: 'https://api.cubedpay.com/shop/shop_id/sale/sale_id/packageRef' };

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});
require 'uri'
require 'net/http'

url = URI("https://api.cubedpay.com/shop/shop_id/sale/sale_id/packageRef")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Get.new(url)

response = http.request(request)
puts response.read_body
var data = JSON.stringify(false);

var xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener("readystatechange", function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open("GET", "https://api.cubedpay.com/shop/shop_id/sale/sale_id/packageRef");

xhr.send(data);
import requests

url = "https://api.cubedpay.com/shop/shop_id/sale/sale_id/packageRef"

response = requests.request("GET", url)

print(response.text)
A binary file was returned

You couldn't be authenticated

{
  "success": true,
  "return": {
    "cursor": {
      "current_pages": 1,
      "total_pages": 1,
      "total_items": 1,
      "per_page": 10
    },
    "data": [{
	    "id": "packageref_ddkl3knlkn65lkn7ln54346k",
 	    "type": "id",
 	    "data": "package_sdfgndfgdgn54kn5nl4k5"
		}]
  }
}

Path Params

shop_id
string
required

Shop ID

sale_id
string
required

Sale ID

Query Params

page
int32
perpage
int32
 

Remove Package Ref From

API Scope: shop:sale

 

Query Auth

 Authentication is required for this endpoint.
deletehttps://api.cubedpay.com/shop/shop_id/sale/sale_id/packageRef/ref_id
curl --request DELETE \
  --url https://api.cubedpay.com/shop/shop_id/sale/sale_id/packageRef/ref_id
var request = require("request");

var options = { method: 'DELETE',
  url: 'https://api.cubedpay.com/shop/shop_id/sale/sale_id/packageRef/ref_id' };

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});
require 'uri'
require 'net/http'

url = URI("https://api.cubedpay.com/shop/shop_id/sale/sale_id/packageRef/ref_id")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Delete.new(url)

response = http.request(request)
puts response.read_body
var data = JSON.stringify(false);

var xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener("readystatechange", function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open("DELETE", "https://api.cubedpay.com/shop/shop_id/sale/sale_id/packageRef/ref_id");

xhr.send(data);
import requests

url = "https://api.cubedpay.com/shop/shop_id/sale/sale_id/packageRef/ref_id"

response = requests.request("DELETE", url)

print(response.text)
A binary file was returned

You couldn't be authenticated

{
  "success": true,
  "return": {
    "deleted": true
  }
}

Path Params

shop_id
string
required

Shop ID

sale_id
string
required

Sale ID

ref_id
string
required

Package Reference ID

 

Transactions

 

List Transactions

API Scope: shop:transaction

 

Query Auth

 Authentication is required for this endpoint.
gethttps://api.cubedpay.com/shop/shop_id/transaction
curl --request GET \
  --url https://api.cubedpay.com/shop/shop_id/transaction
var request = require("request");

var options = { method: 'GET',
  url: 'https://api.cubedpay.com/shop/shop_id/transaction' };

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});
require 'uri'
require 'net/http'

url = URI("https://api.cubedpay.com/shop/shop_id/transaction")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Get.new(url)

response = http.request(request)
puts response.read_body
var data = JSON.stringify(false);

var xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener("readystatechange", function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open("GET", "https://api.cubedpay.com/shop/shop_id/transaction");

xhr.send(data);
import requests

url = "https://api.cubedpay.com/shop/shop_id/transaction"

response = requests.request("GET", url)

print(response.text)
A binary file was returned

You couldn't be authenticated

{
  "success": true,
  "return": {
    "cursor": {
      "current_page": 1,
      "total_pages": 1,
      "total_items": 1,
      "per_page": 10
    },
    "data": [{
     	"id": "transaction_fdgdofg5430945nfig98tyg",
      "status": "completed",
      "user": {<basic user fields>},
      "shop": {<basic shop fields>},
      "amount": "$10.00",
      "profile": {<user profile>},
      "created": "<timestamp>",
      "completed": "<timestamp>"
    }],
  }
}

Path Params

shop_id
string
required

Shop ID

Query Params

page
int32
perpage
int32
filter
string

One of: completed, abandoned, or all

 

Get Transaction

API Scope: shop:transaction

 

Query Auth

 Authentication is required for this endpoint.
gethttps://api.cubedpay.com/shop/shop_id/transaction/transaction_id
curl --request GET \
  --url https://api.cubedpay.com/shop/shop_id/transaction/transaction_id
var request = require("request");

var options = { method: 'GET',
  url: 'https://api.cubedpay.com/shop/shop_id/transaction/transaction_id' };

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});
require 'uri'
require 'net/http'

url = URI("https://api.cubedpay.com/shop/shop_id/transaction/transaction_id")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Get.new(url)

response = http.request(request)
puts response.read_body
var data = JSON.stringify(false);

var xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener("readystatechange", function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open("GET", "https://api.cubedpay.com/shop/shop_id/transaction/transaction_id");

xhr.send(data);
import requests

url = "https://api.cubedpay.com/shop/shop_id/transaction/transaction_id"

response = requests.request("GET", url)

print(response.text)
A binary file was returned

You couldn't be authenticated

{
  "success": true,
  "return": {
    "id": "transaction_fdgdofg5430945nfig98tyg",
    "status": "completed",
    "user": {<basic user fields>},
    "shop": {<basic shop fields>},
    "amount": "$10.00",
    "profile": {<user profile>},
    "created": "<timestamp>",
    "completed": "<timestamp>"
  }
}

Path Params

shop_id
string
required

Shop ID

transaction_id
string
required

Transaction ID

 

Get Transaction Packages

API Scope: shop:transaction

 

Query Auth

 Authentication is required for this endpoint.
gethttps://api.cubedpay.com/shop/shop_id/transaction/transaction_id/packages
curl --request GET \
  --url https://api.cubedpay.com/shop/shop_id/transaction/transaction_id/packages
var request = require("request");

var options = { method: 'GET',
  url: 'https://api.cubedpay.com/shop/shop_id/transaction/transaction_id/packages' };

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});
require 'uri'
require 'net/http'

url = URI("https://api.cubedpay.com/shop/shop_id/transaction/transaction_id/packages")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Get.new(url)

response = http.request(request)
puts response.read_body
var data = JSON.stringify(false);

var xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener("readystatechange", function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open("GET", "https://api.cubedpay.com/shop/shop_id/transaction/transaction_id/packages");

xhr.send(data);
import requests

url = "https://api.cubedpay.com/shop/shop_id/transaction/transaction_id/packages"

response = requests.request("GET", url)

print(response.text)
A binary file was returned

You couldn't be authenticated

{
  "success": true,
  "return": [{
    "id": "kjn56jbnk54j63k45j673j35",
    "packageId": "package_5O6YifVH5ulY4hxTGHJH1fVW",
    "name": "Demo Package",
    "icon": {<media field>},
    "quantity": 1,
    "price": 10.00, //Regular item price
    "sale_price": 8.00, //Actual price paid (including discounts/sales)
    "sale_name": "DAB Sale"
  }]
}

Path Params

shop_id
string
required

Shop ID

transaction_id
string
required

Transaction ID

 

Get Transaction Payments

API Scope: shop:transaction

 

Query Auth

 Authentication is required for this endpoint.
gethttps://api.cubedpay.com/shop/shop_id/transaction/transaction_id/payments
curl --request GET \
  --url https://api.cubedpay.com/shop/shop_id/transaction/transaction_id/payments
var request = require("request");

var options = { method: 'GET',
  url: 'https://api.cubedpay.com/shop/shop_id/transaction/transaction_id/payments' };

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});
require 'uri'
require 'net/http'

url = URI("https://api.cubedpay.com/shop/shop_id/transaction/transaction_id/payments")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Get.new(url)

response = http.request(request)
puts response.read_body
var data = JSON.stringify(false);

var xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener("readystatechange", function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open("GET", "https://api.cubedpay.com/shop/shop_id/transaction/transaction_id/payments");

xhr.send(data);
import requests

url = "https://api.cubedpay.com/shop/shop_id/transaction/transaction_id/payments"

response = requests.request("GET", url)

print(response.text)
A binary file was returned

You couldn't be authenticated

{
  "success": true,
  "return": [{
    "id": "dsjfnb43k5b43k5b65756jd",
    "gateway": "stripe",
    "charged": 10.00,
    "currency": {<currency data>},
    "fee": 0.00,
    "created": "<timestamp>",
    "completed": "<timestamp>"
  }]
}

Path Params

shop_id
string
required

Shop ID

transaction_id
string
required

Transaction ID

 

Create Transaction

API Scope: shop:checkout

 

Query Auth

 Authentication is required for this endpoint.
posthttps://api.cubedpay.com/shop/shop_id/transaction
curl --request POST \
  --url https://api.cubedpay.com/shop/shop_id/transaction
var request = require("request");

var options = { method: 'POST',
  url: 'https://api.cubedpay.com/shop/shop_id/transaction' };

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});
require 'uri'
require 'net/http'

url = URI("https://api.cubedpay.com/shop/shop_id/transaction")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Post.new(url)

response = http.request(request)
puts response.read_body
var data = JSON.stringify(false);

var xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener("readystatechange", function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open("POST", "https://api.cubedpay.com/shop/shop_id/transaction");

xhr.send(data);
import requests

url = "https://api.cubedpay.com/shop/shop_id/transaction"

response = requests.request("POST", url)

print(response.text)
A binary file was returned

You couldn't be authenticated

{
  "success": true,
  "return": {
    "id": "transaction_fdgdofg5430945nfig98tyg",
    "status": "completed",
    "user": {<basic user fields>},
    "shop": {<basic shop fields>},
    "amount": "$10.00",
    "profile": {<user profile>},
    "created": "<timestamp>",
    "completed": "<timestamp>"
  }
}

Path Params

shop_id
string
required

Shop ID

Form Data

items
array of objects
required
package
quantity
customer
string
required

User to assign this transaction to. Can be any of username, email, or id

 

If not using a payment pass to execute this transaction server-side, you will need to redirect the user to https://app.cubedpay.com/checkout/<transaction id> to complete the transaction using the webapp.

Execute Transaction

API Scope: shop:checkout
REQUIRES ACTIVE PAYMENT PASS

 

Query Auth

 Authentication is required for this endpoint.
posthttps://api.cubedpay.com/shop/shop_id/transaction/transaction_id/execute
curl --request POST \
  --url https://api.cubedpay.com/shop/shop_id/transaction/transaction_id/execute
var request = require("request");

var options = { method: 'POST',
  url: 'https://api.cubedpay.com/shop/shop_id/transaction/transaction_id/execute' };

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});
require 'uri'
require 'net/http'

url = URI("https://api.cubedpay.com/shop/shop_id/transaction/transaction_id/execute")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Post.new(url)

response = http.request(request)
puts response.read_body
var data = JSON.stringify(false);

var xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener("readystatechange", function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open("POST", "https://api.cubedpay.com/shop/shop_id/transaction/transaction_id/execute");

xhr.send(data);
import requests

url = "https://api.cubedpay.com/shop/shop_id/transaction/transaction_id/execute"

response = requests.request("POST", url)

print(response.text)
A binary file was returned

You couldn't be authenticated

{
  "success": true,
  "return": {
    "id": "transaction_fdgdofg5430945nfig98tyg",
    "status": "completed",
    "user": {<basic user fields>},
    "shop": {<basic shop fields>},
    "amount": "$10.00",
    "profile": {<user profile>},
    "created": "<timestamp>",
    "completed": "<timestamp>"
  }
}

Path Params

shop_id
string
required

Shop ID

transaction_id
string
required

Transaction ID

 

Events

 

Get Event Feed

API Scope: shop:events

 

Query Auth

 Authentication is required for this endpoint.
gethttps://api.cubedpay.com/shop/shop_id/event
curl --request GET \
  --url https://api.cubedpay.com/shop/shop_id/event
var request = require("request");

var options = { method: 'GET',
  url: 'https://api.cubedpay.com/shop/shop_id/event' };

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});
require 'uri'
require 'net/http'

url = URI("https://api.cubedpay.com/shop/shop_id/event")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Get.new(url)

response = http.request(request)
puts response.read_body
var data = JSON.stringify(false);

var xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener("readystatechange", function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open("GET", "https://api.cubedpay.com/shop/shop_id/event");

xhr.send(data);
import requests

url = "https://api.cubedpay.com/shop/shop_id/event"

response = requests.request("GET", url)

print(response.text)
A binary file was returned

You couldn't be authenticated

{
  "success": true,
  "return": {
    "items": 1,
    "data": [{
      "id": "event_a4534rg5slkdnlndsq34v34",
      "type": "order-complete", //more coming at some point
      "obj": {
        "type": "Order", // will change per event type
        "model": {<order fields>}
      },
      "accepted": null
    }]
  }
}

Path Params

shop_id
string
required

Shop ID

Query Params

before
date-time

Max time to search against

after
date-time

Min time to search against

sort
string

ASC (Ascending) or DESC (Decending)

 

Acknowledge Event

API Scope: shop:events

 

Query Auth

 Authentication is required for this endpoint.
posthttps://api.cubedpay.com/shop/shop_id/event/event_id/ack
curl --request POST \
  --url https://api.cubedpay.com/shop/shop_id/event/event_id/ack
var request = require("request");

var options = { method: 'POST',
  url: 'https://api.cubedpay.com/shop/shop_id/event/event_id/ack' };

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});
require 'uri'
require 'net/http'

url = URI("https://api.cubedpay.com/shop/shop_id/event/event_id/ack")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Post.new(url)

response = http.request(request)
puts response.read_body
var data = JSON.stringify(false);

var xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener("readystatechange", function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open("POST", "https://api.cubedpay.com/shop/shop_id/event/event_id/ack");

xhr.send(data);
import requests

url = "https://api.cubedpay.com/shop/shop_id/event/event_id/ack"

response = requests.request("POST", url)

print(response.text)
A binary file was returned

You couldn't be authenticated

{
  "success": true,
  "return": {
    "ack": "success"
  }
}

Path Params

shop_id
string
required

Shop ID

event_id
string
required

Event to acknowledge

 

Pages

 

List Pages

API Scope: shop:page

 

Query Auth

 Authentication is required for this endpoint.
gethttps://api.cubedpay.com/shop/shop_id/page
curl --request GET \
  --url https://api.cubedpay.com/shop/shop_id/page
var request = require("request");

var options = { method: 'GET',
  url: 'https://api.cubedpay.com/shop/shop_id/page' };

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});
require 'uri'
require 'net/http'

url = URI("https://api.cubedpay.com/shop/shop_id/page")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Get.new(url)

response = http.request(request)
puts response.read_body
var data = JSON.stringify(false);

var xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener("readystatechange", function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open("GET", "https://api.cubedpay.com/shop/shop_id/page");

xhr.send(data);
import requests

url = "https://api.cubedpay.com/shop/shop_id/page"

response = requests.request("GET", url)

print(response.text)
A binary file was returned

You couldn't be authenticated

{
  "success": true,
  "return": {
    "cursor": {
      "current_page": 1,
      "total_pages": 1,
      "total_items": 1,
      "per_page": 10
    },
    "data": [{
      "id": "page_3rq45nwi5n656n56onw56nwn56",
      "name": "A store page",
      "description": "This is a store page",
      "public": "0",
      "type": "basic",
      "display": "grid",
      "order": 1
    }]
  }
}
    

Path Params

shop_id
string
required

Shop ID

Query Params

page
int32
perpage
int32
 

Get Page

API Scope: shop:page

 

Query Auth

 Authentication is required for this endpoint.
gethttps://api.cubedpay.com/shop/shop_id/page/page_id
curl --request GET \
  --url https://api.cubedpay.com/shop/shop_id/page/page_id
var request = require("request");

var options = { method: 'GET',
  url: 'https://api.cubedpay.com/shop/shop_id/page/page_id' };

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});
require 'uri'
require 'net/http'

url = URI("https://api.cubedpay.com/shop/shop_id/page/page_id")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Get.new(url)

response = http.request(request)
puts response.read_body
var data = JSON.stringify(false);

var xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener("readystatechange", function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open("GET", "https://api.cubedpay.com/shop/shop_id/page/page_id");

xhr.send(data);
import requests

url = "https://api.cubedpay.com/shop/shop_id/page/page_id"

response = requests.request("GET", url)

print(response.text)
A binary file was returned

You couldn't be authenticated

{
  "success": true,
  "return": {
    "id": "page_3rq45nwi5n656n56onw56nwn56",
    "name": "A store page",
    "description": "This is a store page",
    "public": "0",
    "type": "basic",
    "display": "grid",
    "order": 1
  }
}

Path Params

shop_id
string
required

Shop ID

page_id
string
required

Page to get

 

Create Page

API Scope: shop:page

 

Query Auth

 Authentication is required for this endpoint.
posthttps://api.cubedpay.com/shop/shop_id/page
curl --request POST \
  --url https://api.cubedpay.com/shop/shop_id/page
var request = require("request");

var options = { method: 'POST',
  url: 'https://api.cubedpay.com/shop/shop_id/page' };

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});
require 'uri'
require 'net/http'

url = URI("https://api.cubedpay.com/shop/shop_id/page")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Post.new(url)

response = http.request(request)
puts response.read_body
var data = JSON.stringify(false);

var xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener("readystatechange", function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open("POST", "https://api.cubedpay.com/shop/shop_id/page");

xhr.send(data);
import requests

url = "https://api.cubedpay.com/shop/shop_id/page"

response = requests.request("POST", url)

print(response.text)
A binary file was returned

You couldn't be authenticated

{
  "success": true,
  "return": {
    "id": "page_3rq45nwi5n656n56onw56nwn56",
    "name": "A store page",
    "description": "This is a store page",
    "public": "0",
    "type": "basic",
    "display": "grid",
    "order": 1
  }
}

Path Params

shop_id
string
required

Shop ID

Form Data

name
string
required

Name of the page

description
string
required

Description of the page

public
boolean
required

Whether to show the page on the store or not

type
string

Page package discovery type: basic

display
string

Display mode of the page: grid or list

order
int32

Order of the page in relation to others

 

Update Page

API Scope: shop:page

 

Query Auth

 Authentication is required for this endpoint.
patchhttps://api.cubedpay.com/shop/shop_id/page/page_id
curl --request PATCH \
  --url https://api.cubedpay.com/shop/shop_id/page/page_id
var request = require("request");

var options = { method: 'PATCH',
  url: 'https://api.cubedpay.com/shop/shop_id/page/page_id' };

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});
require 'uri'
require 'net/http'

url = URI("https://api.cubedpay.com/shop/shop_id/page/page_id")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Patch.new(url)

response = http.request(request)
puts response.read_body
var data = JSON.stringify(false);

var xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener("readystatechange", function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open("PATCH", "https://api.cubedpay.com/shop/shop_id/page/page_id");

xhr.send(data);
import requests

url = "https://api.cubedpay.com/shop/shop_id/page/page_id"

response = requests.request("PATCH", url)

print(response.text)
A binary file was returned

You couldn't be authenticated

{
  "success": true,
  "return": {
    "id": "page_3rq45nwi5n656n56onw56nwn56",
    "name": "A store page",
    "description": "This is a store page",
    "public": "0",
    "type": "basic",
    "display": "grid",
    "order": 1
  }
}

Path Params

shop_id
string
required

Shop ID

page_id
string
required

Page to update

Form Data

name
string

Name of the page

description
string

Description of the page

public
boolean

Whether to show the page on the store or not

type
string

Page package discovery type: basic

display
string

Display mode of the page: grid or list

order
int32

Order of the page in relation to others

 

Delete Page

API Scope: shop:page

 

Query Auth

 Authentication is required for this endpoint.
deletehttps://api.cubedpay.com/shop/shop_id/page/page_id
curl --request DELETE \
  --url https://api.cubedpay.com/shop/shop_id/page/page_id
var request = require("request");

var options = { method: 'DELETE',
  url: 'https://api.cubedpay.com/shop/shop_id/page/page_id' };

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});
require 'uri'
require 'net/http'

url = URI("https://api.cubedpay.com/shop/shop_id/page/page_id")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Delete.new(url)

response = http.request(request)
puts response.read_body
var data = JSON.stringify(false);

var xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener("readystatechange", function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open("DELETE", "https://api.cubedpay.com/shop/shop_id/page/page_id");

xhr.send(data);
import requests

url = "https://api.cubedpay.com/shop/shop_id/page/page_id"

response = requests.request("DELETE", url)

print(response.text)
A binary file was returned

You couldn't be authenticated

{
  "success": true,
  "return": {
    "deleted": true
  }
}

Path Params

shop_id
string
required

Shop ID

page_id
string
required

Page to delete

 

Page Packages

 

Basic: List Packages On Page

API Scope: shop:page

 

Query Auth

 Authentication is required for this endpoint.
gethttps://api.cubedpay.com/shop/shop_id/page/page_id/package
curl --request GET \
  --url https://api.cubedpay.com/shop/shop_id/page/page_id/package
var request = require("request");

var options = { method: 'GET',
  url: 'https://api.cubedpay.com/shop/shop_id/page/page_id/package' };

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});
require 'uri'
require 'net/http'

url = URI("https://api.cubedpay.com/shop/shop_id/page/page_id/package")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Get.new(url)

response = http.request(request)
puts response.read_body
var data = JSON.stringify(false);

var xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener("readystatechange", function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open("GET", "https://api.cubedpay.com/shop/shop_id/page/page_id/package");

xhr.send(data);
import requests

url = "https://api.cubedpay.com/shop/shop_id/page/page_id/package"

response = requests.request("GET", url)

print(response.text)
A binary file was returned

You couldn't be authenticated

{
  "success": true,
  "return": {
    "cursor": {
      "current_page": 1,
      "total_pages": 1,
      "total_items": 1,
      "per_page": 10
    },
    "data": [{
      "id": "jndkdjnfknk4nn4jnjk4ntnt",
      "package": {<package fields>},
      "order": 1
    }]
  }
}

Path Params

shop_id
string
required

Shop ID

page_id
string
required

Page ID

Query Params

page
int32
perpage
int32
 

Basic: Add Package To Page

API Scope: shop:page

 

Query Auth

 Authentication is required for this endpoint.
posthttps://api.cubedpay.com/shop/shop_id/page/page_id/package
curl --request POST \
  --url https://api.cubedpay.com/shop/shop_id/page/page_id/package
var request = require("request");

var options = { method: 'POST',
  url: 'https://api.cubedpay.com/shop/shop_id/page/page_id/package' };

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});
require 'uri'
require 'net/http'

url = URI("https://api.cubedpay.com/shop/shop_id/page/page_id/package")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Post.new(url)

response = http.request(request)
puts response.read_body
var data = JSON.stringify(false);

var xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener("readystatechange", function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open("POST", "https://api.cubedpay.com/shop/shop_id/page/page_id/package");

xhr.send(data);
import requests

url = "https://api.cubedpay.com/shop/shop_id/page/page_id/package"

response = requests.request("POST", url)

print(response.text)
A binary file was returned

You couldn't be authenticated

{
  "success": true,
  "return": {
    "id": "jndkdjnfknk4nn4jnjk4ntnt",
    "package": {<package fields>},
    "order": 1
  }
}

Path Params

shop_id
string
required

Shop ID

page_id
string
required

Page ID

Form Data

package
string
required

Package to add to page

order
int32

Order of the package in relation to others on the page

 

Basic: Update Package On Page

API Scope: shop:page

 

Query Auth

 Authentication is required for this endpoint.
patchhttps://api.cubedpay.com/shop/shop_id/page/page_id/package/package_id
curl --request PATCH \
  --url https://api.cubedpay.com/shop/shop_id/page/page_id/package/package_id
var request = require("request");

var options = { method: 'PATCH',
  url: 'https://api.cubedpay.com/shop/shop_id/page/page_id/package/package_id' };

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});
require 'uri'
require 'net/http'

url = URI("https://api.cubedpay.com/shop/shop_id/page/page_id/package/package_id")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Patch.new(url)

response = http.request(request)
puts response.read_body
var data = JSON.stringify(false);

var xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener("readystatechange", function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open("PATCH", "https://api.cubedpay.com/shop/shop_id/page/page_id/package/package_id");

xhr.send(data);
import requests

url = "https://api.cubedpay.com/shop/shop_id/page/page_id/package/package_id"

response = requests.request("PATCH", url)

print(response.text)
A binary file was returned

You couldn't be authenticated

{
  "success": true,
  "return": {
    "id": "jndkdjnfknk4nn4jnjk4ntnt",
    "package": {<package fields>},
    "order": 1
  }
}

Path Params

shop_id
string
required

Shop ID

page_id
string
required

Page ID

package_id
string
required

Package instance to update

Form Data

order
int32
required

Order of the package in relation to others on the page

 

Basic: Remove Package From Page

API Scope: shop:page

 

Query Auth

 Authentication is required for this endpoint.
deletehttps://api.cubedpay.com/shop/shop_id/page/page_id/package/package_id
curl --request DELETE \
  --url https://api.cubedpay.com/shop/shop_id/page/page_id/package/package_id
var request = require("request");

var options = { method: 'DELETE',
  url: 'https://api.cubedpay.com/shop/shop_id/page/page_id/package/package_id' };

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});
require 'uri'
require 'net/http'

url = URI("https://api.cubedpay.com/shop/shop_id/page/page_id/package/package_id")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Delete.new(url)

response = http.request(request)
puts response.read_body
var data = JSON.stringify(false);

var xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener("readystatechange", function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open("DELETE", "https://api.cubedpay.com/shop/shop_id/page/page_id/package/package_id");

xhr.send(data);
import requests

url = "https://api.cubedpay.com/shop/shop_id/page/page_id/package/package_id"

response = requests.request("DELETE", url)

print(response.text)
A binary file was returned

You couldn't be authenticated

{
  "success": true,
  "return": {
    "deleted": true
  }
}

Path Params

shop_id
string
required

Shop ID

page_id
string
required

Page ID

package_id
string
required

Package instance to remove from the page

 

Sidebar

 

Get All Sidebar Items

API Scope: shop:design

 

Query Auth

 Authentication is required for this endpoint.
gethttps://api.cubedpay.com/shop/shop_id/sidebar
curl --request GET \
  --url https://api.cubedpay.com/shop/shop_id/sidebar
var request = require("request");

var options = { method: 'GET',
  url: 'https://api.cubedpay.com/shop/shop_id/sidebar' };

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});
require 'uri'
require 'net/http'

url = URI("https://api.cubedpay.com/shop/shop_id/sidebar")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Get.new(url)

response = http.request(request)
puts response.read_body
var data = JSON.stringify(false);

var xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener("readystatechange", function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open("GET", "https://api.cubedpay.com/shop/shop_id/sidebar");

xhr.send(data);
import requests

url = "https://api.cubedpay.com/shop/shop_id/sidebar"

response = requests.request("GET", url)

print(response.text)
A binary file was returned

You couldn't be authenticated

{
  "success": true,
  "return": {
    "cursor": { //This may disappear soon as this method will always return all items
      "current_page": 1,
      "total_pages": 1,
      "total_items": 1,
      "per_page": 10
    },
    "data": [{
      "id": "module_ffnslenq4n5eteknten4i",
      "side": "left",
      "type": "cart",
      "settings": {<per instance json settings>},
      "public": "0",
      "order": 1
    }]
  }
}

Path Params

shop_id
string
required

Shop ID

 

Get Sidebar Item

API Scope: shop:design

 

Query Auth

 Authentication is required for this endpoint.
gethttps://api.cubedpay.com/shop/shop_id/sidebar/item_id
curl --request GET \
  --url https://api.cubedpay.com/shop/shop_id/sidebar/item_id
var request = require("request");

var options = { method: 'GET',
  url: 'https://api.cubedpay.com/shop/shop_id/sidebar/item_id' };

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});
require 'uri'
require 'net/http'

url = URI("https://api.cubedpay.com/shop/shop_id/sidebar/item_id")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Get.new(url)

response = http.request(request)
puts response.read_body
var data = JSON.stringify(false);

var xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener("readystatechange", function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open("GET", "https://api.cubedpay.com/shop/shop_id/sidebar/item_id");

xhr.send(data);
import requests

url = "https://api.cubedpay.com/shop/shop_id/sidebar/item_id"

response = requests.request("GET", url)

print(response.text)
A binary file was returned

You couldn't be authenticated

{
  "success": true,
  "return": {
    "id": "module_ffnslenq4n5eteknten4i",
    "side": "left",
    "type": "cart",
    "settings": {<per instance json settings>},
    "public": "0",
    "order": 1
  }
}

Path Params

shop_id
string
required

Shop ID

item_id
string
required

Sidebar item instance to get

 

Add Sidebar Item

API Scope: shop:package

 

Query Auth

 Authentication is required for this endpoint.
posthttps://api.cubedpay.com/shop/shop_id/sidebar
curl --request POST \
  --url https://api.cubedpay.com/shop/shop_id/sidebar
var request = require("request");

var options = { method: 'POST',
  url: 'https://api.cubedpay.com/shop/shop_id/sidebar' };

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});
require 'uri'
require 'net/http'

url = URI("https://api.cubedpay.com/shop/shop_id/sidebar")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Post.new(url)

response = http.request(request)
puts response.read_body
var data = JSON.stringify(false);

var xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener("readystatechange", function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open("POST", "https://api.cubedpay.com/shop/shop_id/sidebar");

xhr.send(data);
import requests

url = "https://api.cubedpay.com/shop/shop_id/sidebar"

response = requests.request("POST", url)

print(response.text)
A binary file was returned

You couldn't be authenticated

{
  "success": true,
  "return": {
    "id": "module_ffnslenq4n5eteknten4i",
    "side": "left",
    "type": "cart",
    "settings": {<per instance json settings>},
    "public": "0",
    "order": 1
  }
}

Path Params

shop_id
string
required

Shop ID

Form Data

type
string
required

Item type: html, promoted, cart, account

side
string
required

Side of the page to show item on: left, right

settings
json
required

Item instance settings

public
boolean
required

Whether to show the item instance on the webstore or not

order
int32

Order of the item instance compared to the others on the specified side

 

Update Sidebar Item

API Scope: shop:package

 

Query Auth

 Authentication is required for this endpoint.
patchhttps://api.cubedpay.com/shop/shop_id/sidebar/item_id
curl --request PATCH \
  --url https://api.cubedpay.com/shop/shop_id/sidebar/item_id
var request = require("request");

var options = { method: 'PATCH',
  url: 'https://api.cubedpay.com/shop/shop_id/sidebar/item_id' };

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});
require 'uri'
require 'net/http'

url = URI("https://api.cubedpay.com/shop/shop_id/sidebar/item_id")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Patch.new(url)

response = http.request(request)
puts response.read_body
var data = JSON.stringify(false);

var xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener("readystatechange", function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open("PATCH", "https://api.cubedpay.com/shop/shop_id/sidebar/item_id");

xhr.send(data);
import requests

url = "https://api.cubedpay.com/shop/shop_id/sidebar/item_id"

response = requests.request("PATCH", url)

print(response.text)
A binary file was returned

You couldn't be authenticated

{
  "success": true,
  "return": {
    "id": "module_ffnslenq4n5eteknten4i",
    "side": "left",
    "type": "cart",
    "settings": {<per instance json settings>},
    "public": "0",
    "order": 1
  }
}

Path Params

shop_id
string
required

Shop ID

item_id
string
required

Sidebar item instance to update

Form Data

type
string

Item type: html, promoted. cart, account

side
string

Side of the page to show item on: left, right

settings
json

Item instance settings

public
boolean

Whether to show the item instance on the webstore or not

order
int32

Order of the item compared to the others on the specified side

 

Delete Sidebar Item

API Scope: shop:design

 

Query Auth

 Authentication is required for this endpoint.
deletehttps://api.cubedpay.com/shop/shop_id/sidebar/item_id
curl --request DELETE \
  --url https://api.cubedpay.com/shop/shop_id/sidebar/item_id
var request = require("request");

var options = { method: 'DELETE',
  url: 'https://api.cubedpay.com/shop/shop_id/sidebar/item_id' };

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});
require 'uri'
require 'net/http'

url = URI("https://api.cubedpay.com/shop/shop_id/sidebar/item_id")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Delete.new(url)

response = http.request(request)
puts response.read_body
var data = JSON.stringify(false);

var xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener("readystatechange", function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open("DELETE", "https://api.cubedpay.com/shop/shop_id/sidebar/item_id");

xhr.send(data);
import requests

url = "https://api.cubedpay.com/shop/shop_id/sidebar/item_id"

response = requests.request("DELETE", url)

print(response.text)
A binary file was returned

You couldn't be authenticated

{
  "success": true,
  "return": {
    "deleted": true
  }
}

Path Params

shop_id
string
required

Shop ID

item_id
string
required

Item instance to delete

 

Themes

 

List Themes

API Scope: shop:design

 

Query Auth

 Authentication is required for this endpoint.
gethttps://api.cubedpay.com/shop/shop_id/theme
curl --request GET \
  --url https://api.cubedpay.com/shop/shop_id/theme
var request = require("request");

var options = { method: 'GET',
  url: 'https://api.cubedpay.com/shop/shop_id/theme' };

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});
require 'uri'
require 'net/http'

url = URI("https://api.cubedpay.com/shop/shop_id/theme")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Get.new(url)

response = http.request(request)
puts response.read_body
var data = JSON.stringify(false);

var xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener("readystatechange", function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open("GET", "https://api.cubedpay.com/shop/shop_id/theme");

xhr.send(data);
import requests

url = "https://api.cubedpay.com/shop/shop_id/theme"

response = requests.request("GET", url)

print(response.text)
A binary file was returned

You couldn't be authenticated

{
  "success": true,
  "return": {
    "cursor": {
      "current_page": 1,
      "total_pages": 1,
      "total_items": 1,
      "per_page": 10
    },
    "data": [{
      "id": "theme_kjb7j845bkj645bj63k4nl2n3k32",
      "name": "A theme",
      "css": "" //This is raw css, incase you wish to use it in previews
    }]
  }
}

Path Params

shop_id
string
required

Shop ID

Query Params

page
int32
perpage
int32
 

Set Store Theme

API Scope: shop:design

 

Query Auth

 Authentication is required for this endpoint.
puthttps://api.cubedpay.com/shop/shop_id/theme
curl --request PUT \
  --url https://api.cubedpay.com/shop/shop_id/theme
var request = require("request");

var options = { method: 'PUT',
  url: 'https://api.cubedpay.com/shop/shop_id/theme' };

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});
require 'uri'
require 'net/http'

url = URI("https://api.cubedpay.com/shop/shop_id/theme")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Put.new(url)

response = http.request(request)
puts response.read_body
var data = JSON.stringify(false);

var xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener("readystatechange", function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open("PUT", "https://api.cubedpay.com/shop/shop_id/theme");

xhr.send(data);
import requests

url = "https://api.cubedpay.com/shop/shop_id/theme"

response = requests.request("PUT", url)

print(response.text)
A binary file was returned

You couldn't be authenticated

{
  "success": true,
  "return": { // This will be null if removing the theme
    "id": "theme_kjb7j845bkj645bj63k4nl2n3k32",
    "name": "A theme",
    "css": "" //This is raw css, incase you wish to use it in previews
  }
}

Path Params

shop_id
string
required

Shop ID

Form Data

theme
string
required

Theme to set. remove to remove any theme

 

Get Current User

API Scope: user

 

Query Auth

 Authentication is required for this endpoint.
gethttps://api.cubedpay.com/user/
curl --request GET \
  --url https://api.cubedpay.com/user/
var request = require("request");

var options = { method: 'GET', url: 'https://api.cubedpay.com/user/' };

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});
require 'uri'
require 'net/http'

url = URI("https://api.cubedpay.com/user/")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Get.new(url)

response = http.request(request)
puts response.read_body
var data = JSON.stringify(false);

var xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener("readystatechange", function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open("GET", "https://api.cubedpay.com/user/");

xhr.send(data);
import requests

url = "https://api.cubedpay.com/user/"

response = requests.request("GET", url)

print(response.text)
A binary file was returned

You couldn't be authenticated

{
    "success": true,
    "return": {
        "refid": "User::17",
        "id": "17",
        "username": "keoir2",
        "first_name": "User",
        "last_name": "Name",
        "email": "me@email.com",
        "member_since": null,
        "is_complete": true,
        "needs_verification": false,
        "profiles": []
    }
}
 

Transactions

 

Get Transactions

API Scope: user:transaction

 

Query Auth

 Authentication is required for this endpoint.
gethttps://api.cubedpay.com/user/transactions
curl --request GET \
  --url https://api.cubedpay.com/user/transactions
var request = require("request");

var options = { method: 'GET',
  url: 'https://api.cubedpay.com/user/transactions' };

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});
require 'uri'
require 'net/http'

url = URI("https://api.cubedpay.com/user/transactions")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Get.new(url)

response = http.request(request)
puts response.read_body
var data = JSON.stringify(false);

var xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener("readystatechange", function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open("GET", "https://api.cubedpay.com/user/transactions");

xhr.send(data);
import requests

url = "https://api.cubedpay.com/user/transactions"

response = requests.request("GET", url)

print(response.text)
A binary file was returned

You couldn't be authenticated

{
  "success": true,
  "return": {
    "cursor": {
      "current_page": 1,
      "total_pages": 1,
      "total_items": 1,
      "per_page": 10
    },
    "data": [{
     	"id": "transaction_fdgdofg5430945nfig98tyg",
      "status": "completed",
      "user": {<basic user fields>},
      "shop": {<basic shop fields>},
      "amount": "$10.00",
      "profile": {<user profile>},
      "created": "<timestamp>",
      "completed": "<timestamp>"
    }],
  }
}

Query Params

page
int32
perpage
int32
 

Get Transaction

API Scope: user:transaction

 

Query Auth

 Authentication is required for this endpoint.
gethttps://api.cubedpay.com/user/transaction/transaction_id
curl --request GET \
  --url https://api.cubedpay.com/user/transaction/transaction_id
var request = require("request");

var options = { method: 'GET',
  url: 'https://api.cubedpay.com/user/transaction/transaction_id' };

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});
require 'uri'
require 'net/http'

url = URI("https://api.cubedpay.com/user/transaction/transaction_id")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Get.new(url)

response = http.request(request)
puts response.read_body
var data = JSON.stringify(false);

var xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener("readystatechange", function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open("GET", "https://api.cubedpay.com/user/transaction/transaction_id");

xhr.send(data);
import requests

url = "https://api.cubedpay.com/user/transaction/transaction_id"

response = requests.request("GET", url)

print(response.text)
A binary file was returned

You couldn't be authenticated

{
  "success": true,
  "return": {
    "id": "transaction_fdgdofg5430945nfig98tyg",
    "status": "completed",
    "user": {<basic user fields>},
    "shop": {<basic shop fields>},
    "amount": "$10.00",
    "profile": {<user profile>},
    "created": "<timestamp>",
    "completed": "<timestamp>"
  }
}

Path Params

transaction_id
string
required

Transaction ID

 

Get Transaction Products

API Scope: user:transaction

 

Query Auth

 Authentication is required for this endpoint.
gethttps://api.cubedpay.com/user/transaction/transaction_id/products
curl --request GET \
  --url https://api.cubedpay.com/user/transaction/transaction_id/products
var request = require("request");

var options = { method: 'GET',
  url: 'https://api.cubedpay.com/user/transaction/transaction_id/products' };

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});
require 'uri'
require 'net/http'

url = URI("https://api.cubedpay.com/user/transaction/transaction_id/products")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Get.new(url)

response = http.request(request)
puts response.read_body
var data = JSON.stringify(false);

var xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener("readystatechange", function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open("GET", "https://api.cubedpay.com/user/transaction/transaction_id/products");

xhr.send(data);
import requests

url = "https://api.cubedpay.com/user/transaction/transaction_id/products"

response = requests.request("GET", url)

print(response.text)
A binary file was returned

You couldn't be authenticated

{
  "success": true,
  "return": [{
    "id": "kjn56jbnk54j63k45j673j35",
    "packageId": "package_5O6YifVH5ulY4hxTGHJH1fVW",
    "name": "Demo Package",
    "icon": {<media field>},
    "quantity": 1,
    "price": 10.00, //Regular item price
    "sale_price": 8.00, //Actual price paid (including discounts/sales)
    "sale_name": "DAB Sale"
  }]
}

Path Params

transaction_id
string
required

Transaction ID

 

Get Transaction Payments

API Scope: user:transaction

 

Query Auth

 Authentication is required for this endpoint.
gethttps://api.cubedpay.com/user/transaction_id/payments
curl --request GET \
  --url https://api.cubedpay.com/user/transaction_id/payments
var request = require("request");

var options = { method: 'GET',
  url: 'https://api.cubedpay.com/user/transaction_id/payments' };

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});
require 'uri'
require 'net/http'

url = URI("https://api.cubedpay.com/user/transaction_id/payments")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Get.new(url)

response = http.request(request)
puts response.read_body
var data = JSON.stringify(false);

var xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener("readystatechange", function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open("GET", "https://api.cubedpay.com/user/transaction_id/payments");

xhr.send(data);
import requests

url = "https://api.cubedpay.com/user/transaction_id/payments"

response = requests.request("GET", url)

print(response.text)
A binary file was returned

You couldn't be authenticated

{
  "success": true,
  "return": [{
    "id": "dsjfnb43k5b43k5b65756jd",
    "gateway": "stripe",
    "charged": 10.00,
    "currency": {<currency data>},
    "fee": 0.00,
    "created": "<timestamp>",
    "completed": "<timestamp>"
  }]
}

Path Params

transaction_id
string
required

Transaction ID

 

Profiles

 

Get Game Profiles

API Scope: user:profile

 

Query Auth

 Authentication is required for this endpoint.
gethttps://api.cubedpay.com/user/profile
curl --request GET \
  --url https://api.cubedpay.com/user/profile
var request = require("request");

var options = { method: 'GET', url: 'https://api.cubedpay.com/user/profile' };

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});
require 'uri'
require 'net/http'

url = URI("https://api.cubedpay.com/user/profile")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Get.new(url)

response = http.request(request)
puts response.read_body
var data = JSON.stringify(false);

var xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener("readystatechange", function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open("GET", "https://api.cubedpay.com/user/profile");

xhr.send(data);
import requests

url = "https://api.cubedpay.com/user/profile"

response = requests.request("GET", url)

print(response.text)
A binary file was returned

You couldn't be authenticated

{
  "success": true,
  "return": {
    "cursor": {
      "current_page": 1,
      "total_pages": 1,
      "total_items": 1,
      "per_page": 10
    },
    "data": [{
      "id": "profile_kfnsl436j3n4jkjb346kbk346",
      "game": {<game fields>},
      "external_id": "username",
      "data": {<extra data>}
    }]
  }
}
 

Games

 

Query Auth

 Authentication is required for this endpoint.
gethttps://api.cubedpay.com/global/game
curl --request GET \
  --url https://api.cubedpay.com/global/game
var request = require("request");

var options = { method: 'GET', url: 'https://api.cubedpay.com/global/game' };

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});
require 'uri'
require 'net/http'

url = URI("https://api.cubedpay.com/global/game")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Get.new(url)

response = http.request(request)
puts response.read_body
var data = JSON.stringify(false);

var xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener("readystatechange", function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open("GET", "https://api.cubedpay.com/global/game");

xhr.send(data);
import requests

url = "https://api.cubedpay.com/global/game"

response = requests.request("GET", url)

print(response.text)
A binary file was returned

You couldn't be authenticated

{
    "success": true,
    "return": {
        "cursor": {
            "current_page": 1,
            "total_pages": 1,
            "total_items": 1,
            "per_page": 10
        },
        "data": [
            {
                "id": "1",
                "name": "Minecraft"
            }
        ]
    }
}
{
    "success": false,
    "return": {
        "code": 400,
        "message": "ERROR MESSAGE"
    }
}
 

Permissions

 

Query Auth

 Authentication is required for this endpoint.
gethttps://api.cubedpay.com/global/permissions
curl --request GET \
  --url https://api.cubedpay.com/global/permissions
var request = require("request");

var options = { method: 'GET',
  url: 'https://api.cubedpay.com/global/permissions' };

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});
require 'uri'
require 'net/http'

url = URI("https://api.cubedpay.com/global/permissions")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Get.new(url)

response = http.request(request)
puts response.read_body
var data = JSON.stringify(false);

var xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener("readystatechange", function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open("GET", "https://api.cubedpay.com/global/permissions");

xhr.send(data);
import requests

url = "https://api.cubedpay.com/global/permissions"

response = requests.request("GET", url)

print(response.text)
A binary file was returned

You couldn't be authenticated

{
    "success": true,
    "return": {
        "cursor": {
            "current_page": 1,
            "total_pages": 1,
            "total_items": 1,
            "per_page": 10
        },
        "data": [
            {
                "id": "1",
                "name": "Bla Bla Bla Perms",
              	"description": "Does something."
            }
        ]
    }
}
{
    "success": false,
    "return": {
        "code": 400,
        "message": "ERROR MESSAGE"
    }
}