NAV Navbar

API Documentation

shell javascript ruby python php go
  • Introduction
  • Authentication
  • Cards
  • Customers
  • Authorizations
  • Companies
  • Payments
  • Plans
  • Products
  • Regions
  • Regions
  • Roles and Permissions
  • Subscriptions
  • VAT
  • Title
  • Vendors
  • Webhooks
  • Checkout Landing
  • Checkout Express
  • Common Errors Status Code
  • Introduction

    Welcome to the Rebill API. You can use our API to access Rebill API endpoints, which can get information on customers, cards, subscriptions, plans, and more. Also, you can process payments through any of your connected payment gateways.

    We have language bindings in Curl, Ruby, Python, and Javascript. You can view code examples in the dark area to the right, and you can switch the programming language of the examples with the tabs in the top right.

    Rebill uses a token Bearer to allow access to the API. You can access to the APIs using your own personal account, and asking for special access to the other functionalities by email.

    Looking for any specific Endpoint? Write us with your request to developers@rebill.to.

    Authentication

    CURL Request Example
    
    curl --location --request GET "https://api.rebill.to/v1/getToken" \
    --header "Content-Type: application/x-www-form-urlencoded"
    
    Node.JS Request Example
    
    var request = require('request');
    var options = {
      'method': 'GET',
      'url': 'https://api.rebill.to/v1/getToken',
      'headers': {
        'Content-Type': 'application/x-www-form-urlencoded'
      }
    };
    request(options, function (error, response) {
      if (error) throw new Error(error);
      console.log(response.body);
    });
    
    Ruby Request Example
    
    require "uri"
    require "net/http"
    
    url = URI("https://api.rebill.to/v1/getToken")
    
    https = Net::HTTP.new(url.host, url.port);
    https.use_ssl = true
    
    request = Net::HTTP::Get.new(url)
    request["Content-Type"] = "application/x-www-form-urlencoded"
    
    response = https.request(request)
    puts response.read_body
    
    Python Request Example
    
    
    import requests
    
    url = "https://api.rebill.to/v1/getToken"
    
    payload = {}
    headers = {
      'Content-Type': 'application/x-www-form-urlencoded'
    }
    
    response = requests.request("GET", url, headers=headers, data = payload)
    
    print(response.text.encode('utf8'))
    
    PHP Request Example
    
    <?php
    
    $curl = curl_init();
    
    curl_setopt_array($curl, array(
      CURLOPT_URL => "https://api.rebill.to/v1/getToken",
      CURLOPT_RETURNTRANSFER => true,
      CURLOPT_ENCODING => "",
      CURLOPT_MAXREDIRS => 10,
      CURLOPT_TIMEOUT => 0,
      CURLOPT_FOLLOWLOCATION => true,
      CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
      CURLOPT_CUSTOMREQUEST => "GET",
      CURLOPT_HTTPHEADER => array(
        "Content-Type: application/x-www-form-urlencoded"
      ),
    ));
    
    $response = curl_exec($curl);
    
    curl_close($curl);
    echo $response;
    
    
    GO Request Example
    
    package main
    
    import (
      "fmt"
      "os"
      "path/filepath"
      "io"
      "net/http"
      "io/ioutil"
    )
    
    func main() {
    
      url := "https://api.rebill.to/v1/getToken"
      method := "GET"
    
      client := &http.Client {
      }
      req, err := http.NewRequest(method, url, nil)
    
      if err != nil {
        fmt.Println(err)
      }
      req.Header.Add("Content-Type", "application/x-www-form-urlencoded")
    
      res, err := client.Do(req)
      defer res.Body.Close()
      body, err := ioutil.ReadAll(res.Body)
    
      fmt.Println(string(body))
    }
    
    JSON Response Example
    
    {
        "success": true,
        "response": {
            "token": "eyJhbGciOiJIUzI1NiJ9.JDJhJDEwJG1FZHNyMUFNaUJXdFlQVlVUdkxaa3VFNFNwbTRwRlIyMnE1R1dYRHRuL01Ba2dEUG9ibjIu.tbxALN3ni1Db0OMX3kBkj09WUnPJxRl8T4JxLTQXgnI",
            "created": "2019-12-16T02:21:58Z",
            "expires": "2019-12-16T14:21:58Z",
            "currentTime": "2019-12-16T10:38:35Z",
            "remains": "03:43:23",
            "status": "active"
        }
    }
    

    The authentication process is through a token Bearer. In order to obtain a token, you shall use your username (email) and password. Note that the username and password shall be sent using Basic Authentication. This means that both components shall be sent in base64 format. The token has a validity of 12 hours before expiration.

    Headers

    GET https://api.rebill.to/v1/getToken

    Header Content Required Description
    Content-Type application/json Yes Can also be sent as application/x-www-form-urlencoded
    Authorization Basic base64_hash Yes Your username and password in base64.

    Response

    Attribute Content Always Present Description
    success boolean Yes Returns true if the performed action was success, otherwise false.
    response object Yes Contains an object with the result of the performed action if success. If an error ocurred, the response object will not exist. Check the error response format.

    Cards

    Get All Cards

    CURL Request Example
    
    
    Node.JS Request Example
    
    
    Ruby Request Example
    
    
    PHP Request Example
    
    
    GO Request Example
    
    
    JSON Response Example
    
    

    Some description here.

    Headers

    GET https://api.rebill.to/v1/getToken

    Header Content Required Description
    Content-Type application/json Yes Can also be sent as application/x-www-form-urlencoded
    Authorization Bearer {access_token} Yes Access token.

    Response

    Attribute Content Always Present Description
    success boolean Yes Returns true if the performed action was success, otherwise false.
    response object Yes Contains an object with an array of all the available cards in the organizations' vault.
    id integer Yes The unique card id for Internal usage at Rebill platform.
    customer_id integer Yes The unique customer id for Internal usage at Rebill platform.

    Get Cards by Customer Id

    CURL Request Example
    
    
    Node.JS Request Example
    
    
    Ruby Request Example
    
    
    PHP Request Example
    
    
    GO Request Example
    
    
    JSON Response Example
    
    

    Some description here.

    Headers

    GET https://api.rebill.to/v1/getToken

    Header Content Required Description
    Content-Type application/json Yes Can also be sent as application/x-www-form-urlencoded
    Authorization Bearer {access_token} Yes Access token.

    Parameters

    Name Parameter Type Required Description
    something QueryString boolean No Something.
    something Path Parameter boolean No Something.

    Body

    GET https://api.rebill.to/v1/getToken

    Attribute Content Required Description
    Content-Type application/json Yes Can also be sent as application/x-www-form-urlencoded
    Authorization Basic base64_hash Yes Your username and password in base64.

    Response

    Attribute Content Always Present Description
    success boolean Yes Returns true if the performed action was success, otherwise false.
    response object Yes Contains an object with the result of the performed action if success. If an error ocurred, the response object will not exist. Check the error response format.

    Get Card By Id

    CURL Request Example
    
    
    Node.JS Request Example
    
    
    Ruby Request Example
    
    
    PHP Request Example
    
    
    GO Request Example
    
    
    JSON Response Example
    
    

    Some description here.

    Headers

    GET https://api.rebill.to/v1/getToken

    Header Content Required Description
    Content-Type application/json Yes Can also be sent as application/x-www-form-urlencoded
    Authorization Bearer {access_token} Yes Access token.

    Parameters

    Name Parameter Type Required Description
    something QueryString boolean No Something.
    something Path Parameter boolean No Something.

    Body

    GET https://api.rebill.to/v1/getToken

    Attribute Content Required Description
    Content-Type application/json Yes Can also be sent as application/x-www-form-urlencoded
    Authorization Basic base64_hash Yes Your username and password in base64.

    Response

    Attribute Content Always Present Description
    success boolean Yes Returns true if the performed action was success, otherwise false.
    response object Yes Contains an object with the result of the performed action if success. If an error ocurred, the response object will not exist. Check the error response format.

    Add Card to Customer

    CURL Request Example
    
    
    Node.JS Request Example
    
    
    Ruby Request Example
    
    
    PHP Request Example
    
    
    GO Request Example
    
    
    JSON Response Example
    
    

    Some description here.

    Headers

    GET https://api.rebill.to/v1/getToken

    Header Content Required Description
    Content-Type application/json Yes Can also be sent as application/x-www-form-urlencoded
    Authorization Bearer {access_token} Yes Access token.

    Parameters

    Name Parameter Type Required Description
    something QueryString boolean No Something.
    something Path Parameter boolean No Something.

    Body

    GET https://api.rebill.to/v1/getToken

    Attribute Content Required Description
    Content-Type application/json Yes Can also be sent as application/x-www-form-urlencoded
    Authorization Basic base64_hash Yes Your username and password in base64.

    Response

    Attribute Content Always Present Description
    success boolean Yes Returns true if the performed action was success, otherwise false.
    response object Yes Contains an object with the result of the performed action if success. If an error ocurred, the response object will not exist. Check the error response format.

    Update Card

    CURL Request Example
    
    
    Node.JS Request Example
    
    
    Ruby Request Example
    
    
    PHP Request Example
    
    
    GO Request Example
    
    
    JSON Response Example
    
    

    Some description here.

    Headers

    GET https://api.rebill.to/v1/getToken

    Header Content Required Description
    Content-Type application/json Yes Can also be sent as application/x-www-form-urlencoded
    Authorization Bearer {access_token} Yes Access token.

    Parameters

    Name Parameter Type Required Description
    something QueryString boolean No Something.
    something Path Parameter boolean No Something.

    Body

    GET https://api.rebill.to/v1/getToken

    Attribute Content Required Description
    Content-Type application/json Yes Can also be sent as application/x-www-form-urlencoded
    Authorization Basic base64_hash Yes Your username and password in base64.

    Response

    Attribute Content Always Present Description
    success boolean Yes Returns true if the performed action was success, otherwise false.
    response object Yes Contains an object with the result of the performed action if success. If an error ocurred, the response object will not exist. Check the error response format.

    Delete Card

    CURL Request Example
    
    
    Node.JS Request Example
    
    
    Ruby Request Example
    
    
    PHP Request Example
    
    
    GO Request Example
    
    
    JSON Response Example
    
    

    Some description here.

    Headers

    GET https://api.rebill.to/v1/getToken

    Header Content Required Description
    Content-Type application/json Yes Can also be sent as application/x-www-form-urlencoded
    Authorization Bearer {access_token} Yes Access token.

    Parameters

    Name Parameter Type Required Description
    something QueryString boolean No Something.
    something Path Parameter boolean No Something.

    Body

    GET https://api.rebill.to/v1/getToken

    Attribute Content Required Description
    Content-Type application/json Yes Can also be sent as application/x-www-form-urlencoded
    Authorization Basic base64_hash Yes Your username and password in base64.

    Response

    Attribute Content Always Present Description
    success boolean Yes Returns true if the performed action was success, otherwise false.
    response object Yes Contains an object with the result of the performed action if success. If an error ocurred, the response object will not exist. Check the error response format.

    Customers

    A customer is each paying individual, this object is created on each successful checkout automatically.

    Get All Customers

    curl --request GET \
      --url 'https://api.rebill.to/v1/customers/all' \
      --header 'Authorization: JWT eyJhbGciOiJIUzI1NiJ9.eyJpZCI6OSwicGFzc3dvcmQiOiIkMmEkMTAkcjdGQXlFNGZicnc1MEtWTkw0elJ4ZWxjaFdlREVwSDBYaUxNeFlPLlhDODR6RGkvWk9mcUsifQ.WJ_ijzdSYqPU8XqXRlDiR2YlSVhpijIPCU6aQFGSBOM'
    
    var http = require("http");
    
    var options = {
      "method": "GET",
      "hostname": [
        "https://api.rebill.to"
      ],
      "path": [
        "v1",
        "customers",
        "all"
      ],
      "headers": {
        "Authorization": "JWT eyJhbGciOiJIUzI1NiJ9.eyJpZCI6OSwicGFzc3dvcmQiOiIkMmEkMTAkcjdGQXlFNGZicnc1MEtWTkw0elJ4ZWxjaFdlREVwSDBYaUxNeFlPLlhDODR6RGkvWk9mcUsifQ.WJ_ijzdSYqPU8XqXRlDiR2YlSVhpijIPCU6aQFGSBOM"
      }
    };
    
    var req = http.request(options, function (res) {
      var chunks = [];
    
      res.on("data", function (chunk) {
        chunks.push(chunk);
      });
    
      res.on("end", function () {
        var body = Buffer.concat(chunks);
        console.log(body.toString());
      });
    });
    
    req.end();
    
    require 'uri'
    require 'net/http'
    
    url = URI("https://api.rebill.to/v1/customers/all")
    
    http = Net::HTTP.new(url.host, url.port)
    
    request = Net::HTTP::Get.new(url)
    request["Authorization"] = 'JWT eyJhbGciOiJIUzI1NiJ9.eyJpZCI6OSwicGFzc3dvcmQiOiIkMmEkMTAkcjdGQXlFNGZicnc1MEtWTkw0elJ4ZWxjaFdlREVwSDBYaUxNeFlPLlhDODR6RGkvWk9mcUsifQ.WJ_ijzdSYqPU8XqXRlDiR2YlSVhpijIPCU6aQFGSBOM'
    
    response = http.request(request)
    puts response.read_body
    
    import requests
    
    url = "https://api.rebill.to/v1/customers/all"
    
    headers = {'Authorization': 'JWT eyJhbGciOiJIUzI1NiJ9.eyJpZCI6OSwicGFzc3dvcmQiOiIkMmEkMTAkcjdGQXlFNGZicnc1MEtWTkw0elJ4ZWxjaFdlREVwSDBYaUxNeFlPLlhDODR6RGkvWk9mcUsifQ.WJ_ijzdSYqPU8XqXRlDiR2YlSVhpijIPCU6aQFGSBOM'}
    
    response = requests.request("GET", url, headers=headers)
    
    print(response.text)
    
    <?php
    
    $curl = curl_init();
    
    curl_setopt_array($curl, array(
      CURLOPT_URL => "https://api.rebill.to/v1/customers/all",
      CURLOPT_RETURNTRANSFER => true,
      CURLOPT_ENCODING => "",
      CURLOPT_MAXREDIRS => 10,
      CURLOPT_TIMEOUT => 30,
      CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
      CURLOPT_CUSTOMREQUEST => "GET",
      CURLOPT_HTTPHEADER => array(
        "Authorization: JWT eyJhbGciOiJIUzI1NiJ9.eyJpZCI6OSwicGFzc3dvcmQiOiIkMmEkMTAkcjdGQXlFNGZicnc1MEtWTkw0elJ4ZWxjaFdlREVwSDBYaUxNeFlPLlhDODR6RGkvWk9mcUsifQ.WJ_ijzdSYqPU8XqXRlDiR2YlSVhpijIPCU6aQFGSBOM"
      ),
    ));
    
    $response = curl_exec($curl);
    $err = curl_error($curl);
    
    curl_close($curl);
    
    if ($err) {
      echo "cURL Error #:" . $err;
    } else {
      echo $response;
    }
    
    package main
    
    import (
        "fmt"
        "net/http"
        "io/ioutil"
    )
    
    func main() {
    
        url := "https://api.rebill.to/v1/customers/all"
    
        req, _ := http.NewRequest("GET", url, nil)
    
        req.Header.Add("Authorization", "JWT eyJhbGciOiJIUzI1NiJ9.eyJpZCI6OSwicGFzc3dvcmQiOiIkMmEkMTAkcjdGQXlFNGZicnc1MEtWTkw0elJ4ZWxjaFdlREVwSDBYaUxNeFlPLlhDODR6RGkvWk9mcUsifQ.WJ_ijzdSYqPU8XqXRlDiR2YlSVhpijIPCU6aQFGSBOM")
    
        res, _ := http.DefaultClient.Do(req)
    
        defer res.Body.Close()
        body, _ := ioutil.ReadAll(res.Body)
    
        fmt.Println(res)
        fmt.Println(string(body))
    
    }
    

    This endpoint retrieves all your customers.

    HTTP Request

    GET https://api.rebill.to/v1/customers/all

    Headers Content
    Authorization JWT eyJhbGciOiJIUzI1NiJ9.eyJpZCI6OSwicGFzc3dvcmQiOiIkMmEkMTAkcjdGQXlFNGZicnc1MEtWTkw0elJ4ZWxjaFdlREVwSDBYaUxNeFlPLlhDODR6RGkvWk9mcUsifQ.WJ_ijzdSYqPU8XqXRlDiR2YlSVhpijIPCU6aQFGSBOM

    Get Customer by Email

    curl --request GET \
      --url 'https://api.rebill.to/v1/customers/you@domain.com' \
      --header 'Authorization: JWT eyJhbGciOiJIUzI1NiJ9.eyJpZCI6OSwicGFzc3dvcmQiOiIkMmEkMTAkcjdGQXlFNGZicnc1MEtWTkw0elJ4ZWxjaFdlREVwSDBYaUxNeFlPLlhDODR6RGkvWk9mcUsifQ.WJ_ijzdSYqPU8XqXRlDiR2YlSVhpijIPCU6aQFGSBOM'
    
    var http = require("http");
    
    var options = {
      "method": "GET",
      "hostname": [
        "https://api.rebill.to"
      ],
      "path": [
        "v1",
        "customers",
        "you@domain.com"
      ],
      "headers": {
        "Authorization": "JWT eyJhbGciOiJIUzI1NiJ9.eyJpZCI6OSwicGFzc3dvcmQiOiIkMmEkMTAkcjdGQXlFNGZicnc1MEtWTkw0elJ4ZWxjaFdlREVwSDBYaUxNeFlPLlhDODR6RGkvWk9mcUsifQ.WJ_ijzdSYqPU8XqXRlDiR2YlSVhpijIPCU6aQFGSBOM"
      }
    };
    
    var req = http.request(options, function (res) {
      var chunks = [];
    
      res.on("data", function (chunk) {
        chunks.push(chunk);
      });
    
      res.on("end", function () {
        var body = Buffer.concat(chunks);
        console.log(body.toString());
      });
    });
    
    req.end();
    
    require 'uri'
    require 'net/http'
    
    url = URI("https://api.rebill.to/v1/customers/you@domain.com")
    
    http = Net::HTTP.new(url.host, url.port)
    
    request = Net::HTTP::Get.new(url)
    request["Authorization"] = 'JWT eyJhbGciOiJIUzI1NiJ9.eyJpZCI6OSwicGFzc3dvcmQiOiIkMmEkMTAkcjdGQXlFNGZicnc1MEtWTkw0elJ4ZWxjaFdlREVwSDBYaUxNeFlPLlhDODR6RGkvWk9mcUsifQ.WJ_ijzdSYqPU8XqXRlDiR2YlSVhpijIPCU6aQFGSBOM'
    
    response = http.request(request)
    puts response.read_body
    
    import requests
    
    url = "https://api.rebill.to/v1/customers/you@domain.com"
    
    headers = {'Authorization': 'JWT eyJhbGciOiJIUzI1NiJ9.eyJpZCI6OSwicGFzc3dvcmQiOiIkMmEkMTAkcjdGQXlFNGZicnc1MEtWTkw0elJ4ZWxjaFdlREVwSDBYaUxNeFlPLlhDODR6RGkvWk9mcUsifQ.WJ_ijzdSYqPU8XqXRlDiR2YlSVhpijIPCU6aQFGSBOM'}
    
    response = requests.request("GET", url, headers=headers)
    
    print(response.text)
    
    <?php
    
    $curl = curl_init();
    
    curl_setopt_array($curl, array(
      CURLOPT_URL => "https://api.rebill.to/v1/customers/you@domain.com",
      CURLOPT_RETURNTRANSFER => true,
      CURLOPT_ENCODING => "",
      CURLOPT_MAXREDIRS => 10,
      CURLOPT_TIMEOUT => 30,
      CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
      CURLOPT_CUSTOMREQUEST => "GET",
      CURLOPT_HTTPHEADER => array(
        "Authorization: JWT eyJhbGciOiJIUzI1NiJ9.eyJpZCI6OSwicGFzc3dvcmQiOiIkMmEkMTAkcjdGQXlFNGZicnc1MEtWTkw0elJ4ZWxjaFdlREVwSDBYaUxNeFlPLlhDODR6RGkvWk9mcUsifQ.WJ_ijzdSYqPU8XqXRlDiR2YlSVhpijIPCU6aQFGSBOM"
      ),
    ));
    
    $response = curl_exec($curl);
    $err = curl_error($curl);
    
    curl_close($curl);
    
    if ($err) {
      echo "cURL Error #:" . $err;
    } else {
      echo $response;
    }
    
    package main
    
    import (
        "fmt"
        "net/http"
        "io/ioutil"
    )
    
    func main() {
    
        url := "https://api.rebill.to/v1/customers/you@domain.com"
    
        req, _ := http.NewRequest("GET", url, nil)
    
        req.Header.Add("Authorization", "JWT eyJhbGciOiJIUzI1NiJ9.eyJpZCI6OSwicGFzc3dvcmQiOiIkMmEkMTAkcjdGQXlFNGZicnc1MEtWTkw0elJ4ZWxjaFdlREVwSDBYaUxNeFlPLlhDODR6RGkvWk9mcUsifQ.WJ_ijzdSYqPU8XqXRlDiR2YlSVhpijIPCU6aQFGSBOM")
    
        res, _ := http.DefaultClient.Do(req)
    
        defer res.Body.Close()
        body, _ := ioutil.ReadAll(res.Body)
    
        fmt.Println(res)
        fmt.Println(string(body))
    
    }
    

    This endpoint retrieves a specific Customer's Data using its email as Primary Key.

    HTTP Request

    GET https://api.rebill.to/v1/customers/:email

    Header Content
    Authorization JWT eyJhbGciOiJIUzI1NiJ9.eyJpZCI6MSwicGFzc3dvcmQiOiIkMmEkMTAkUzBCUk5TcWdBUTVDODVwa1cuSVpQZVZQeW95dWUxbDNQeko4MjVjcGRkVjMuOWxrT052ajYifQ.rD9kYRH6Q7VKYAuvxl0VL0b1JQwLMaDHArntRoVugrc

    URL Parameters

    Parameter Description
    :email you@domain.com

    New Customer

    curl --request POST \
      --url 'https://api.rebill.to/v1/customers/new' \
      --header 'Authorization: JWT eyJhbGciOiJIUzI1NiJ9.eyJpZCI6MSwicGFzc3dvcmQiOiIkMmEkMTAkUzBCUk5TcWdBUTVDODVwa1cuSVpQZVZQeW95dWUxbDNQeko4MjVjcGRkVjMuOWxrT052ajYifQ.rD9kYRH6Q7VKYAuvxl0VL0b1JQwLMaDHArntRoVugrc' \
      --header 'Content-Type: application/x-www-form-urlencoded' \
      --data 'firstName=Nahuel&lastName=Sample_client_lastName&email=nahuel%40nahuel.xyz&password=your-passw0rd&role=2&enabled=1&company_name=sample_Some%20Company&address_street=sample_address_street3&address_number=00000&address_floor=1&address_apt=A&address_city=Buenos%20Aires&address_province=Buenos%20Aires&zipcode=0000'
    
    var qs = require("querystring");
    var http = require("http");
    
    var options = {
      "method": "POST",
      "hostname": [
        "https://api.rebill.to"
      ],
      "path": [
        "v1",
        "customers",
        "new"
      ],
      "headers": {
        "Content-Type": "application/x-www-form-urlencoded",
        "Authorization": "JWT eyJhbGciOiJIUzI1NiJ9.eyJpZCI6MSwicGFzc3dvcmQiOiIkMmEkMTAkUzBCUk5TcWdBUTVDODVwa1cuSVpQZVZQeW95dWUxbDNQeko4MjVjcGRkVjMuOWxrT052ajYifQ.rD9kYRH6Q7VKYAuvxl0VL0b1JQwLMaDHArntRoVugrc"
      }
    };
    
    var req = http.request(options, function (res) {
      var chunks = [];
    
      res.on("data", function (chunk) {
        chunks.push(chunk);
      });
    
      res.on("end", function () {
        var body = Buffer.concat(chunks);
        console.log(body.toString());
      });
    });
    
    req.write(qs.stringify({ firstName: 'Nahuel',
      lastName: 'Sample_client_lastName',
      email: 'you@domain.com',
      password: 'your-passw0rd',
      role: '2',
      enabled: '1',
      company_name: 'sample_Some Company',
      address_street: 'sample_address_street3',
      address_number: '00000',
      address_floor: '1',
      address_apt: 'A',
      address_city: 'Buenos Aires',
      address_province: 'Buenos Aires',
      zipcode: '0000' }));
    req.end();
    
    require 'uri'
    require 'net/http'
    
    url = URI("https://api.rebill.to/v1/customers/new")
    
    http = Net::HTTP.new(url.host, url.port)
    
    request = Net::HTTP::Post.new(url)
    request["Content-Type"] = 'application/x-www-form-urlencoded'
    request["Authorization"] = 'JWT eyJhbGciOiJIUzI1NiJ9.eyJpZCI6MSwicGFzc3dvcmQiOiIkMmEkMTAkUzBCUk5TcWdBUTVDODVwa1cuSVpQZVZQeW95dWUxbDNQeko4MjVjcGRkVjMuOWxrT052ajYifQ.rD9kYRH6Q7VKYAuvxl0VL0b1JQwLMaDHArntRoVugrc'
    request.body = "firstName=Nahuel&lastName=Sample_client_lastName&email=nahuel%40nahuel.xyz&password=your-passw0rd&role=2&enabled=1&company_name=sample_Some%20Company&address_street=sample_address_street3&address_number=00000&address_floor=1&address_apt=A&address_city=Buenos%20Aires&address_province=Buenos%20Aires&zipcode=0000"
    
    response = http.request(request)
    puts response.read_body
    
    import requests
    
    url = "https://api.rebill.to/v1/customers/new"
    
    payload = "firstName=Nahuel&lastName=Sample_client_lastName&email=nahuel%40nahuel.xyz&password=your-passw0rd&role=2&enabled=1&company_name=sample_Some%20Company&address_street=sample_address_street3&address_number=00000&address_floor=1&address_apt=A&address_city=Buenos%20Aires&address_province=Buenos%20Aires&zipcode=0000"
    headers = {
        'Content-Type': "application/x-www-form-urlencoded",
        'Authorization': "JWT eyJhbGciOiJIUzI1NiJ9.eyJpZCI6MSwicGFzc3dvcmQiOiIkMmEkMTAkUzBCUk5TcWdBUTVDODVwa1cuSVpQZVZQeW95dWUxbDNQeko4MjVjcGRkVjMuOWxrT052ajYifQ.rD9kYRH6Q7VKYAuvxl0VL0b1JQwLMaDHArntRoVugrc"
        }
    
    response = requests.request("POST", url, data=payload, headers=headers)
    
    print(response.text)
    
    <?php
    
    $curl = curl_init();
    
    curl_setopt_array($curl, array(
      CURLOPT_URL => "https://api.rebill.to/v1/customers/new",
      CURLOPT_RETURNTRANSFER => true,
      CURLOPT_ENCODING => "",
      CURLOPT_MAXREDIRS => 10,
      CURLOPT_TIMEOUT => 30,
      CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
      CURLOPT_CUSTOMREQUEST => "POST",
      CURLOPT_POSTFIELDS => "firstName=Nahuel&lastName=Sample_client_lastName&email=nahuel%40nahuel.xyz&password=your-passw0rd&role=2&enabled=1&company_name=sample_Some%20Company&address_street=sample_address_street3&address_number=00000&address_floor=1&address_apt=A&address_city=Buenos%20Aires&address_province=Buenos%20Aires&zipcode=0000",
      CURLOPT_HTTPHEADER => array(
        "Authorization: JWT eyJhbGciOiJIUzI1NiJ9.eyJpZCI6MSwicGFzc3dvcmQiOiIkMmEkMTAkUzBCUk5TcWdBUTVDODVwa1cuSVpQZVZQeW95dWUxbDNQeko4MjVjcGRkVjMuOWxrT052ajYifQ.rD9kYRH6Q7VKYAuvxl0VL0b1JQwLMaDHArntRoVugrc",
        "Content-Type: application/x-www-form-urlencoded"
      ),
    ));
    
    $response = curl_exec($curl);
    $err = curl_error($curl);
    
    curl_close($curl);
    
    if ($err) {
      echo "cURL Error #:" . $err;
    } else {
      echo $response;
    }
    
    package main
    
    import (
        "fmt"
        "strings"
        "net/http"
        "io/ioutil"
    )
    
    func main() {
    
        url := "https://api.rebill.to/v1/customers/new"
    
        payload := strings.NewReader("firstName=Nahuel&lastName=Sample_client_lastName&email=nahuel%40nahuel.xyz&password=your-passw0rd&role=2&enabled=1&company_name=sample_Some%20Company&address_street=sample_address_street3&address_number=00000&address_floor=1&address_apt=A&address_city=Buenos%20Aires&address_province=Buenos%20Aires&zipcode=0000")
    
        req, _ := http.NewRequest("POST", url, payload)
    
        req.Header.Add("Content-Type", "application/x-www-form-urlencoded")
        req.Header.Add("Authorization", "JWT eyJhbGciOiJIUzI1NiJ9.eyJpZCI6MSwicGFzc3dvcmQiOiIkMmEkMTAkUzBCUk5TcWdBUTVDODVwa1cuSVpQZVZQeW95dWUxbDNQeko4MjVjcGRkVjMuOWxrT052ajYifQ.rD9kYRH6Q7VKYAuvxl0VL0b1JQwLMaDHArntRoVugrc")
    
        res, _ := http.DefaultClient.Do(req)
    
        defer res.Body.Close()
        body, _ := ioutil.ReadAll(res.Body)
    
        fmt.Println(res)
        fmt.Println(string(body))
    
    }
    

    This endpoint creates or updates a customer using its email as Primary Key.

    HTTP Request

    POST https://api.rebill.to/v1/customers/new/

    Header Content
    Content-Type application/x-www-form-urlencoded
    Authorization JWT eyJhbGciOiJIUzI1NiJ9.eyJpZCI6MSwicGFzc3dvcmQiOiIkMmEkMTAkUzBCUk5TcWdBUTVDODVwa1cuSVpQZVZQeW95dWUxbDNQeko4MjVjcGRkVjMuOWxrT052ajYifQ.rD9kYRH6Q7VKYAuvxl0VL0b1JQwLMaDHArntRoVugrc

    BODY Parameters

    Parameter Description
    firstName Nahuel
    lastName Sample_client_lastName
    email you@domain.com
    password your-passw0rd
    enabled 1
    company_name sample_Some Company
    address_street sample_address_street3
    address_number 00000
    address_floor 1
    address_apt A
    address_city Buenos Aires
    address_province Buenos Aires
    zipcode 0000

    Update a Customer

    curl --request POST \
      --url 'https://api.rebill.to/v1/customers/update' \
      --header 'Authorization: JWT eyJhbGciOiJIUzI1NiJ9.eyJpZCI6MTYsInBhc3N3b3JkIjoiJDJhJDEwJFMwQlJOU3FnQVE1Qzg1cGtXLklaUGVWUHlveXVlMWwzUHpKODI1Y3BkZFYzLjlsa09Odmo2In0.qUMvsLxxt3reYBcvpTJkWWyenBXOGSUXO1AG3MxBttI' \
      --header 'Content-Type: application/x-www-form-urlencoded' \
      --data 'id=24&firstName=Test&lastName=changed1&email=sample_email3%40domain.com&password=your-passw0rd&role=1&enabled=1&company_name=Changed&address_street=Changed&address_number=00001Changed&address_floor=1Changed&address_apt=AChanged&address_city=Buenos%20AiresChanged&address_province=Buenos%20AiresChanged&zipcode=0000Changed'
    
    var qs = require("querystring");
    var http = require("http");
    
    var options = {
      "method": "POST",
      "hostname": [
        "https://api.rebill.to"
      ],
      "path": [
        "v1",
        "customers",
        "update"
      ],
      "headers": {
        "Content-Type": "application/x-www-form-urlencoded",
        "Authorization": "JWT eyJhbGciOiJIUzI1NiJ9.eyJpZCI6MSwicGFzc3dvcmQiOiIkMmEkMTAkUzBCUk5TcWdBUTVDODVwa1cuSVpQZVZQeW95dWUxbDNQeko4MjVjcGRkVjMuOWxrT052ajYifQ.rD9kYRH6Q7VKYAuvxl0VL0b1JQwLMaDHArntRoVugrc"
      }
    };
    
    var req = http.request(options, function (res) {
      var chunks = [];
    
      res.on("data", function (chunk) {
        chunks.push(chunk);
      });
    
      res.on("end", function () {
        var body = Buffer.concat(chunks);
        console.log(body.toString());
      });
    });
    
    req.write(qs.stringify({ firstName: 'Nahuel',
      lastName: 'Sample_client_lastName',
      email: 'you@domain.com',
      password: 'your-passw0rd',
      role: '2',
      enabled: '1',
      company_name: 'sample_Some Company',
      address_street: 'sample_address_street3',
      address_number: '00000',
      address_floor: '1',
      address_apt: 'A',
      address_city: 'Buenos Aires',
      address_province: 'Buenos Aires',
      zipcode: '0000' }));
    req.end();
    
    require 'uri'
    require 'net/http'
    
    url = URI("https://api.rebill.to/v1/customers/update")
    
    http = Net::HTTP.new(url.host, url.port)
    
    request = Net::HTTP::Post.new(url)
    request["Authorization"] = 'JWT eyJhbGciOiJIUzI1NiJ9.eyJpZCI6MTYsInBhc3N3b3JkIjoiJDJhJDEwJFMwQlJOU3FnQVE1Qzg1cGtXLklaUGVWUHlveXVlMWwzUHpKODI1Y3BkZFYzLjlsa09Odmo2In0.qUMvsLxxt3reYBcvpTJkWWyenBXOGSUXO1AG3MxBttI'
    request["Content-Type"] = 'application/x-www-form-urlencoded'
    request.body = "id=24&firstName=Test&lastName=changed1&email=sample_email3%40domain.com&password=your-passw0rd&role=1&enabled=1&company_name=Changed&address_street=Changed&address_number=00001Changed&address_floor=1Changed&address_apt=AChanged&address_city=Buenos%20AiresChanged&address_province=Buenos%20AiresChanged&zipcode=0000Changed"
    
    response = http.request(request)
    puts response.read_body
    
    import requests
    
    url = "https://api.rebill.to/v1/customers/update"
    
    payload = "id=24&firstName=Test&lastName=changed1&email=sample_email3%40domain.com&password=your-passw0rd&role=1&enabled=1&company_name=Changed&address_street=Changed&address_number=00001Changed&address_floor=1Changed&address_apt=AChanged&address_city=Buenos%20AiresChanged&address_province=Buenos%20AiresChanged&zipcode=0000Changed"
    headers = {
        'Authorization': "JWT eyJhbGciOiJIUzI1NiJ9.eyJpZCI6MTYsInBhc3N3b3JkIjoiJDJhJDEwJFMwQlJOU3FnQVE1Qzg1cGtXLklaUGVWUHlveXVlMWwzUHpKODI1Y3BkZFYzLjlsa09Odmo2In0.qUMvsLxxt3reYBcvpTJkWWyenBXOGSUXO1AG3MxBttI",
        'Content-Type': "application/x-www-form-urlencoded"
        }
    
    response = requests.request("POST", url, data=payload, headers=headers)
    
    print(response.text)
    
    <?php
    
    $curl = curl_init();
    
    curl_setopt_array($curl, array(
      CURLOPT_URL => "https://api.rebill.to/v1/customers/update",
      CURLOPT_RETURNTRANSFER => true,
      CURLOPT_ENCODING => "",
      CURLOPT_MAXREDIRS => 10,
      CURLOPT_TIMEOUT => 30,
      CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
      CURLOPT_CUSTOMREQUEST => "POST",
      CURLOPT_POSTFIELDS => "id=24&firstName=Test&lastName=changed1&email=sample_email3%40domain.com&password=your-passw0rd&role=1&enabled=1&company_name=Changed&address_street=Changed&address_number=00001Changed&address_floor=1Changed&address_apt=AChanged&address_city=Buenos%20AiresChanged&address_province=Buenos%20AiresChanged&zipcode=0000Changed",
      CURLOPT_HTTPHEADER => array(
        "Authorization: JWT eyJhbGciOiJIUzI1NiJ9.eyJpZCI6MTYsInBhc3N3b3JkIjoiJDJhJDEwJFMwQlJOU3FnQVE1Qzg1cGtXLklaUGVWUHlveXVlMWwzUHpKODI1Y3BkZFYzLjlsa09Odmo2In0.qUMvsLxxt3reYBcvpTJkWWyenBXOGSUXO1AG3MxBttI",
        "Content-Type: application/x-www-form-urlencoded"
      ),
    ));
    
    $response = curl_exec($curl);
    $err = curl_error($curl);
    
    curl_close($curl);
    
    if ($err) {
      echo "cURL Error #:" . $err;
    } else {
      echo $response;
    }
    
    package main
    
    import (
        "fmt"
        "strings"
        "net/http"
        "io/ioutil"
    )
    
    func main() {
    
        url := "https://api.rebill.to/v1/customers/update"
    
        payload := strings.NewReader("id=24&firstName=Test&lastName=changed1&email=sample_email3%40domain.com&password=your-passw0rd&role=1&enabled=1&company_name=Changed&address_street=Changed&address_number=00001Changed&address_floor=1Changed&address_apt=AChanged&address_city=Buenos%20AiresChanged&address_province=Buenos%20AiresChanged&zipcode=0000Changed")
    
        req, _ := http.NewRequest("POST", url, payload)
    
        req.Header.Add("Authorization", "JWT eyJhbGciOiJIUzI1NiJ9.eyJpZCI6MTYsInBhc3N3b3JkIjoiJDJhJDEwJFMwQlJOU3FnQVE1Qzg1cGtXLklaUGVWUHlveXVlMWwzUHpKODI1Y3BkZFYzLjlsa09Odmo2In0.qUMvsLxxt3reYBcvpTJkWWyenBXOGSUXO1AG3MxBttI")
        req.Header.Add("Content-Type", "application/x-www-form-urlencoded")
    
        res, _ := http.DefaultClient.Do(req)
    
        defer res.Body.Close()
        body, _ := ioutil.ReadAll(res.Body)
    
        fmt.Println(res)
        fmt.Println(string(body))
    
    }
    

    This endpoint creates or updates a customer using its email as Primary Key.

    HTTP Request

    POST https://api.rebill.to/v1/customers/update/

    Header Content
    Content-Type application/x-www-form-urlencoded
    Authorization JWT eyJhbGciOiJIUzI1NiJ9.eyJpZCI6MSwicGFzc3dvcmQiOiIkMmEkMTAkUzBCUk5TcWdBUTVDODVwa1cuSVpQZVZQeW95dWUxbDNQeko4MjVjcGRkVjMuOWxrT052ajYifQ.rD9kYRH6Q7VKYAuvxl0VL0b1JQwLMaDHArntRoVugrc

    BODY Parameters

    Parameter Description
    firstName Nahuel
    lastName Sample_client_lastName
    email you@domain.com
    password your-passw0rd
    enabled 1
    company_name sample_Some Company
    address_street sample_address_street3
    address_number 00000
    address_floor 1
    address_apt A
    address_city Buenos Aires
    address_province Buenos Aires
    zipcode 0000

    Delete a Customer

    curl --request DELETE \
      --url 'https://api.rebill.to/v1/customers/delete/you@domain.com' \
      --header 'Authorization: JWT eyJhbGciOiJIUzI1NiJ9.eyJpZCI6OSwicGFzc3dvcmQiOiIkMmEkMTAkcjdGQXlFNGZicnc1MEtWTkw0elJ4ZWxjaFdlREVwSDBYaUxNeFlPLlhDODR6RGkvWk9mcUsifQ.WJ_ijzdSYqPU8XqXRlDiR2YlSVhpijIPCU6aQFGSBOM' \
      --header 'Content-Type: application/json'
    
    var http = require("http");
    
    var options = {
      "method": "DELETE",
      "hostname": [
        "https://api.rebill.to"
      ],
      "path": [
        "v1",
        "customers",
        "delete",
        "you@domain.com"
      ],
      "headers": {
        "Content-Type": "application/json",
        "Authorization": "JWT eyJhbGciOiJIUzI1NiJ9.eyJpZCI6OSwicGFzc3dvcmQiOiIkMmEkMTAkcjdGQXlFNGZicnc1MEtWTkw0elJ4ZWxjaFdlREVwSDBYaUxNeFlPLlhDODR6RGkvWk9mcUsifQ.WJ_ijzdSYqPU8XqXRlDiR2YlSVhpijIPCU6aQFGSBOM"
      }
    };
    
    var req = http.request(options, function (res) {
      var chunks = [];
    
      res.on("data", function (chunk) {
        chunks.push(chunk);
      });
    
      res.on("end", function () {
        var body = Buffer.concat(chunks);
        console.log(body.toString());
      });
    });
    
    req.end();
    
    require 'uri'
    require 'net/http'
    
    url = URI("https://api.rebill.to/v1/customers/delete/you@domain.com")
    
    http = Net::HTTP.new(url.host, url.port)
    
    request = Net::HTTP::Delete.new(url)
    request["Content-Type"] = 'application/json'
    request["Authorization"] = 'JWT eyJhbGciOiJIUzI1NiJ9.eyJpZCI6OSwicGFzc3dvcmQiOiIkMmEkMTAkcjdGQXlFNGZicnc1MEtWTkw0elJ4ZWxjaFdlREVwSDBYaUxNeFlPLlhDODR6RGkvWk9mcUsifQ.WJ_ijzdSYqPU8XqXRlDiR2YlSVhpijIPCU6aQFGSBOM'
    
    response = http.request(request)
    puts response.read_body
    
    import requests
    
    url = "https://api.rebill.to/v1/customers/delete/you@domain.com"
    
    headers = {
        'Content-Type': "application/json",
        'Authorization': "JWT eyJhbGciOiJIUzI1NiJ9.eyJpZCI6OSwicGFzc3dvcmQiOiIkMmEkMTAkcjdGQXlFNGZicnc1MEtWTkw0elJ4ZWxjaFdlREVwSDBYaUxNeFlPLlhDODR6RGkvWk9mcUsifQ.WJ_ijzdSYqPU8XqXRlDiR2YlSVhpijIPCU6aQFGSBOM"
        }
    
    response = requests.request("DELETE", url, headers=headers)
    
    print(response.text)
    
    <?php
    
    $curl = curl_init();
    
    curl_setopt_array($curl, array(
      CURLOPT_URL => "https://api.rebill.to/v1/customers/delete/you@domain.com",
      CURLOPT_RETURNTRANSFER => true,
      CURLOPT_ENCODING => "",
      CURLOPT_MAXREDIRS => 10,
      CURLOPT_TIMEOUT => 30,
      CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
      CURLOPT_CUSTOMREQUEST => "DELETE",
      CURLOPT_HTTPHEADER => array(
        "Authorization: JWT eyJhbGciOiJIUzI1NiJ9.eyJpZCI6OSwicGFzc3dvcmQiOiIkMmEkMTAkcjdGQXlFNGZicnc1MEtWTkw0elJ4ZWxjaFdlREVwSDBYaUxNeFlPLlhDODR6RGkvWk9mcUsifQ.WJ_ijzdSYqPU8XqXRlDiR2YlSVhpijIPCU6aQFGSBOM",
        "Content-Type: application/json"
      ),
    ));
    
    $response = curl_exec($curl);
    $err = curl_error($curl);
    
    curl_close($curl);
    
    if ($err) {
      echo "cURL Error #:" . $err;
    } else {
      echo $response;
    }
    
    package main
    
    import (
        "fmt"
        "net/http"
        "io/ioutil"
    )
    
    func main() {
    
        url := "https://api.rebill.to/v1/customers/delete/you@domain.com"
    
        req, _ := http.NewRequest("DELETE", url, nil)
    
        req.Header.Add("Content-Type", "application/json")
        req.Header.Add("Authorization", "JWT eyJhbGciOiJIUzI1NiJ9.eyJpZCI6OSwicGFzc3dvcmQiOiIkMmEkMTAkcjdGQXlFNGZicnc1MEtWTkw0elJ4ZWxjaFdlREVwSDBYaUxNeFlPLlhDODR6RGkvWk9mcUsifQ.WJ_ijzdSYqPU8XqXRlDiR2YlSVhpijIPCU6aQFGSBOM")
    
        res, _ := http.DefaultClient.Do(req)
    
        defer res.Body.Close()
        body, _ := ioutil.ReadAll(res.Body)
    
        fmt.Println(res)
        fmt.Println(string(body))
    
    }
    

    This endpoint deletes a Customer, using its email as Primary Key. Only administrators can delete a customer.

    HTTP Request

    DELETE https://api.rebill.to/v1/customers/delete/:email

    Header Content
    Content-Type application/json
    Authorization JWT eyJhbGciOiJIUzI1NiJ9.eyJpZCI6OSwicGFzc3dvcmQiOiIkMmEkMTAkcjdGQXlFNGZicnc1MEtWTkw0elJ4ZWxjaFdlREVwSDBYaUxNeFlPLlhDODR6RGkvWk9mcUsifQ.WJ_ijzdSYqPU8XqXRlDiR2YlSVhpijIPCU6aQFGSBOM

    URL Parameters

    Parameter Description
    :email Email of the customer to delete.

    Authorizations

    Each user is attached to a Role, and a Role is defined by its permissions. Each endpoint has a one-to-one relation to a permission id and description.

    In order to enable a user to access a set of permissions, it shall be related to a Role ID. For adding more than one permission to a Role, use the role/permissions endpoints.

    Note that this feature is for Administrators only.

    Get All Roles

    curl --request GET \
      --url 'https://api.rebill.to/v1/roles/all' \
      --header 'Authorization: JWT eyJhbGciOiJIUzI1NiJ9.eyJpZCI6MSwicGFzc3dvcmQiOiIkMmEkMTAkRGJXY2FtMW9HcEVhZUtHemt0NE5iZW5JUVM5dkMwRXVtaWlxc2J4ejFmek84ekFSNW1WUW0ifQ.DD1Wk4qBmEL1xOu8CaJv4WzJLcNPR-OqCZ6jg114P78'
    
    var http = require("http");
    
    var options = {
      "method": "GET",
      "hostname": [
        "https://api.rebill.to"
      ],
      "path": [
        "v1",
        "roles",
        "all"
      ],
      "headers": {
        "Authorization": "JWT eyJhbGciOiJIUzI1NiJ9.eyJpZCI6MSwicGFzc3dvcmQiOiIkMmEkMTAkRGJXY2FtMW9HcEVhZUtHemt0NE5iZW5JUVM5dkMwRXVtaWlxc2J4ejFmek84ekFSNW1WUW0ifQ.DD1Wk4qBmEL1xOu8CaJv4WzJLcNPR-OqCZ6jg114P78"
      }
    };
    
    var req = http.request(options, function (res) {
      var chunks = [];
    
      res.on("data", function (chunk) {
        chunks.push(chunk);
      });
    
      res.on("end", function () {
        var body = Buffer.concat(chunks);
        console.log(body.toString());
      });
    });
    
    req.end();
    
    require 'uri'
    require 'net/http'
    
    url = URI("https://api.rebill.to/v1/roles/all")
    
    http = Net::HTTP.new(url.host, url.port)
    
    request = Net::HTTP::Get.new(url)
    request["Authorization"] = 'JWT eyJhbGciOiJIUzI1NiJ9.eyJpZCI6MSwicGFzc3dvcmQiOiIkMmEkMTAkRGJXY2FtMW9HcEVhZUtHemt0NE5iZW5JUVM5dkMwRXVtaWlxc2J4ejFmek84ekFSNW1WUW0ifQ.DD1Wk4qBmEL1xOu8CaJv4WzJLcNPR-OqCZ6jg114P78'
    
    response = http.request(request)
    puts response.read_body
    
    import requests
    
    url = "https://api.rebill.to/v1/roles/all"
    
    headers = {'Authorization': 'JWT eyJhbGciOiJIUzI1NiJ9.eyJpZCI6MSwicGFzc3dvcmQiOiIkMmEkMTAkRGJXY2FtMW9HcEVhZUtHemt0NE5iZW5JUVM5dkMwRXVtaWlxc2J4ejFmek84ekFSNW1WUW0ifQ.DD1Wk4qBmEL1xOu8CaJv4WzJLcNPR-OqCZ6jg114P78'}
    
    response = requests.request("GET", url, headers=headers)
    
    print(response.text)
    
    <?php
    
    $curl = curl_init();
    
    curl_setopt_array($curl, array(
      CURLOPT_URL => "https://api.rebill.to/v1/roles/all",
      CURLOPT_RETURNTRANSFER => true,
      CURLOPT_ENCODING => "",
      CURLOPT_MAXREDIRS => 10,
      CURLOPT_TIMEOUT => 30,
      CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
      CURLOPT_CUSTOMREQUEST => "GET",
      CURLOPT_HTTPHEADER => array(
        "Authorization: JWT eyJhbGciOiJIUzI1NiJ9.eyJpZCI6MSwicGFzc3dvcmQiOiIkMmEkMTAkRGJXY2FtMW9HcEVhZUtHemt0NE5iZW5JUVM5dkMwRXVtaWlxc2J4ejFmek84ekFSNW1WUW0ifQ.DD1Wk4qBmEL1xOu8CaJv4WzJLcNPR-OqCZ6jg114P78"
      ),
    ));
    
    $response = curl_exec($curl);
    $err = curl_error($curl);
    
    curl_close($curl);
    
    if ($err) {
      echo "cURL Error #:" . $err;
    } else {
      echo $response;
    }
    
    package main
    
    import (
        "fmt"
        "net/http"
        "io/ioutil"
    )
    
    func main() {
    
        url := "https://api.rebill.to/v1/roles/all"
    
        req, _ := http.NewRequest("GET", url, nil)
    
        req.Header.Add("Authorization", "JWT eyJhbGciOiJIUzI1NiJ9.eyJpZCI6MSwicGFzc3dvcmQiOiIkMmEkMTAkRGJXY2FtMW9HcEVhZUtHemt0NE5iZW5JUVM5dkMwRXVtaWlxc2J4ejFmek84ekFSNW1WUW0ifQ.DD1Wk4qBmEL1xOu8CaJv4WzJLcNPR-OqCZ6jg114P78")
    
        res, _ := http.DefaultClient.Do(req)
    
        defer res.Body.Close()
        body, _ := ioutil.ReadAll(res.Body)
    
        fmt.Println(res)
        fmt.Println(string(body))
    
    }
    
    //JSON Sample Response
    {
        "response": [
            {
                "id": 1,
                "name": "Administrador",
                "description": null,
                "updatedAt": null,
                "createdAt": null
            },
            {
                "id": 2,
                "name": "Productor",
                "description": null,
                "updatedAt": null,
                "createdAt": null
            }
        ]
    }
    

    HTTP Request

    GET https://api.rebill.to/v1/roles/all

    Header Content
    Authorization JWT eyJhbGciOiJIUzI1NiJ9.eyJpZCI6OSwicGFzc3dvcmQiOiIkMmEkMTAkcjdGQXlFNGZicnc1MEtWTkw0elJ4ZWxjaFdlREVwSDBYaUxNeFlPLlhDODR6RGkvWk9mcUsifQ.WJ_ijzdSYqPU8XqXRlDiR2YlSVhpijIPCU6aQFGSBOM
    Content-type application/json

    Body Parameters

    Parameter Description
    name Name of the new role.
    description Description of the new role.

    Get All Role Permissions

    curl --request GET \
      --url 'https://api.rebill.to/v1/roles/permissions' \
      --header 'Authorization: JWT eyJhbGciOiJIUzI1NiJ9.eyJpZCI6MSwicGFzc3dvcmQiOiIkMmEkMTAkRGJXY2FtMW9HcEVhZUtHemt0NE5iZW5JUVM5dkMwRXVtaWlxc2J4ejFmek84ekFSNW1WUW0ifQ.DD1Wk4qBmEL1xOu8CaJv4WzJLcNPR-OqCZ6jg114P78'
    
    var http = require("http");
    
    var options = {
      "method": "GET",
      "hostname": [
        "https://api.rebill.to"
      ],
      "path": [
        "v1",
        "roles",
        "permissions"
      ],
      "headers": {
        "Authorization": "JWT eyJhbGciOiJIUzI1NiJ9.eyJpZCI6MSwicGFzc3dvcmQiOiIkMmEkMTAkRGJXY2FtMW9HcEVhZUtHemt0NE5iZW5JUVM5dkMwRXVtaWlxc2J4ejFmek84ekFSNW1WUW0ifQ.DD1Wk4qBmEL1xOu8CaJv4WzJLcNPR-OqCZ6jg114P78"
      }
    };
    
    var req = http.request(options, function (res) {
      var chunks = [];
    
      res.on("data", function (chunk) {
        chunks.push(chunk);
      });
    
      res.on("end", function () {
        var body = Buffer.concat(chunks);
        console.log(body.toString());
      });
    });
    
    req.end();
    
    require 'uri'
    require 'net/http'
    
    url = URI("https://api.rebill.to/v1/roles/permissions")
    
    http = Net::HTTP.new(url.host, url.port)
    
    request = Net::HTTP::Get.new(url)
    request["Authorization"] = 'JWT eyJhbGciOiJIUzI1NiJ9.eyJpZCI6MSwicGFzc3dvcmQiOiIkMmEkMTAkRGJXY2FtMW9HcEVhZUtHemt0NE5iZW5JUVM5dkMwRXVtaWlxc2J4ejFmek84ekFSNW1WUW0ifQ.DD1Wk4qBmEL1xOu8CaJv4WzJLcNPR-OqCZ6jg114P78'
    
    response = http.request(request)
    puts response.read_body
    
    import requests
    
    url = "https://api.rebill.to/v1/roles/permissions"
    
    headers = {'Authorization': 'JWT eyJhbGciOiJIUzI1NiJ9.eyJpZCI6MSwicGFzc3dvcmQiOiIkMmEkMTAkRGJXY2FtMW9HcEVhZUtHemt0NE5iZW5JUVM5dkMwRXVtaWlxc2J4ejFmek84ekFSNW1WUW0ifQ.DD1Wk4qBmEL1xOu8CaJv4WzJLcNPR-OqCZ6jg114P78'}
    
    response = requests.request("GET", url, headers=headers)
    
    print(response.text)
    
    <?php
    
    $curl = curl_init();
    
    curl_setopt_array($curl, array(
      CURLOPT_URL => "https://api.rebill.to/v1/roles/permissions",
      CURLOPT_RETURNTRANSFER => true,
      CURLOPT_ENCODING => "",
      CURLOPT_MAXREDIRS => 10,
      CURLOPT_TIMEOUT => 30,
      CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
      CURLOPT_CUSTOMREQUEST => "GET",
      CURLOPT_HTTPHEADER => array(
        "Authorization: JWT eyJhbGciOiJIUzI1NiJ9.eyJpZCI6MSwicGFzc3dvcmQiOiIkMmEkMTAkRGJXY2FtMW9HcEVhZUtHemt0NE5iZW5JUVM5dkMwRXVtaWlxc2J4ejFmek84ekFSNW1WUW0ifQ.DD1Wk4qBmEL1xOu8CaJv4WzJLcNPR-OqCZ6jg114P78"
      ),
    ));
    
    $response = curl_exec($curl);
    $err = curl_error($curl);
    
    curl_close($curl);
    
    if ($err) {
      echo "cURL Error #:" . $err;
    } else {
      echo $response;
    }
    
    package main
    
    import (
        "fmt"
        "net/http"
        "io/ioutil"
    )
    
    func main() {
    
        url := "https://api.rebill.to/v1/roles/permissions"
    
        req, _ := http.NewRequest("GET", url, nil)
    
        req.Header.Add("Authorization", "JWT eyJhbGciOiJIUzI1NiJ9.eyJpZCI6MSwicGFzc3dvcmQiOiIkMmEkMTAkRGJXY2FtMW9HcEVhZUtHemt0NE5iZW5JUVM5dkMwRXVtaWlxc2J4ejFmek84ekFSNW1WUW0ifQ.DD1Wk4qBmEL1xOu8CaJv4WzJLcNPR-OqCZ6jg114P78")
    
        res, _ := http.DefaultClient.Do(req)
    
        defer res.Body.Close()
        body, _ := ioutil.ReadAll(res.Body)
    
        fmt.Println(res)
        fmt.Println(string(body))
    
    }
    
    //JSON Sample Response
    {
        "response": [
            {
                "id": 1,
                "name": "VIEW_MY_COMPANIES"
            },
            {
                "id": 2,
                "name": "VIEW_ALL_COMPANIES"
            }
        ]
    }
    

    HTTP Request

    GET https://api.rebill.to/v1/roles/permissions

    Header Content
    Authorization JWT eyJhbGciOiJIUzI1NiJ9.eyJpZCI6OSwicGFzc3dvcmQiOiIkMmEkMTAkcjdGQXlFNGZicnc1MEtWTkw0elJ4ZWxjaFdlREVwSDBYaUxNeFlPLlhDODR6RGkvWk9mcUsifQ.WJ_ijzdSYqPU8XqXRlDiR2YlSVhpijIPCU6aQFGSBOM
    Content-type application/json

    URL Parameters

    Parameter Description
    :type Retrieve the Plan by planID or mpPlanID.
    :id ID of the Plan to Retrieve.

    Get Permissions by Role ID

    curl --request GET \
      --url 'https://api.rebill.to/v1/roles/1' \
      --header 'Authorization: JWT eyJhbGciOiJIUzI1NiJ9.eyJpZCI6MSwicGFzc3dvcmQiOiIkMmEkMTAkRGJXY2FtMW9HcEVhZUtHemt0NE5iZW5JUVM5dkMwRXVtaWlxc2J4ejFmek84ekFSNW1WUW0ifQ.DD1Wk4qBmEL1xOu8CaJv4WzJLcNPR-OqCZ6jg114P78'
    
    var http = require("http");
    
    var options = {
      "method": "GET",
      "hostname": [
        "https://api.rebill.to"
      ],
      "path": [
        "v1",
        "roles",
        "1"
      ],
      "headers": {
        "Authorization": "JWT eyJhbGciOiJIUzI1NiJ9.eyJpZCI6MSwicGFzc3dvcmQiOiIkMmEkMTAkRGJXY2FtMW9HcEVhZUtHemt0NE5iZW5JUVM5dkMwRXVtaWlxc2J4ejFmek84ekFSNW1WUW0ifQ.DD1Wk4qBmEL1xOu8CaJv4WzJLcNPR-OqCZ6jg114P78"
      }
    };
    
    var req = http.request(options, function (res) {
      var chunks = [];
    
      res.on("data", function (chunk) {
        chunks.push(chunk);
      });
    
      res.on("end", function () {
        var body = Buffer.concat(chunks);
        console.log(body.toString());
      });
    });
    
    req.end();
    
    require 'uri'
    require 'net/http'
    
    url = URI("https://api.rebill.to/v1/roles/1")
    
    http = Net::HTTP.new(url.host, url.port)
    
    request = Net::HTTP::Get.new(url)
    request["Authorization"] = 'JWT eyJhbGciOiJIUzI1NiJ9.eyJpZCI6MSwicGFzc3dvcmQiOiIkMmEkMTAkRGJXY2FtMW9HcEVhZUtHemt0NE5iZW5JUVM5dkMwRXVtaWlxc2J4ejFmek84ekFSNW1WUW0ifQ.DD1Wk4qBmEL1xOu8CaJv4WzJLcNPR-OqCZ6jg114P78'
    
    response = http.request(request)
    puts response.read_body
    
    import requests
    
    url = "https://api.rebill.to/v1/roles/1"
    
    headers = {'Authorization': 'JWT eyJhbGciOiJIUzI1NiJ9.eyJpZCI6MSwicGFzc3dvcmQiOiIkMmEkMTAkRGJXY2FtMW9HcEVhZUtHemt0NE5iZW5JUVM5dkMwRXVtaWlxc2J4ejFmek84ekFSNW1WUW0ifQ.DD1Wk4qBmEL1xOu8CaJv4WzJLcNPR-OqCZ6jg114P78'}
    
    response = requests.request("GET", url, headers=headers)
    
    print(response.text)
    
    <?php
    
    $curl = curl_init();
    
    curl_setopt_array($curl, array(
      CURLOPT_URL => "https://api.rebill.to/v1/roles/1",
      CURLOPT_RETURNTRANSFER => true,
      CURLOPT_ENCODING => "",
      CURLOPT_MAXREDIRS => 10,
      CURLOPT_TIMEOUT => 30,
      CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
      CURLOPT_CUSTOMREQUEST => "GET",
      CURLOPT_HTTPHEADER => array(
        "Authorization: JWT eyJhbGciOiJIUzI1NiJ9.eyJpZCI6MSwicGFzc3dvcmQiOiIkMmEkMTAkRGJXY2FtMW9HcEVhZUtHemt0NE5iZW5JUVM5dkMwRXVtaWlxc2J4ejFmek84ekFSNW1WUW0ifQ.DD1Wk4qBmEL1xOu8CaJv4WzJLcNPR-OqCZ6jg114P78"
      ),
    ));
    
    $response = curl_exec($curl);
    $err = curl_error($curl);
    
    curl_close($curl);
    
    if ($err) {
      echo "cURL Error #:" . $err;
    } else {
      echo $response;
    }
    
    package main
    
    import (
        "fmt"
        "net/http"
        "io/ioutil"
    )
    
    func main() {
    
        url := "https://api.rebill.to/v1/roles/1"
    
        req, _ := http.NewRequest("GET", url, nil)
    
        req.Header.Add("Authorization", "JWT eyJhbGciOiJIUzI1NiJ9.eyJpZCI6MSwicGFzc3dvcmQiOiIkMmEkMTAkRGJXY2FtMW9HcEVhZUtHemt0NE5iZW5JUVM5dkMwRXVtaWlxc2J4ejFmek84ekFSNW1WUW0ifQ.DD1Wk4qBmEL1xOu8CaJv4WzJLcNPR-OqCZ6jg114P78")
    
        res, _ := http.DefaultClient.Do(req)
    
        defer res.Body.Close()
        body, _ := ioutil.ReadAll(res.Body)
    
        fmt.Println(res)
        fmt.Println(string(body))
    
    }
    

    HTTP Request

    GET https://api.rebill.to/v1/roles/:id

    Header Content
    Authorization JWT eyJhbGciOiJIUzI1NiJ9.eyJpZCI6OSwicGFzc3dvcmQiOiIkMmEkMTAkcjdGQXlFNGZicnc1MEtWTkw0elJ4ZWxjaFdlREVwSDBYaUxNeFlPLlhDODR6RGkvWk9mcUsifQ.WJ_ijzdSYqPU8XqXRlDiR2YlSVhpijIPCU6aQFGSBOM
    Content-type application/json

    URL Parameters

    Parameter Description
    :type Retrieve the Plan by planID or mpPlanID.
    :id ID of the Plan to Retrieve.

    New Role

    curl --request PUT \
      --url 'https://api.rebill.to/v1/roles/new' \
      --header 'Authorization: JWT eyJhbGciOiJIUzI1NiJ9.eyJpZCI6MSwicGFzc3dvcmQiOiIkMmEkMTAkRGJXY2FtMW9HcEVhZUtHemt0NE5iZW5JUVM5dkMwRXVtaWlxc2J4ejFmek84ekFSNW1WUW0ifQ.DD1Wk4qBmEL1xOu8CaJv4WzJLcNPR-OqCZ6jg114P78' \
      --header 'Content-Type: application/x-www-form-urlencoded' \
      --data 'name=test&description=descriptiontest'
    
    var qs = require("querystring");
    var http = require("http");
    
    var options = {
      "method": "PUT",
      "hostname": [
        "https://api.rebill.to"
      ],
      "path": [
        "v1",
        "roles",
        "new"
      ],
      "headers": {
        "Content-Type": "application/x-www-form-urlencoded",
        "Authorization": "JWT eyJhbGciOiJIUzI1NiJ9.eyJpZCI6MSwicGFzc3dvcmQiOiIkMmEkMTAkRGJXY2FtMW9HcEVhZUtHemt0NE5iZW5JUVM5dkMwRXVtaWlxc2J4ejFmek84ekFSNW1WUW0ifQ.DD1Wk4qBmEL1xOu8CaJv4WzJLcNPR-OqCZ6jg114P78"
      }
    };
    
    var req = http.request(options, function (res) {
      var chunks = [];
    
      res.on("data", function (chunk) {
        chunks.push(chunk);
      });
    
      res.on("end", function () {
        var body = Buffer.concat(chunks);
        console.log(body.toString());
      });
    });
    
    req.write(qs.stringify({ name: 'test', description: 'descriptiontest' }));
    req.end();
    
    require 'uri'
    require 'net/http'
    
    url = URI("https://api.rebill.to/v1/roles/new")
    
    http = Net::HTTP.new(url.host, url.port)
    
    request = Net::HTTP::Put.new(url)
    request["Content-Type"] = 'application/x-www-form-urlencoded'
    request["Authorization"] = 'JWT eyJhbGciOiJIUzI1NiJ9.eyJpZCI6MSwicGFzc3dvcmQiOiIkMmEkMTAkRGJXY2FtMW9HcEVhZUtHemt0NE5iZW5JUVM5dkMwRXVtaWlxc2J4ejFmek84ekFSNW1WUW0ifQ.DD1Wk4qBmEL1xOu8CaJv4WzJLcNPR-OqCZ6jg114P78'
    request.body = "name=test&description=descriptiontest"
    
    response = http.request(request)
    puts response.read_body
    
    import requests
    
    url = "https://api.rebill.to/v1/roles/new"
    
    payload = "name=test&description=descriptiontest"
    headers = {
        'Content-Type': "application/x-www-form-urlencoded",
        'Authorization': "JWT eyJhbGciOiJIUzI1NiJ9.eyJpZCI6MSwicGFzc3dvcmQiOiIkMmEkMTAkRGJXY2FtMW9HcEVhZUtHemt0NE5iZW5JUVM5dkMwRXVtaWlxc2J4ejFmek84ekFSNW1WUW0ifQ.DD1Wk4qBmEL1xOu8CaJv4WzJLcNPR-OqCZ6jg114P78"
        }
    
    response = requests.request("PUT", url, data=payload, headers=headers)
    
    print(response.text)
    
    <?php
    
    $curl = curl_init();
    
    curl_setopt_array($curl, array(
      CURLOPT_URL => "https://api.rebill.to/v1/roles/new",
      CURLOPT_RETURNTRANSFER => true,
      CURLOPT_ENCODING => "",
      CURLOPT_MAXREDIRS => 10,
      CURLOPT_TIMEOUT => 30,
      CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
      CURLOPT_CUSTOMREQUEST => "PUT",
      CURLOPT_POSTFIELDS => "name=test&description=descriptiontest",
      CURLOPT_HTTPHEADER => array(
        "Authorization: JWT eyJhbGciOiJIUzI1NiJ9.eyJpZCI6MSwicGFzc3dvcmQiOiIkMmEkMTAkRGJXY2FtMW9HcEVhZUtHemt0NE5iZW5JUVM5dkMwRXVtaWlxc2J4ejFmek84ekFSNW1WUW0ifQ.DD1Wk4qBmEL1xOu8CaJv4WzJLcNPR-OqCZ6jg114P78",
        "Content-Type: application/x-www-form-urlencoded"
      ),
    ));
    
    $response = curl_exec($curl);
    $err = curl_error($curl);
    
    curl_close($curl);
    
    if ($err) {
      echo "cURL Error #:" . $err;
    } else {
      echo $response;
    }
    
    package main
    
    import (
        "fmt"
        "strings"
        "net/http"
        "io/ioutil"
    )
    
    func main() {
    
        url := "https://api.rebill.to/v1/roles/new"
    
        payload := strings.NewReader("name=test&description=descriptiontest")
    
        req, _ := http.NewRequest("PUT", url, payload)
    
        req.Header.Add("Content-Type", "application/x-www-form-urlencoded")
        req.Header.Add("Authorization", "JWT eyJhbGciOiJIUzI1NiJ9.eyJpZCI6MSwicGFzc3dvcmQiOiIkMmEkMTAkRGJXY2FtMW9HcEVhZUtHemt0NE5iZW5JUVM5dkMwRXVtaWlxc2J4ejFmek84ekFSNW1WUW0ifQ.DD1Wk4qBmEL1xOu8CaJv4WzJLcNPR-OqCZ6jg114P78")
    
        res, _ := http.DefaultClient.Do(req)
    
        defer res.Body.Close()
        body, _ := ioutil.ReadAll(res.Body)
    
        fmt.Println(res)
        fmt.Println(string(body))
    
    }
    

    HTTP Request

    PUT https://api.rebill.to/v1/roles/new

    Header Content
    Authorization JWT eyJhbGciOiJIUzI1NiJ9.eyJpZCI6OSwicGFzc3dvcmQiOiIkMmEkMTAkcjdGQXlFNGZicnc1MEtWTkw0elJ4ZWxjaFdlREVwSDBYaUxNeFlPLlhDODR6RGkvWk9mcUsifQ.WJ_ijzdSYqPU8XqXRlDiR2YlSVhpijIPCU6aQFGSBOM
    Content-type application/json

    URL Parameters

    Parameter Description
    :type Retrieve the Plan by planID or mpPlanID.
    :id ID of the Plan to Retrieve.

    Update Role by ID

    curl --request POST \
      --url 'https://api.rebill.to/v1/roles/update' \
      --header 'Authorization: JWT eyJhbGciOiJIUzI1NiJ9.eyJpZCI6MSwicGFzc3dvcmQiOiIkMmEkMTAkRGJXY2FtMW9HcEVhZUtHemt0NE5iZW5JUVM5dkMwRXVtaWlxc2J4ejFmek84ekFSNW1WUW0ifQ.DD1Wk4qBmEL1xOu8CaJv4WzJLcNPR-OqCZ6jg114P78' \
      --header 'Content-Type: application/x-www-form-urlencoded' \
      --data 'id=5&name=test1&description=descriptiontest1'
    
    var qs = require("querystring");
    var http = require("http");
    
    var options = {
      "method": "POST",
      "hostname": [
        "https://api.rebill.to"
      ],
      "path": [
        "v1",
        "roles",
        "update"
      ],
      "headers": {
        "Content-Type": "application/x-www-form-urlencoded",
        "Authorization": "JWT eyJhbGciOiJIUzI1NiJ9.eyJpZCI6MSwicGFzc3dvcmQiOiIkMmEkMTAkRGJXY2FtMW9HcEVhZUtHemt0NE5iZW5JUVM5dkMwRXVtaWlxc2J4ejFmek84ekFSNW1WUW0ifQ.DD1Wk4qBmEL1xOu8CaJv4WzJLcNPR-OqCZ6jg114P78"
      }
    };
    
    var req = http.request(options, function (res) {
      var chunks = [];
    
      res.on("data", function (chunk) {
        chunks.push(chunk);
      });
    
      res.on("end", function () {
        var body = Buffer.concat(chunks);
        console.log(body.toString());
      });
    });
    
    req.write(qs.stringify({ id: '5', name: 'test1', description: 'descriptiontest1' }));
    req.end();
    
    require 'uri'
    require 'net/http'
    
    url = URI("https://api.rebill.to/v1/roles/update")
    
    http = Net::HTTP.new(url.host, url.port)
    
    request = Net::HTTP::Post.new(url)
    request["Content-Type"] = 'application/x-www-form-urlencoded'
    request["Authorization"] = 'JWT eyJhbGciOiJIUzI1NiJ9.eyJpZCI6MSwicGFzc3dvcmQiOiIkMmEkMTAkRGJXY2FtMW9HcEVhZUtHemt0NE5iZW5JUVM5dkMwRXVtaWlxc2J4ejFmek84ekFSNW1WUW0ifQ.DD1Wk4qBmEL1xOu8CaJv4WzJLcNPR-OqCZ6jg114P78'
    request.body = "id=5&name=test1&description=descriptiontest1"
    
    response = http.request(request)
    puts response.read_body
    
    import requests
    
    url = "https://api.rebill.to/v1/roles/update"
    
    payload = "id=5&name=test1&description=descriptiontest1"
    headers = {
        'Content-Type': "application/x-www-form-urlencoded",
        'Authorization': "JWT eyJhbGciOiJIUzI1NiJ9.eyJpZCI6MSwicGFzc3dvcmQiOiIkMmEkMTAkRGJXY2FtMW9HcEVhZUtHemt0NE5iZW5JUVM5dkMwRXVtaWlxc2J4ejFmek84ekFSNW1WUW0ifQ.DD1Wk4qBmEL1xOu8CaJv4WzJLcNPR-OqCZ6jg114P78"
        }
    
    response = requests.request("POST", url, data=payload, headers=headers)
    
    print(response.text)
    
    <?php
    
    $curl = curl_init();
    
    curl_setopt_array($curl, array(
      CURLOPT_URL => "https://api.rebill.to/v1/roles/update",
      CURLOPT_RETURNTRANSFER => true,
      CURLOPT_ENCODING => "",
      CURLOPT_MAXREDIRS => 10,
      CURLOPT_TIMEOUT => 30,
      CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
      CURLOPT_CUSTOMREQUEST => "POST",
      CURLOPT_POSTFIELDS => "id=5&name=test1&description=descriptiontest1",
      CURLOPT_HTTPHEADER => array(
        "Authorization: JWT eyJhbGciOiJIUzI1NiJ9.eyJpZCI6MSwicGFzc3dvcmQiOiIkMmEkMTAkRGJXY2FtMW9HcEVhZUtHemt0NE5iZW5JUVM5dkMwRXVtaWlxc2J4ejFmek84ekFSNW1WUW0ifQ.DD1Wk4qBmEL1xOu8CaJv4WzJLcNPR-OqCZ6jg114P78",
        "Content-Type: application/x-www-form-urlencoded"
      ),
    ));
    
    $response = curl_exec($curl);
    $err = curl_error($curl);
    
    curl_close($curl);
    
    if ($err) {
      echo "cURL Error #:" . $err;
    } else {
      echo $response;
    }
    
    package main
    
    import (
        "fmt"
        "strings"
        "net/http"
        "io/ioutil"
    )
    
    func main() {
    
        url := "https://api.rebill.to/v1/roles/update"
    
        payload := strings.NewReader("id=5&name=test1&description=descriptiontest1")
    
        req, _ := http.NewRequest("POST", url, payload)
    
        req.Header.Add("Content-Type", "application/x-www-form-urlencoded")
        req.Header.Add("Authorization", "JWT eyJhbGciOiJIUzI1NiJ9.eyJpZCI6MSwicGFzc3dvcmQiOiIkMmEkMTAkRGJXY2FtMW9HcEVhZUtHemt0NE5iZW5JUVM5dkMwRXVtaWlxc2J4ejFmek84ekFSNW1WUW0ifQ.DD1Wk4qBmEL1xOu8CaJv4WzJLcNPR-OqCZ6jg114P78")
    
        res, _ := http.DefaultClient.Do(req)
    
        defer res.Body.Close()
        body, _ := ioutil.ReadAll(res.Body)
    
        fmt.Println(res)
        fmt.Println(string(body))
    
    }
    

    HTTP Request

    POST https://api.rebill.to/v1/roles/update

    Header Content
    Authorization JWT eyJhbGciOiJIUzI1NiJ9.eyJpZCI6OSwicGFzc3dvcmQiOiIkMmEkMTAkcjdGQXlFNGZicnc1MEtWTkw0elJ4ZWxjaFdlREVwSDBYaUxNeFlPLlhDODR6RGkvWk9mcUsifQ.WJ_ijzdSYqPU8XqXRlDiR2YlSVhpijIPCU6aQFGSBOM
    Content-type application/json

    URL Parameters

    Parameter Description
    :type Retrieve the Plan by planID or mpPlanID.
    :id ID of the Plan to Retrieve.

    Add Permission to Role

    curl --request PUT \
      --url 'https://api.rebill.to/v1/roles/addpermission' \
      --header 'Authorization: JWT eyJhbGciOiJIUzI1NiJ9.eyJpZCI6MSwicGFzc3dvcmQiOiIkMmEkMTAkRGJXY2FtMW9HcEVhZUtHemt0NE5iZW5JUVM5dkMwRXVtaWlxc2J4ejFmek84ekFSNW1WUW0ifQ.DD1Wk4qBmEL1xOu8CaJv4WzJLcNPR-OqCZ6jg114P78' \
      --data 'role_id=2&permission_id=2000&description=test'
    
    var qs = require("querystring");
    var http = require("http");
    
    var options = {
      "method": "PUT",
      "hostname": [
        "https://api.rebill.to"
      ],
      "path": [
        "v1",
        "roles",
        "addpermission"
      ],
      "headers": {
        "Authorization": "JWT eyJhbGciOiJIUzI1NiJ9.eyJpZCI6MSwicGFzc3dvcmQiOiIkMmEkMTAkRGJXY2FtMW9HcEVhZUtHemt0NE5iZW5JUVM5dkMwRXVtaWlxc2J4ejFmek84ekFSNW1WUW0ifQ.DD1Wk4qBmEL1xOu8CaJv4WzJLcNPR-OqCZ6jg114P78"
      }
    };
    
    var req = http.request(options, function (res) {
      var chunks = [];
    
      res.on("data", function (chunk) {
        chunks.push(chunk);
      });
    
      res.on("end", function () {
        var body = Buffer.concat(chunks);
        console.log(body.toString());
      });
    });
    
    req.write(qs.stringify({ role_id: '2', permission_id: '2000', description: 'test' }));
    req.end();
    
    require 'uri'
    require 'net/http'
    
    url = URI("https://api.rebill.to/v1/roles/addpermission")
    
    http = Net::HTTP.new(url.host, url.port)
    
    request = Net::HTTP::Put.new(url)
    request["Authorization"] = 'JWT eyJhbGciOiJIUzI1NiJ9.eyJpZCI6MSwicGFzc3dvcmQiOiIkMmEkMTAkRGJXY2FtMW9HcEVhZUtHemt0NE5iZW5JUVM5dkMwRXVtaWlxc2J4ejFmek84ekFSNW1WUW0ifQ.DD1Wk4qBmEL1xOu8CaJv4WzJLcNPR-OqCZ6jg114P78'
    request.body = "role_id=2&permission_id=2000&description=test"
    
    response = http.request(request)
    puts response.read_body
    
    import requests
    
    url = "https://api.rebill.to/v1/roles/addpermission"
    
    payload = "role_id=2&permission_id=2000&description=test"
    headers = {'Authorization': 'JWT eyJhbGciOiJIUzI1NiJ9.eyJpZCI6MSwicGFzc3dvcmQiOiIkMmEkMTAkRGJXY2FtMW9HcEVhZUtHemt0NE5iZW5JUVM5dkMwRXVtaWlxc2J4ejFmek84ekFSNW1WUW0ifQ.DD1Wk4qBmEL1xOu8CaJv4WzJLcNPR-OqCZ6jg114P78'}
    
    response = requests.request("PUT", url, data=payload, headers=headers)
    
    print(response.text)
    
    <?php
    
    $curl = curl_init();
    
    curl_setopt_array($curl, array(
      CURLOPT_URL => "https://api.rebill.to/v1/roles/addpermission",
      CURLOPT_RETURNTRANSFER => true,
      CURLOPT_ENCODING => "",
      CURLOPT_MAXREDIRS => 10,
      CURLOPT_TIMEOUT => 30,
      CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
      CURLOPT_CUSTOMREQUEST => "PUT",
      CURLOPT_POSTFIELDS => "role_id=2&permission_id=2000&description=test",
      CURLOPT_HTTPHEADER => array(
        "Authorization: JWT eyJhbGciOiJIUzI1NiJ9.eyJpZCI6MSwicGFzc3dvcmQiOiIkMmEkMTAkRGJXY2FtMW9HcEVhZUtHemt0NE5iZW5JUVM5dkMwRXVtaWlxc2J4ejFmek84ekFSNW1WUW0ifQ.DD1Wk4qBmEL1xOu8CaJv4WzJLcNPR-OqCZ6jg114P78"
      ),
    ));
    
    $response = curl_exec($curl);
    $err = curl_error($curl);
    
    curl_close($curl);
    
    if ($err) {
      echo "cURL Error #:" . $err;
    } else {
      echo $response;
    }
    
    package main
    
    import (
        "fmt"
        "strings"
        "net/http"
        "io/ioutil"
    )
    
    func main() {
    
        url := "https://api.rebill.to/v1/roles/addpermission"
    
        payload := strings.NewReader("role_id=2&permission_id=2000&description=test")
    
        req, _ := http.NewRequest("PUT", url, payload)
    
        req.Header.Add("Authorization", "JWT eyJhbGciOiJIUzI1NiJ9.eyJpZCI6MSwicGFzc3dvcmQiOiIkMmEkMTAkRGJXY2FtMW9HcEVhZUtHemt0NE5iZW5JUVM5dkMwRXVtaWlxc2J4ejFmek84ekFSNW1WUW0ifQ.DD1Wk4qBmEL1xOu8CaJv4WzJLcNPR-OqCZ6jg114P78")
    
        res, _ := http.DefaultClient.Do(req)
    
        defer res.Body.Close()
        body, _ := ioutil.ReadAll(res.Body)
    
        fmt.Println(res)
        fmt.Println(string(body))
    
    }
    

    HTTP Request

    PUT https://api.rebill.to/v1/roles/addpermission

    Header Content
    Authorization JWT eyJhbGciOiJIUzI1NiJ9.eyJpZCI6OSwicGFzc3dvcmQiOiIkMmEkMTAkcjdGQXlFNGZicnc1MEtWTkw0elJ4ZWxjaFdlREVwSDBYaUxNeFlPLlhDODR6RGkvWk9mcUsifQ.WJ_ijzdSYqPU8XqXRlDiR2YlSVhpijIPCU6aQFGSBOM
    Content-type application/json

    URL Parameters

    Parameter Description
    :type Retrieve the Plan by planID or mpPlanID.
    :id ID of the Plan to Retrieve.

    Remove Permission to Role

    curl --request POST \
      --url 'https://api.rebill.to/v1/roles/removepermission/' \
      --header 'Authorization: JWT eyJhbGciOiJIUzI1NiJ9.eyJpZCI6MSwicGFzc3dvcmQiOiIkMmEkMTAkRGJXY2FtMW9HcEVhZUtHemt0NE5iZW5JUVM5dkMwRXVtaWlxc2J4ejFmek84ekFSNW1WUW0ifQ.DD1Wk4qBmEL1xOu8CaJv4WzJLcNPR-OqCZ6jg114P78' \
      --data 'role_id=2&permission_id=2000'
    
    var qs = require("querystring");
    var http = require("http");
    
    var options = {
      "method": "POST",
      "hostname": [
        "https://api.rebill.to"
      ],
      "path": [
        "v1",
        "roles",
        "removepermission",
        ""
      ],
      "headers": {
        "Authorization": "JWT eyJhbGciOiJIUzI1NiJ9.eyJpZCI6MSwicGFzc3dvcmQiOiIkMmEkMTAkRGJXY2FtMW9HcEVhZUtHemt0NE5iZW5JUVM5dkMwRXVtaWlxc2J4ejFmek84ekFSNW1WUW0ifQ.DD1Wk4qBmEL1xOu8CaJv4WzJLcNPR-OqCZ6jg114P78"
      }
    };
    
    var req = http.request(options, function (res) {
      var chunks = [];
    
      res.on("data", function (chunk) {
        chunks.push(chunk);
      });
    
      res.on("end", function () {
        var body = Buffer.concat(chunks);
        console.log(body.toString());
      });
    });
    
    req.write(qs.stringify({ role_id: '2', permission_id: '2000' }));
    req.end();
    
    require 'uri'
    require 'net/http'
    
    url = URI("https://api.rebill.to/v1/roles/removepermission/")
    
    http = Net::HTTP.new(url.host, url.port)
    
    request = Net::HTTP::Post.new(url)
    request["Authorization"] = 'JWT eyJhbGciOiJIUzI1NiJ9.eyJpZCI6MSwicGFzc3dvcmQiOiIkMmEkMTAkRGJXY2FtMW9HcEVhZUtHemt0NE5iZW5JUVM5dkMwRXVtaWlxc2J4ejFmek84ekFSNW1WUW0ifQ.DD1Wk4qBmEL1xOu8CaJv4WzJLcNPR-OqCZ6jg114P78'
    request.body = "role_id=2&permission_id=2000"
    
    response = http.request(request)
    puts response.read_body
    
    import requests
    
    url = "https://api.rebill.to/v1/roles/removepermission/"
    
    payload = "role_id=2&permission_id=2000"
    headers = {'Authorization': 'JWT eyJhbGciOiJIUzI1NiJ9.eyJpZCI6MSwicGFzc3dvcmQiOiIkMmEkMTAkRGJXY2FtMW9HcEVhZUtHemt0NE5iZW5JUVM5dkMwRXVtaWlxc2J4ejFmek84ekFSNW1WUW0ifQ.DD1Wk4qBmEL1xOu8CaJv4WzJLcNPR-OqCZ6jg114P78'}
    
    response = requests.request("POST", url, data=payload, headers=headers)
    
    print(response.text)
    
    <?php
    
    $curl = curl_init();
    
    curl_setopt_array($curl, array(
      CURLOPT_URL => "https://api.rebill.to/v1/roles/removepermission/",
      CURLOPT_RETURNTRANSFER => true,
      CURLOPT_ENCODING => "",
      CURLOPT_MAXREDIRS => 10,
      CURLOPT_TIMEOUT => 30,
      CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
      CURLOPT_CUSTOMREQUEST => "POST",
      CURLOPT_POSTFIELDS => "role_id=2&permission_id=2000",
      CURLOPT_HTTPHEADER => array(
        "Authorization: JWT eyJhbGciOiJIUzI1NiJ9.eyJpZCI6MSwicGFzc3dvcmQiOiIkMmEkMTAkRGJXY2FtMW9HcEVhZUtHemt0NE5iZW5JUVM5dkMwRXVtaWlxc2J4ejFmek84ekFSNW1WUW0ifQ.DD1Wk4qBmEL1xOu8CaJv4WzJLcNPR-OqCZ6jg114P78"
      ),
    ));
    
    $response = curl_exec($curl);
    $err = curl_error($curl);
    
    curl_close($curl);
    
    if ($err) {
      echo "cURL Error #:" . $err;
    } else {
      echo $response;
    }
    
    package main
    
    import (
        "fmt"
        "strings"
        "net/http"
        "io/ioutil"
    )
    
    func main() {
    
        url := "https://api.rebill.to/v1/roles/removepermission/"
    
        payload := strings.NewReader("role_id=2&permission_id=2000")
    
        req, _ := http.NewRequest("POST", url, payload)
    
        req.Header.Add("Authorization", "JWT eyJhbGciOiJIUzI1NiJ9.eyJpZCI6MSwicGFzc3dvcmQiOiIkMmEkMTAkRGJXY2FtMW9HcEVhZUtHemt0NE5iZW5JUVM5dkMwRXVtaWlxc2J4ejFmek84ekFSNW1WUW0ifQ.DD1Wk4qBmEL1xOu8CaJv4WzJLcNPR-OqCZ6jg114P78")
    
        res, _ := http.DefaultClient.Do(req)
    
        defer res.Body.Close()
        body, _ := ioutil.ReadAll(res.Body)
    
        fmt.Println(res)
        fmt.Println(string(body))
    
    }
    

    HTTP Request

    POST https://api.rebill.to/v1/roles/removepermission/

    Header Content
    Authorization JWT eyJhbGciOiJIUzI1NiJ9.eyJpZCI6OSwicGFzc3dvcmQiOiIkMmEkMTAkcjdGQXlFNGZicnc1MEtWTkw0elJ4ZWxjaFdlREVwSDBYaUxNeFlPLlhDODR6RGkvWk9mcUsifQ.WJ_ijzdSYqPU8XqXRlDiR2YlSVhpijIPCU6aQFGSBOM
    Content-type application/json

    URL Parameters

    Parameter Description
    :type Retrieve the Plan by planID or mpPlanID.
    :id ID of the Plan to Retrieve.

    Set or Update Role to User

    curl --request PUT \
      --url 'https://api.rebill.to/v1/roles/settouser' \
      --header 'Authorization: JWT eyJhbGciOiJIUzI1NiJ9.eyJpZCI6MSwicGFzc3dvcmQiOiIkMmEkMTAkRGJXY2FtMW9HcEVhZUtHemt0NE5iZW5JUVM5dkMwRXVtaWlxc2J4ejFmek84ekFSNW1WUW0ifQ.DD1Wk4qBmEL1xOu8CaJv4WzJLcNPR-OqCZ6jg114P78' \
      --data 'user_id=11&role_id=13'
    
    var qs = require("querystring");
    var http = require("http");
    
    var options = {
      "method": "PUT",
      "hostname": [
        "https://api.rebill.to"
      ],
      "path": [
        "v1",
        "roles",
        "settouser"
      ],
      "headers": {
        "Authorization": "JWT eyJhbGciOiJIUzI1NiJ9.eyJpZCI6MSwicGFzc3dvcmQiOiIkMmEkMTAkRGJXY2FtMW9HcEVhZUtHemt0NE5iZW5JUVM5dkMwRXVtaWlxc2J4ejFmek84ekFSNW1WUW0ifQ.DD1Wk4qBmEL1xOu8CaJv4WzJLcNPR-OqCZ6jg114P78"
      }
    };
    
    var req = http.request(options, function (res) {
      var chunks = [];
    
      res.on("data", function (chunk) {
        chunks.push(chunk);
      });
    
      res.on("end", function () {
        var body = Buffer.concat(chunks);
        console.log(body.toString());
      });
    });
    
    req.write(qs.stringify({ user_id: '11', role_id: '13' }));
    req.end();
    
    require 'uri'
    require 'net/http'
    
    url = URI("https://api.rebill.to/v1/roles/settouser")
    
    http = Net::HTTP.new(url.host, url.port)
    
    request = Net::HTTP::Put.new(url)
    request["Authorization"] = 'JWT eyJhbGciOiJIUzI1NiJ9.eyJpZCI6MSwicGFzc3dvcmQiOiIkMmEkMTAkRGJXY2FtMW9HcEVhZUtHemt0NE5iZW5JUVM5dkMwRXVtaWlxc2J4ejFmek84ekFSNW1WUW0ifQ.DD1Wk4qBmEL1xOu8CaJv4WzJLcNPR-OqCZ6jg114P78'
    request.body = "user_id=11&role_id=13"
    
    response = http.request(request)
    puts response.read_body
    
    import requests
    
    url = "https://api.rebill.to/v1/roles/settouser"
    
    payload = "user_id=11&role_id=13"
    headers = {'Authorization': 'JWT eyJhbGciOiJIUzI1NiJ9.eyJpZCI6MSwicGFzc3dvcmQiOiIkMmEkMTAkRGJXY2FtMW9HcEVhZUtHemt0NE5iZW5JUVM5dkMwRXVtaWlxc2J4ejFmek84ekFSNW1WUW0ifQ.DD1Wk4qBmEL1xOu8CaJv4WzJLcNPR-OqCZ6jg114P78'}
    
    response = requests.request("PUT", url, data=payload, headers=headers)
    
    print(response.text)
    
    <?php
    
    $curl = curl_init();
    
    curl_setopt_array($curl, array(
      CURLOPT_URL => "https://api.rebill.to/v1/roles/settouser",
      CURLOPT_RETURNTRANSFER => true,
      CURLOPT_ENCODING => "",
      CURLOPT_MAXREDIRS => 10,
      CURLOPT_TIMEOUT => 30,
      CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
      CURLOPT_CUSTOMREQUEST => "PUT",
      CURLOPT_POSTFIELDS => "user_id=11&role_id=13",
      CURLOPT_HTTPHEADER => array(
        "Authorization: JWT eyJhbGciOiJIUzI1NiJ9.eyJpZCI6MSwicGFzc3dvcmQiOiIkMmEkMTAkRGJXY2FtMW9HcEVhZUtHemt0NE5iZW5JUVM5dkMwRXVtaWlxc2J4ejFmek84ekFSNW1WUW0ifQ.DD1Wk4qBmEL1xOu8CaJv4WzJLcNPR-OqCZ6jg114P78"
      ),
    ));
    
    $response = curl_exec($curl);
    $err = curl_error($curl);
    
    curl_close($curl);
    
    if ($err) {
      echo "cURL Error #:" . $err;
    } else {
      echo $response;
    }
    
    package main
    
    import (
        "fmt"
        "strings"
        "net/http"
        "io/ioutil"
    )
    
    func main() {
    
        url := "https://api.rebill.to/v1/roles/settouser"
    
        payload := strings.NewReader("user_id=11&role_id=13")
    
        req, _ := http.NewRequest("PUT", url, payload)
    
        req.Header.Add("Authorization", "JWT eyJhbGciOiJIUzI1NiJ9.eyJpZCI6MSwicGFzc3dvcmQiOiIkMmEkMTAkRGJXY2FtMW9HcEVhZUtHemt0NE5iZW5JUVM5dkMwRXVtaWlxc2J4ejFmek84ekFSNW1WUW0ifQ.DD1Wk4qBmEL1xOu8CaJv4WzJLcNPR-OqCZ6jg114P78")
    
        res, _ := http.DefaultClient.Do(req)
    
        defer res.Body.Close()
        body, _ := ioutil.ReadAll(res.Body)
    
        fmt.Println(res)
        fmt.Println(string(body))
    
    }
    

    HTTP Request

    PUT https://api.rebill.to/v1/roles/settouser

    Header Content
    Authorization JWT eyJhbGciOiJIUzI1NiJ9.eyJpZCI6OSwicGFzc3dvcmQiOiIkMmEkMTAkcjdGQXlFNGZicnc1MEtWTkw0elJ4ZWxjaFdlREVwSDBYaUxNeFlPLlhDODR6RGkvWk9mcUsifQ.WJ_ijzdSYqPU8XqXRlDiR2YlSVhpijIPCU6aQFGSBOM
    Content-type application/json

    URL Parameters

    Parameter Description
    :type Retrieve the Plan by planID or mpPlanID.
    :id ID of the Plan to Retrieve.

    Delete Role

    curl --request DELETE \
      --url 'https://api.rebill.to/v1/roles/delete/5' \
      --header 'Authorization: JWT eyJhbGciOiJIUzI1NiJ9.eyJpZCI6MSwicGFzc3dvcmQiOiIkMmEkMTAkRGJXY2FtMW9HcEVhZUtHemt0NE5iZW5JUVM5dkMwRXVtaWlxc2J4ejFmek84ekFSNW1WUW0ifQ.DD1Wk4qBmEL1xOu8CaJv4WzJLcNPR-OqCZ6jg114P78' \
      --header 'Content-Type: application/json'
    
    var http = require("http");
    
    var options = {
      "method": "DELETE",
      "hostname": [
        "https://api.rebill.to"
      ],
      "path": [
        "v1",
        "roles",
        "delete",
        "5"
      ],
      "headers": {
        "Content-Type": "application/json",
        "Authorization": "JWT eyJhbGciOiJIUzI1NiJ9.eyJpZCI6MSwicGFzc3dvcmQiOiIkMmEkMTAkRGJXY2FtMW9HcEVhZUtHemt0NE5iZW5JUVM5dkMwRXVtaWlxc2J4ejFmek84ekFSNW1WUW0ifQ.DD1Wk4qBmEL1xOu8CaJv4WzJLcNPR-OqCZ6jg114P78"
      }
    };
    
    var req = http.request(options, function (res) {
      var chunks = [];
    
      res.on("data", function (chunk) {
        chunks.push(chunk);
      });
    
      res.on("end", function () {
        var body = Buffer.concat(chunks);
        console.log(body.toString());
      });
    });
    
    req.end();
    
    require 'uri'
    require 'net/http'
    
    url = URI("https://api.rebill.to/v1/roles/delete/5")
    
    http = Net::HTTP.new(url.host, url.port)
    
    request = Net::HTTP::Delete.new(url)
    request["Content-Type"] = 'application/json'
    request["Authorization"] = 'JWT eyJhbGciOiJIUzI1NiJ9.eyJpZCI6MSwicGFzc3dvcmQiOiIkMmEkMTAkRGJXY2FtMW9HcEVhZUtHemt0NE5iZW5JUVM5dkMwRXVtaWlxc2J4ejFmek84ekFSNW1WUW0ifQ.DD1Wk4qBmEL1xOu8CaJv4WzJLcNPR-OqCZ6jg114P78'
    
    response = http.request(request)
    puts response.read_body
    
    import requests
    
    url = "https://api.rebill.to/v1/roles/delete/5"
    
    headers = {
        'Content-Type': "application/json",
        'Authorization': "JWT eyJhbGciOiJIUzI1NiJ9.eyJpZCI6MSwicGFzc3dvcmQiOiIkMmEkMTAkRGJXY2FtMW9HcEVhZUtHemt0NE5iZW5JUVM5dkMwRXVtaWlxc2J4ejFmek84ekFSNW1WUW0ifQ.DD1Wk4qBmEL1xOu8CaJv4WzJLcNPR-OqCZ6jg114P78"
        }
    
    response = requests.request("DELETE", url, headers=headers)
    
    print(response.text)
    
    <?php
    
    $curl = curl_init();
    
    curl_setopt_array($curl, array(
      CURLOPT_URL => "https://api.rebill.to/v1/roles/delete/5",
      CURLOPT_RETURNTRANSFER => true,
      CURLOPT_ENCODING => "",
      CURLOPT_MAXREDIRS => 10,
      CURLOPT_TIMEOUT => 30,
      CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
      CURLOPT_CUSTOMREQUEST => "DELETE",
      CURLOPT_HTTPHEADER => array(
        "Authorization: JWT eyJhbGciOiJIUzI1NiJ9.eyJpZCI6MSwicGFzc3dvcmQiOiIkMmEkMTAkRGJXY2FtMW9HcEVhZUtHemt0NE5iZW5JUVM5dkMwRXVtaWlxc2J4ejFmek84ekFSNW1WUW0ifQ.DD1Wk4qBmEL1xOu8CaJv4WzJLcNPR-OqCZ6jg114P78",
        "Content-Type: application/json"
      ),
    ));
    
    $response = curl_exec($curl);
    $err = curl_error($curl);
    
    curl_close($curl);
    
    if ($err) {
      echo "cURL Error #:" . $err;
    } else {
      echo $response;
    }
    
    package main
    
    import (
        "fmt"
        "net/http"
        "io/ioutil"
    )
    
    func main() {
    
        url := "https://api.rebill.to/v1/roles/delete/5"
    
        req, _ := http.NewRequest("DELETE", url, nil)
    
        req.Header.Add("Content-Type", "application/json")
        req.Header.Add("Authorization", "JWT eyJhbGciOiJIUzI1NiJ9.eyJpZCI6MSwicGFzc3dvcmQiOiIkMmEkMTAkRGJXY2FtMW9HcEVhZUtHemt0NE5iZW5JUVM5dkMwRXVtaWlxc2J4ejFmek84ekFSNW1WUW0ifQ.DD1Wk4qBmEL1xOu8CaJv4WzJLcNPR-OqCZ6jg114P78")
    
        res, _ := http.DefaultClient.Do(req)
    
        defer res.Body.Close()
        body, _ := ioutil.ReadAll(res.Body)
    
        fmt.Println(res)
        fmt.Println(string(body))
    
    }
    

    HTTP Request

    DELETE https://api.rebill.to/v1/roles/delete/:id

    Header Content
    Authorization JWT eyJhbGciOiJIUzI1NiJ9.eyJpZCI6OSwicGFzc3dvcmQiOiIkMmEkMTAkcjdGQXlFNGZicnc1MEtWTkw0elJ4ZWxjaFdlREVwSDBYaUxNeFlPLlhDODR6RGkvWk9mcUsifQ.WJ_ijzdSYqPU8XqXRlDiR2YlSVhpijIPCU6aQFGSBOM
    Content-type application/json

    URL Parameters

    Parameter Description
    :type Retrieve the Plan by planID or mpPlanID.
    :id ID of the Plan to Retrieve.

    Companies

    Get All Plans

    
    
    
    
    
    
    
    
    
    

    HTTP Request

    GET https://api.rebill.to/v1/plans/all

    Header Content
    Authorization JWT eyJhbGciOiJIUzI1NiJ9.eyJpZCI6OSwicGFzc3dvcmQiOiIkMmEkMTAkcjdGQXlFNGZicnc1MEtWTkw0elJ4ZWxjaFdlREVwSDBYaUxNeFlPLlhDODR6RGkvWk9mcUsifQ.WJ_ijzdSYqPU8XqXRlDiR2YlSVhpijIPCU6aQFGSBOM
    Content-type application/json

    URL Parameters

    Parameter Description
    :type Retrieve the Plan by planID or mpPlanID.
    :id ID of the Plan to Retrieve.

    Payments

    Get All Payments

    curl --request GET \
      --url 'https://api.rebill.to/v1/payments/all' \
      --header 'Authorization: JWT eyJhbGciOiJIUzI1NiJ9.eyJpZCI6OSwicGFzc3dvcmQiOiIkMmEkMTAkcjdGQXlFNGZicnc1MEtWTkw0elJ4ZWxjaFdlREVwSDBYaUxNeFlPLlhDODR6RGkvWk9mcUsifQ.WJ_ijzdSYqPU8XqXRlDiR2YlSVhpijIPCU6aQFGSBOM'
    
    var http = require("http");
    
    var options = {
      "method": "GET",
      "hostname": [
        "https://api.rebill.to"
      ],
      "path": [
        "v1",
        "payments",
        "all"
      ],
      "headers": {
        "Authorization": "JWT eyJhbGciOiJIUzI1NiJ9.eyJpZCI6OSwicGFzc3dvcmQiOiIkMmEkMTAkcjdGQXlFNGZicnc1MEtWTkw0elJ4ZWxjaFdlREVwSDBYaUxNeFlPLlhDODR6RGkvWk9mcUsifQ.WJ_ijzdSYqPU8XqXRlDiR2YlSVhpijIPCU6aQFGSBOM"
      }
    };
    
    var req = http.request(options, function (res) {
      var chunks = [];
    
      res.on("data", function (chunk) {
        chunks.push(chunk);
      });
    
      res.on("end", function () {
        var body = Buffer.concat(chunks);
        console.log(body.toString());
      });
    });
    
    req.end();
    
    require 'uri'
    require 'net/http'
    
    url = URI("https://api.rebill.to/v1/payments/all")
    
    http = Net::HTTP.new(url.host, url.port)
    
    request = Net::HTTP::Get.new(url)
    request["Authorization"] = 'JWT eyJhbGciOiJIUzI1NiJ9.eyJpZCI6OSwicGFzc3dvcmQiOiIkMmEkMTAkcjdGQXlFNGZicnc1MEtWTkw0elJ4ZWxjaFdlREVwSDBYaUxNeFlPLlhDODR6RGkvWk9mcUsifQ.WJ_ijzdSYqPU8XqXRlDiR2YlSVhpijIPCU6aQFGSBOM'
    
    response = http.request(request)
    puts response.read_body
    
    import requests
    
    url = "https://api.rebill.to/v1/payments/all"
    
    headers = {'Authorization': 'JWT eyJhbGciOiJIUzI1NiJ9.eyJpZCI6OSwicGFzc3dvcmQiOiIkMmEkMTAkcjdGQXlFNGZicnc1MEtWTkw0elJ4ZWxjaFdlREVwSDBYaUxNeFlPLlhDODR6RGkvWk9mcUsifQ.WJ_ijzdSYqPU8XqXRlDiR2YlSVhpijIPCU6aQFGSBOM'}
    
    response = requests.request("GET", url, headers=headers)
    
    print(response.text)
    
    <?php
    
    $curl = curl_init();
    
    curl_setopt_array($curl, array(
      CURLOPT_URL => "https://api.rebill.to/v1/payments/all",
      CURLOPT_RETURNTRANSFER => true,
      CURLOPT_ENCODING => "",
      CURLOPT_MAXREDIRS => 10,
      CURLOPT_TIMEOUT => 30,
      CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
      CURLOPT_CUSTOMREQUEST => "GET",
      CURLOPT_HTTPHEADER => array(
        "Authorization: JWT eyJhbGciOiJIUzI1NiJ9.eyJpZCI6OSwicGFzc3dvcmQiOiIkMmEkMTAkcjdGQXlFNGZicnc1MEtWTkw0elJ4ZWxjaFdlREVwSDBYaUxNeFlPLlhDODR6RGkvWk9mcUsifQ.WJ_ijzdSYqPU8XqXRlDiR2YlSVhpijIPCU6aQFGSBOM"
      ),
    ));
    
    $response = curl_exec($curl);
    $err = curl_error($curl);
    
    curl_close($curl);
    
    if ($err) {
      echo "cURL Error #:" . $err;
    } else {
      echo $response;
    }
    
    package main
    
    import (
        "fmt"
        "net/http"
        "io/ioutil"
    )
    
    func main() {
    
        url := "https://api.rebill.to/v1/payments/all"
    
        req, _ := http.NewRequest("GET", url, nil)
    
        req.Header.Add("Authorization", "JWT eyJhbGciOiJIUzI1NiJ9.eyJpZCI6OSwicGFzc3dvcmQiOiIkMmEkMTAkcjdGQXlFNGZicnc1MEtWTkw0elJ4ZWxjaFdlREVwSDBYaUxNeFlPLlhDODR6RGkvWk9mcUsifQ.WJ_ijzdSYqPU8XqXRlDiR2YlSVhpijIPCU6aQFGSBOM")
    
        res, _ := http.DefaultClient.Do(req)
    
        defer res.Body.Close()
        body, _ := ioutil.ReadAll(res.Body)
    
        fmt.Println(res)
        fmt.Println(string(body))
    
    }
    

    HTTP Request

    GET https://api.rebill.to/v1/payments/all

    URL Parameters

    Parameter Description
    ID The ID of the Customer to retrieve

    Get a Specific Payment

    curl --request GET \
      --url 'https://api.rebill.to/v1/payments/subscriptionID/34' \
      --header 'Authorization: JWT eyJhbGciOiJIUzI1NiJ9.eyJpZCI6OSwicGFzc3dvcmQiOiIkMmEkMTAkcjdGQXlFNGZicnc1MEtWTkw0elJ4ZWxjaFdlREVwSDBYaUxNeFlPLlhDODR6RGkvWk9mcUsifQ.WJ_ijzdSYqPU8XqXRlDiR2YlSVhpijIPCU6aQFGSBOM'
    
    var http = require("http");
    
    var options = {
      "method": "GET",
      "hostname": [
        "https://api.rebill.to"
      ],
      "path": [
        "v1",
        "payments",
        "subscriptionID",
        "34"
      ],
      "headers": {
        "Authorization": "JWT eyJhbGciOiJIUzI1NiJ9.eyJpZCI6OSwicGFzc3dvcmQiOiIkMmEkMTAkcjdGQXlFNGZicnc1MEtWTkw0elJ4ZWxjaFdlREVwSDBYaUxNeFlPLlhDODR6RGkvWk9mcUsifQ.WJ_ijzdSYqPU8XqXRlDiR2YlSVhpijIPCU6aQFGSBOM"
      }
    };
    
    var req = http.request(options, function (res) {
      var chunks = [];
    
      res.on("data", function (chunk) {
        chunks.push(chunk);
      });
    
      res.on("end", function () {
        var body = Buffer.concat(chunks);
        console.log(body.toString());
      });
    });
    
    req.end();
    
    require 'uri'
    require 'net/http'
    
    url = URI("https://api.rebill.to/v1/payments/subscriptionID/34")
    
    http = Net::HTTP.new(url.host, url.port)
    
    request = Net::HTTP::Get.new(url)
    request["Authorization"] = 'JWT eyJhbGciOiJIUzI1NiJ9.eyJpZCI6OSwicGFzc3dvcmQiOiIkMmEkMTAkcjdGQXlFNGZicnc1MEtWTkw0elJ4ZWxjaFdlREVwSDBYaUxNeFlPLlhDODR6RGkvWk9mcUsifQ.WJ_ijzdSYqPU8XqXRlDiR2YlSVhpijIPCU6aQFGSBOM'
    
    response = http.request(request)
    puts response.read_body
    
    import requests
    
    url = "https://api.rebill.to/v1/payments/subscriptionID/34"
    
    headers = {'Authorization': 'JWT eyJhbGciOiJIUzI1NiJ9.eyJpZCI6OSwicGFzc3dvcmQiOiIkMmEkMTAkcjdGQXlFNGZicnc1MEtWTkw0elJ4ZWxjaFdlREVwSDBYaUxNeFlPLlhDODR6RGkvWk9mcUsifQ.WJ_ijzdSYqPU8XqXRlDiR2YlSVhpijIPCU6aQFGSBOM'}
    
    response = requests.request("GET", url, headers=headers)
    
    print(response.text)
    
    <?php
    
    $curl = curl_init();
    
    curl_setopt_array($curl, array(
      CURLOPT_URL => "https://api.rebill.to/v1/payments/subscriptionID/34",
      CURLOPT_RETURNTRANSFER => true,
      CURLOPT_ENCODING => "",
      CURLOPT_MAXREDIRS => 10,
      CURLOPT_TIMEOUT => 30,
      CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
      CURLOPT_CUSTOMREQUEST => "GET",
      CURLOPT_HTTPHEADER => array(
        "Authorization: JWT eyJhbGciOiJIUzI1NiJ9.eyJpZCI6OSwicGFzc3dvcmQiOiIkMmEkMTAkcjdGQXlFNGZicnc1MEtWTkw0elJ4ZWxjaFdlREVwSDBYaUxNeFlPLlhDODR6RGkvWk9mcUsifQ.WJ_ijzdSYqPU8XqXRlDiR2YlSVhpijIPCU6aQFGSBOM"
      ),
    ));
    
    $response = curl_exec($curl);
    $err = curl_error($curl);
    
    curl_close($curl);
    
    if ($err) {
      echo "cURL Error #:" . $err;
    } else {
      echo $response;
    }
    
    package main
    
    import (
        "fmt"
        "net/http"
        "io/ioutil"
    )
    
    func main() {
    
        url := "https://api.rebill.to/v1/payments/subscriptionID/34"
    
        req, _ := http.NewRequest("GET", url, nil)
    
        req.Header.Add("Authorization", "JWT eyJhbGciOiJIUzI1NiJ9.eyJpZCI6OSwicGFzc3dvcmQiOiIkMmEkMTAkcjdGQXlFNGZicnc1MEtWTkw0elJ4ZWxjaFdlREVwSDBYaUxNeFlPLlhDODR6RGkvWk9mcUsifQ.WJ_ijzdSYqPU8XqXRlDiR2YlSVhpijIPCU6aQFGSBOM")
    
        res, _ := http.DefaultClient.Do(req)
    
        defer res.Body.Close()
        body, _ := ioutil.ReadAll(res.Body)
    
        fmt.Println(res)
        fmt.Println(string(body))
    
    }
    

    HTTP Request

    GET https://api.rebill.to/v1/payments/:type/:id

    Header Content
    Authorization JWT eyJhbGciOiJIUzI1NiJ9.eyJpZCI6OSwicGFzc3dvcmQiOiIkMmEkMTAkcjdGQXlFNGZicnc1MEtWTkw0elJ4ZWxjaFdlREVwSDBYaUxNeFlPLlhDODR6RGkvWk9mcUsifQ.WJ_ijzdSYqPU8XqXRlDiR2YlSVhpijIPCU6aQFGSBOM

    URL Parameters

    Parameter Description
    :type Find by paymentID or subscriptionID.
    :id ID of the payment to retrieve.

    New Payment

    curl --request POST \
      --url 'https://api.rebill.to/v1/payments/new' \
      --header 'Authorization: JWT eyJhbGciOiJIUzI1NiJ9.eyJpZCI6OSwicGFzc3dvcmQiOiIkMmEkMTAkcjdGQXlFNGZicnc1MEtWTkw0elJ4ZWxjaFdlREVwSDBYaUxNeFlPLlhDODR6RGkvWk9mcUsifQ.WJ_ijzdSYqPU8XqXRlDiR2YlSVhpijIPCU6aQFGSBOM' \
      --header 'Content-Type: application/x-www-form-urlencoded' \
      --data 'planID=4312&subscriptionID=34&creation=01%2F03%2F2018&debit_date=03%2F01%2F2020&amount=20&setup_fee=30&currencyID=ARS'
    
    var qs = require("querystring");
    var http = require("http");
    
    var options = {
      "method": "POST",
      "hostname": [
        "https://api.rebill.to"
      ],
      "path": [
        "v1",
        "payments",
        "new"
      ],
      "headers": {
        "Content-Type": "application/x-www-form-urlencoded",
        "Authorization": "JWT eyJhbGciOiJIUzI1NiJ9.eyJpZCI6OSwicGFzc3dvcmQiOiIkMmEkMTAkcjdGQXlFNGZicnc1MEtWTkw0elJ4ZWxjaFdlREVwSDBYaUxNeFlPLlhDODR6RGkvWk9mcUsifQ.WJ_ijzdSYqPU8XqXRlDiR2YlSVhpijIPCU6aQFGSBOM"
      }
    };
    
    var req = http.request(options, function (res) {
      var chunks = [];
    
      res.on("data", function (chunk) {
        chunks.push(chunk);
      });
    
      res.on("end", function () {
        var body = Buffer.concat(chunks);
        console.log(body.toString());
      });
    });
    
    req.write(qs.stringify({ planID: '4312',
      subscriptionID: '34',
      creation: '01/03/2018',
      debit_date: '03/01/2020',
      amount: '20',
      setup_fee: '30',
      currencyID: 'ARS' }));
    req.end();
    
    require 'uri'
    require 'net/http'
    
    url = URI("https://api.rebill.to/v1/payments/new")
    
    http = Net::HTTP.new(url.host, url.port)
    
    request = Net::HTTP::Post.new(url)
    request["Content-Type"] = 'application/x-www-form-urlencoded'
    request["Authorization"] = 'JWT eyJhbGciOiJIUzI1NiJ9.eyJpZCI6OSwicGFzc3dvcmQiOiIkMmEkMTAkcjdGQXlFNGZicnc1MEtWTkw0elJ4ZWxjaFdlREVwSDBYaUxNeFlPLlhDODR6RGkvWk9mcUsifQ.WJ_ijzdSYqPU8XqXRlDiR2YlSVhpijIPCU6aQFGSBOM'
    request.body = "planID=4312&subscriptionID=34&creation=01%2F03%2F2018&debit_date=03%2F01%2F2020&amount=20&setup_fee=30&currencyID=ARS"
    
    response = http.request(request)
    puts response.read_body
    
    import requests
    
    url = "https://api.rebill.to/v1/payments/new"
    
    payload = "planID=4312&subscriptionID=34&creation=01%2F03%2F2018&debit_date=03%2F01%2F2020&amount=20&setup_fee=30&currencyID=ARS"
    headers = {
        'Content-Type': "application/x-www-form-urlencoded",
        'Authorization': "JWT eyJhbGciOiJIUzI1NiJ9.eyJpZCI6OSwicGFzc3dvcmQiOiIkMmEkMTAkcjdGQXlFNGZicnc1MEtWTkw0elJ4ZWxjaFdlREVwSDBYaUxNeFlPLlhDODR6RGkvWk9mcUsifQ.WJ_ijzdSYqPU8XqXRlDiR2YlSVhpijIPCU6aQFGSBOM"
        }
    
    response = requests.request("POST", url, data=payload, headers=headers)
    
    print(response.text)
    
    <?php
    
    $curl = curl_init();
    
    curl_setopt_array($curl, array(
      CURLOPT_URL => "https://api.rebill.to/v1/payments/new",
      CURLOPT_RETURNTRANSFER => true,
      CURLOPT_ENCODING => "",
      CURLOPT_MAXREDIRS => 10,
      CURLOPT_TIMEOUT => 30,
      CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
      CURLOPT_CUSTOMREQUEST => "POST",
      CURLOPT_POSTFIELDS => "planID=4312&subscriptionID=34&creation=01%2F03%2F2018&debit_date=03%2F01%2F2020&amount=20&setup_fee=30&currencyID=ARS",
      CURLOPT_HTTPHEADER => array(
        "Authorization: JWT eyJhbGciOiJIUzI1NiJ9.eyJpZCI6OSwicGFzc3dvcmQiOiIkMmEkMTAkcjdGQXlFNGZicnc1MEtWTkw0elJ4ZWxjaFdlREVwSDBYaUxNeFlPLlhDODR6RGkvWk9mcUsifQ.WJ_ijzdSYqPU8XqXRlDiR2YlSVhpijIPCU6aQFGSBOM",
        "Content-Type: application/x-www-form-urlencoded"
      ),
    ));
    
    $response = curl_exec($curl);
    $err = curl_error($curl);
    
    curl_close($curl);
    
    if ($err) {
      echo "cURL Error #:" . $err;
    } else {
      echo $response;
    }
    
    package main
    
    import (
        "fmt"
        "strings"
        "net/http"
        "io/ioutil"
    )
    
    func main() {
    
        url := "https://api.rebill.to/v1/payments/new"
    
        payload := strings.NewReader("planID=4312&subscriptionID=34&creation=01%2F03%2F2018&debit_date=03%2F01%2F2020&amount=20&setup_fee=30&currencyID=ARS")
    
        req, _ := http.NewRequest("POST", url, payload)
    
        req.Header.Add("Content-Type", "application/x-www-form-urlencoded")
        req.Header.Add("Authorization", "JWT eyJhbGciOiJIUzI1NiJ9.eyJpZCI6OSwicGFzc3dvcmQiOiIkMmEkMTAkcjdGQXlFNGZicnc1MEtWTkw0elJ4ZWxjaFdlREVwSDBYaUxNeFlPLlhDODR6RGkvWk9mcUsifQ.WJ_ijzdSYqPU8XqXRlDiR2YlSVhpijIPCU6aQFGSBOM")
    
        res, _ := http.DefaultClient.Do(req)
    
        defer res.Body.Close()
        body, _ := ioutil.ReadAll(res.Body)
    
        fmt.Println(res)
        fmt.Println(string(body))
    
    }
    

    HTTP Request

    POST https://api.rebill.to/v1/payments/new

    Header Content
    Content-Type application/x-www-form-urlencoded
    Authorization JWT eyJhbGciOiJIUzI1NiJ9.eyJpZCI6OSwicGFzc3dvcmQiOiIkMmEkMTAkcjdGQXlFNGZicnc1MEtWTkw0elJ4ZWxjaFdlREVwSDBYaUxNeFlPLlhDODR6RGkvWk9mcUsifQ.WJ_ijzdSYqPU8XqXRlDiR2YlSVhpijIPCU6aQFGSBOM

    URL Parameters

    Header Content
    planID Plan ID related to this payment.
    subscriptionID Subscription ID related to this payment.
    creation Creation TIMESTAMP of this payment.
    debit_date First debit date (TIMESTAMP) of this payment.
    amount Amount charged.
    currencyID ARS corresponding to Argentine Pesos.
    setup_fee 30

    Update Payment

    curl --request POST \
      --url 'https://api.rebill.to/v1/payments/update' \
      --header 'Authorization: JWT eyJhbGciOiJIUzI1NiJ9.eyJpZCI6OSwicGFzc3dvcmQiOiIkMmEkMTAkcjdGQXlFNGZicnc1MEtWTkw0elJ4ZWxjaFdlREVwSDBYaUxNeFlPLlhDODR6RGkvWk9mcUsifQ.WJ_ijzdSYqPU8XqXRlDiR2YlSVhpijIPCU6aQFGSBOM' \
      --data 'id=4&planID=431123123&subscriptionID=34123123&creation=01%2F03%2F2018&debit_date=03%2F01%2F2020&amount=20&setup_fee=300&currencyID=ARS'
    
    var qs = require("querystring");
    var http = require("http");
    
    var options = {
      "method": "POST",
      "hostname": [
        "https://api.rebill.to"
      ],
      "path": [
        "v1",
        "payments",
        "update"
      ],
      "headers": {
        "Authorization": "JWT eyJhbGciOiJIUzI1NiJ9.eyJpZCI6OSwicGFzc3dvcmQiOiIkMmEkMTAkcjdGQXlFNGZicnc1MEtWTkw0elJ4ZWxjaFdlREVwSDBYaUxNeFlPLlhDODR6RGkvWk9mcUsifQ.WJ_ijzdSYqPU8XqXRlDiR2YlSVhpijIPCU6aQFGSBOM"
      }
    };
    
    var req = http.request(options, function (res) {
      var chunks = [];
    
      res.on("data", function (chunk) {
        chunks.push(chunk);
      });
    
      res.on("end", function () {
        var body = Buffer.concat(chunks);
        console.log(body.toString());
      });
    });
    
    req.write(qs.stringify({ id: '4',
      planID: '431123123',
      subscriptionID: '34123123',
      creation: '01/03/2018',
      debit_date: '03/01/2020',
      amount: '20',
      setup_fee: '300',
      currencyID: 'ARS' }));
    req.end();
    
    require 'uri'
    require 'net/http'
    
    url = URI("https://api.rebill.to/v1/payments/update")
    
    http = Net::HTTP.new(url.host, url.port)
    
    request = Net::HTTP::Post.new(url)
    request["Authorization"] = 'JWT eyJhbGciOiJIUzI1NiJ9.eyJpZCI6OSwicGFzc3dvcmQiOiIkMmEkMTAkcjdGQXlFNGZicnc1MEtWTkw0elJ4ZWxjaFdlREVwSDBYaUxNeFlPLlhDODR6RGkvWk9mcUsifQ.WJ_ijzdSYqPU8XqXRlDiR2YlSVhpijIPCU6aQFGSBOM'
    request.body = "id=4&planID=431123123&subscriptionID=34123123&creation=01%2F03%2F2018&debit_date=03%2F01%2F2020&amount=20&setup_fee=300&currencyID=ARS"
    
    response = http.request(request)
    puts response.read_body
    
    import requests
    
    url = "https://api.rebill.to/v1/payments/update"
    
    payload = "id=4&planID=431123123&subscriptionID=34123123&creation=01%2F03%2F2018&debit_date=03%2F01%2F2020&amount=20&setup_fee=300&currencyID=ARS"
    headers = {'Authorization': 'JWT eyJhbGciOiJIUzI1NiJ9.eyJpZCI6OSwicGFzc3dvcmQiOiIkMmEkMTAkcjdGQXlFNGZicnc1MEtWTkw0elJ4ZWxjaFdlREVwSDBYaUxNeFlPLlhDODR6RGkvWk9mcUsifQ.WJ_ijzdSYqPU8XqXRlDiR2YlSVhpijIPCU6aQFGSBOM'}
    
    response = requests.request("POST", url, data=payload, headers=headers)
    
    print(response.text)
    
    <?php
    
    $curl = curl_init();
    
    curl_setopt_array($curl, array(
      CURLOPT_URL => "https://api.rebill.to/v1/payments/update",
      CURLOPT_RETURNTRANSFER => true,
      CURLOPT_ENCODING => "",
      CURLOPT_MAXREDIRS => 10,
      CURLOPT_TIMEOUT => 30,
      CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
      CURLOPT_CUSTOMREQUEST => "POST",
      CURLOPT_POSTFIELDS => "id=4&planID=431123123&subscriptionID=34123123&creation=01%2F03%2F2018&debit_date=03%2F01%2F2020&amount=20&setup_fee=300&currencyID=ARS",
      CURLOPT_HTTPHEADER => array(
        "Authorization: JWT eyJhbGciOiJIUzI1NiJ9.eyJpZCI6OSwicGFzc3dvcmQiOiIkMmEkMTAkcjdGQXlFNGZicnc1MEtWTkw0elJ4ZWxjaFdlREVwSDBYaUxNeFlPLlhDODR6RGkvWk9mcUsifQ.WJ_ijzdSYqPU8XqXRlDiR2YlSVhpijIPCU6aQFGSBOM"
      ),
    ));
    
    $response = curl_exec($curl);
    $err = curl_error($curl);
    
    curl_close($curl);
    
    if ($err) {
      echo "cURL Error #:" . $err;
    } else {
      echo $response;
    }
    
    package main
    
    import (
        "fmt"
        "strings"
        "net/http"
        "io/ioutil"
    )
    
    func main() {
    
        url := "https://api.rebill.to/v1/payments/update"
    
        payload := strings.NewReader("id=4&planID=431123123&subscriptionID=34123123&creation=01%2F03%2F2018&debit_date=03%2F01%2F2020&amount=20&setup_fee=300&currencyID=ARS")
    
        req, _ := http.NewRequest("POST", url, payload)
    
        req.Header.Add("Authorization", "JWT eyJhbGciOiJIUzI1NiJ9.eyJpZCI6OSwicGFzc3dvcmQiOiIkMmEkMTAkcjdGQXlFNGZicnc1MEtWTkw0elJ4ZWxjaFdlREVwSDBYaUxNeFlPLlhDODR6RGkvWk9mcUsifQ.WJ_ijzdSYqPU8XqXRlDiR2YlSVhpijIPCU6aQFGSBOM")
    
        res, _ := http.DefaultClient.Do(req)
    
        defer res.Body.Close()
        body, _ := ioutil.ReadAll(res.Body)
    
        fmt.Println(res)
        fmt.Println(string(body))
    
    }
    

    HTTP Request

    POST https://api.rebill.to/v1/payments/update

    Header Content
    Content-Type application/x-www-form-urlencoded
    Authorization JWT eyJhbGciOiJIUzI1NiJ9.eyJpZCI6OSwicGFzc3dvcmQiOiIkMmEkMTAkcjdGQXlFNGZicnc1MEtWTkw0elJ4ZWxjaFdlREVwSDBYaUxNeFlPLlhDODR6RGkvWk9mcUsifQ.WJ_ijzdSYqPU8XqXRlDiR2YlSVhpijIPCU6aQFGSBOM

    BODY Parameters

    Header Content
    planID Plan ID related to this payment.
    subscriptionID Subscription ID related to this payment.
    creation Creation TIMESTAMP of this payment.
    debit_date First debit date (TIMESTAMP) of this payment.
    amount Amount charged.
    currencyID ARS corresponding to Argentine Pesos.
    setup_fee 30

    Delete Payment

    curl --request DELETE \
      --url 'https://api.rebill.to/v1/payments/delete/subscriptionID/34' \
      --header 'Authorization: JWT eyJhbGciOiJIUzI1NiJ9.eyJpZCI6MSwicGFzc3dvcmQiOiIkMmEkMTAkUzBCUk5TcWdBUTVDODVwa1cuSVpQZVZQeW95dWUxbDNQeko4MjVjcGRkVjMuOWxrT052ajYifQ.rD9kYRH6Q7VKYAuvxl0VL0b1JQwLMaDHArntRoVugrc' \
      --header 'Content-Type: application/json'
    
    var http = require("http");
    
    var options = {
      "method": "DELETE",
      "hostname": [
        "https://api.rebill.to"
      ],
      "path": [
        "v1",
        "payments",
        "delete",
        "subscriptionID",
        "34"
      ],
      "headers": {
        "Content-Type": "application/json",
        "Authorization": "JWT eyJhbGciOiJIUzI1NiJ9.eyJpZCI6MSwicGFzc3dvcmQiOiIkMmEkMTAkUzBCUk5TcWdBUTVDODVwa1cuSVpQZVZQeW95dWUxbDNQeko4MjVjcGRkVjMuOWxrT052ajYifQ.rD9kYRH6Q7VKYAuvxl0VL0b1JQwLMaDHArntRoVugrc"
      }
    };
    
    var req = http.request(options, function (res) {
      var chunks = [];
    
      res.on("data", function (chunk) {
        chunks.push(chunk);
      });
    
      res.on("end", function () {
        var body = Buffer.concat(chunks);
        console.log(body.toString());
      });
    });
    
    req.end();
    
    require 'uri'
    require 'net/http'
    
    url = URI("https://api.rebill.to/v1/payments/delete/subscriptionID/34")
    
    http = Net::HTTP.new(url.host, url.port)
    
    request = Net::HTTP::Delete.new(url)
    request["Content-Type"] = 'application/json'
    request["Authorization"] = 'JWT eyJhbGciOiJIUzI1NiJ9.eyJpZCI6MSwicGFzc3dvcmQiOiIkMmEkMTAkUzBCUk5TcWdBUTVDODVwa1cuSVpQZVZQeW95dWUxbDNQeko4MjVjcGRkVjMuOWxrT052ajYifQ.rD9kYRH6Q7VKYAuvxl0VL0b1JQwLMaDHArntRoVugrc'
    
    response = http.request(request)
    puts response.read_body
    
    import requests
    
    url = "https://api.rebill.to/v1/payments/delete/subscriptionID/34"
    
    headers = {
        'Content-Type': "application/json",
        'Authorization': "JWT eyJhbGciOiJIUzI1NiJ9.eyJpZCI6MSwicGFzc3dvcmQiOiIkMmEkMTAkUzBCUk5TcWdBUTVDODVwa1cuSVpQZVZQeW95dWUxbDNQeko4MjVjcGRkVjMuOWxrT052ajYifQ.rD9kYRH6Q7VKYAuvxl0VL0b1JQwLMaDHArntRoVugrc"
        }
    
    response = requests.request("DELETE", url, headers=headers)
    
    print(response.text)
    
    <?php
    
    $curl = curl_init();
    
    curl_setopt_array($curl, array(
      CURLOPT_URL => "https://api.rebill.to/v1/payments/delete/subscriptionID/34",
      CURLOPT_RETURNTRANSFER => true,
      CURLOPT_ENCODING => "",
      CURLOPT_MAXREDIRS => 10,
      CURLOPT_TIMEOUT => 30,
      CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
      CURLOPT_CUSTOMREQUEST => "DELETE",
      CURLOPT_HTTPHEADER => array(
        "Authorization: JWT eyJhbGciOiJIUzI1NiJ9.eyJpZCI6MSwicGFzc3dvcmQiOiIkMmEkMTAkUzBCUk5TcWdBUTVDODVwa1cuSVpQZVZQeW95dWUxbDNQeko4MjVjcGRkVjMuOWxrT052ajYifQ.rD9kYRH6Q7VKYAuvxl0VL0b1JQwLMaDHArntRoVugrc",
        "Content-Type: application/json"
      ),
    ));
    
    $response = curl_exec($curl);
    $err = curl_error($curl);
    
    curl_close($curl);
    
    if ($err) {
      echo "cURL Error #:" . $err;
    } else {
      echo $response;
    }
    
    package main
    
    import (
        "fmt"
        "net/http"
        "io/ioutil"
    )
    
    func main() {
    
        url := "https://api.rebill.to/v1/payments/delete/subscriptionID/34"
    
        req, _ := http.NewRequest("DELETE", url, nil)
    
        req.Header.Add("Content-Type", "application/json")
        req.Header.Add("Authorization", "JWT eyJhbGciOiJIUzI1NiJ9.eyJpZCI6MSwicGFzc3dvcmQiOiIkMmEkMTAkUzBCUk5TcWdBUTVDODVwa1cuSVpQZVZQeW95dWUxbDNQeko4MjVjcGRkVjMuOWxrT052ajYifQ.rD9kYRH6Q7VKYAuvxl0VL0b1JQwLMaDHArntRoVugrc")
    
        res, _ := http.DefaultClient.Do(req)
    
        defer res.Body.Close()
        body, _ := ioutil.ReadAll(res.Body)
    
        fmt.Println(res)
        fmt.Println(string(body))
    
    }
    

    HTTP Request

    DELETE https://api.rebill.to/v1/payments/delete/:type/:id

    Header Content
    Content-Type application/json
    Authorization JWT eyJhbGciOiJIUzI1NiJ9.eyJpZCI6OSwicGFzc3dvcmQiOiIkMmEkMTAkcjdGQXlFNGZicnc1MEtWTkw0elJ4ZWxjaFdlREVwSDBYaUxNeFlPLlhDODR6RGkvWk9mcUsifQ.WJ_ijzdSYqPU8XqXRlDiR2YlSVhpijIPCU6aQFGSBOM

    BODY Parameters

    Header Content
    :type Find by paymentID or subscriptionID.
    :id ID of the payment to retrieve.

    Plans

    Get All Plans

    curl --request GET \
      --url 'https://api.rebill.to/v1/plans/all' \
      --header 'Authorization: JWT eyJhbGciOiJIUzI1NiJ9.eyJpZCI6OSwicGFzc3dvcmQiOiIkMmEkMTAkcjdGQXlFNGZicnc1MEtWTkw0elJ4ZWxjaFdlREVwSDBYaUxNeFlPLlhDODR6RGkvWk9mcUsifQ.WJ_ijzdSYqPU8XqXRlDiR2YlSVhpijIPCU6aQFGSBOM'
    
    var http = require("http");
    
    var options = {
      "method": "GET",
      "hostname": [
        "https://api.rebill.to"
      ],
      "path": [
        "v1",
        "plans",
        "all"
      ],
      "headers": {
        "Authorization": "JWT eyJhbGciOiJIUzI1NiJ9.eyJpZCI6OSwicGFzc3dvcmQiOiIkMmEkMTAkcjdGQXlFNGZicnc1MEtWTkw0elJ4ZWxjaFdlREVwSDBYaUxNeFlPLlhDODR6RGkvWk9mcUsifQ.WJ_ijzdSYqPU8XqXRlDiR2YlSVhpijIPCU6aQFGSBOM"
      }
    };
    
    var req = http.request(options, function (res) {
      var chunks = [];
    
      res.on("data", function (chunk) {
        chunks.push(chunk);
      });
    
      res.on("end", function () {
        var body = Buffer.concat(chunks);
        console.log(body.toString());
      });
    });
    
    req.end();
    
    require 'uri'
    require 'net/http'
    
    url = URI("https://api.rebill.to/v1/plans/all")
    
    http = Net::HTTP.new(url.host, url.port)
    
    request = Net::HTTP::Get.new(url)
    request["Authorization"] = 'JWT eyJhbGciOiJIUzI1NiJ9.eyJpZCI6OSwicGFzc3dvcmQiOiIkMmEkMTAkcjdGQXlFNGZicnc1MEtWTkw0elJ4ZWxjaFdlREVwSDBYaUxNeFlPLlhDODR6RGkvWk9mcUsifQ.WJ_ijzdSYqPU8XqXRlDiR2YlSVhpijIPCU6aQFGSBOM'
    
    response = http.request(request)
    puts response.read_body
    
    import requests
    
    url = "https://api.rebill.to/v1/plans/all"
    
    headers = {'Authorization': 'JWT eyJhbGciOiJIUzI1NiJ9.eyJpZCI6OSwicGFzc3dvcmQiOiIkMmEkMTAkcjdGQXlFNGZicnc1MEtWTkw0elJ4ZWxjaFdlREVwSDBYaUxNeFlPLlhDODR6RGkvWk9mcUsifQ.WJ_ijzdSYqPU8XqXRlDiR2YlSVhpijIPCU6aQFGSBOM'}
    
    response = requests.request("GET", url, headers=headers)
    
    print(response.text)
    
    <?php
    
    $curl = curl_init();
    
    curl_setopt_array($curl, array(
      CURLOPT_URL => "https://api.rebill.to/v1/plans/all",
      CURLOPT_RETURNTRANSFER => true,
      CURLOPT_ENCODING => "",
      CURLOPT_MAXREDIRS => 10,
      CURLOPT_TIMEOUT => 30,
      CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
      CURLOPT_CUSTOMREQUEST => "GET",
      CURLOPT_HTTPHEADER => array(
        "Authorization: JWT eyJhbGciOiJIUzI1NiJ9.eyJpZCI6OSwicGFzc3dvcmQiOiIkMmEkMTAkcjdGQXlFNGZicnc1MEtWTkw0elJ4ZWxjaFdlREVwSDBYaUxNeFlPLlhDODR6RGkvWk9mcUsifQ.WJ_ijzdSYqPU8XqXRlDiR2YlSVhpijIPCU6aQFGSBOM"
      ),
    ));
    
    $response = curl_exec($curl);
    $err = curl_error($curl);
    
    curl_close($curl);
    
    if ($err) {
      echo "cURL Error #:" . $err;
    } else {
      echo $response;
    }
    
    package main
    
    import (
        "fmt"
        "net/http"
        "io/ioutil"
    )
    
    func main() {
    
        url := "https://api.rebill.to/v1/plans/all"
    
        req, _ := http.NewRequest("GET", url, nil)
    
        req.Header.Add("Authorization", "JWT eyJhbGciOiJIUzI1NiJ9.eyJpZCI6OSwicGFzc3dvcmQiOiIkMmEkMTAkcjdGQXlFNGZicnc1MEtWTkw0elJ4ZWxjaFdlREVwSDBYaUxNeFlPLlhDODR6RGkvWk9mcUsifQ.WJ_ijzdSYqPU8XqXRlDiR2YlSVhpijIPCU6aQFGSBOM")
    
        res, _ := http.DefaultClient.Do(req)
    
        defer res.Body.Close()
        body, _ := ioutil.ReadAll(res.Body)
    
        fmt.Println(res)
        fmt.Println(string(body))
    
    }
    

    HTTP Request

    GET https://api.rebill.to/v1/plans/all

    Header Content
    Authorization JWT eyJhbGciOiJIUzI1NiJ9.eyJpZCI6OSwicGFzc3dvcmQiOiIkMmEkMTAkcjdGQXlFNGZicnc1MEtWTkw0elJ4ZWxjaFdlREVwSDBYaUxNeFlPLlhDODR6RGkvWk9mcUsifQ.WJ_ijzdSYqPU8XqXRlDiR2YlSVhpijIPCU6aQFGSBOM
    Content-type application/json

    Get a Specific Plan

    curl --request GET \
      --url 'https://api.rebill.to/v1/plans/mpPlanID/43' \
      --header 'Authorization: JWT eyJhbGciOiJIUzI1NiJ9.eyJpZCI6OSwicGFzc3dvcmQiOiIkMmEkMTAkcjdGQXlFNGZicnc1MEtWTkw0elJ4ZWxjaFdlREVwSDBYaUxNeFlPLlhDODR6RGkvWk9mcUsifQ.WJ_ijzdSYqPU8XqXRlDiR2YlSVhpijIPCU6aQFGSBOM'
    
    var http = require("http");
    
    var options = {
      "method": "GET",
      "hostname": [
        "https://api.rebill.to"
      ],
      "path": [
        "v1",
        "plans",
        "mpPlanID",
        "43"
      ],
      "headers": {
        "Authorization": "JWT eyJhbGciOiJIUzI1NiJ9.eyJpZCI6OSwicGFzc3dvcmQiOiIkMmEkMTAkcjdGQXlFNGZicnc1MEtWTkw0elJ4ZWxjaFdlREVwSDBYaUxNeFlPLlhDODR6RGkvWk9mcUsifQ.WJ_ijzdSYqPU8XqXRlDiR2YlSVhpijIPCU6aQFGSBOM"
      }
    };
    
    var req = http.request(options, function (res) {
      var chunks = [];
    
      res.on("data", function (chunk) {
        chunks.push(chunk);
      });
    
      res.on("end", function () {
        var body = Buffer.concat(chunks);
        console.log(body.toString());
      });
    });
    
    req.end();
    
    require 'uri'
    require 'net/http'
    
    url = URI("https://api.rebill.to/v1/plans/mpPlanID/43")
    
    http = Net::HTTP.new(url.host, url.port)
    
    request = Net::HTTP::Get.new(url)
    request["Authorization"] = 'JWT eyJhbGciOiJIUzI1NiJ9.eyJpZCI6OSwicGFzc3dvcmQiOiIkMmEkMTAkcjdGQXlFNGZicnc1MEtWTkw0elJ4ZWxjaFdlREVwSDBYaUxNeFlPLlhDODR6RGkvWk9mcUsifQ.WJ_ijzdSYqPU8XqXRlDiR2YlSVhpijIPCU6aQFGSBOM'
    
    response = http.request(request)
    puts response.read_body
    
    import requests
    
    url = "https://api.rebill.to/v1/plans/mpPlanID/43"
    
    headers = {'Authorization': 'JWT eyJhbGciOiJIUzI1NiJ9.eyJpZCI6OSwicGFzc3dvcmQiOiIkMmEkMTAkcjdGQXlFNGZicnc1MEtWTkw0elJ4ZWxjaFdlREVwSDBYaUxNeFlPLlhDODR6RGkvWk9mcUsifQ.WJ_ijzdSYqPU8XqXRlDiR2YlSVhpijIPCU6aQFGSBOM'}
    
    response = requests.request("GET", url, headers=headers)
    
    print(response.text)
    
    <?php
    
    $curl = curl_init();
    
    curl_setopt_array($curl, array(
      CURLOPT_URL => "https://api.rebill.to/v1/plans/mpPlanID/43",
      CURLOPT_RETURNTRANSFER => true,
      CURLOPT_ENCODING => "",
      CURLOPT_MAXREDIRS => 10,
      CURLOPT_TIMEOUT => 30,
      CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
      CURLOPT_CUSTOMREQUEST => "GET",
      CURLOPT_HTTPHEADER => array(
        "Authorization: JWT eyJhbGciOiJIUzI1NiJ9.eyJpZCI6OSwicGFzc3dvcmQiOiIkMmEkMTAkcjdGQXlFNGZicnc1MEtWTkw0elJ4ZWxjaFdlREVwSDBYaUxNeFlPLlhDODR6RGkvWk9mcUsifQ.WJ_ijzdSYqPU8XqXRlDiR2YlSVhpijIPCU6aQFGSBOM"
      ),
    ));
    
    $response = curl_exec($curl);
    $err = curl_error($curl);
    
    curl_close($curl);
    
    if ($err) {
      echo "cURL Error #:" . $err;
    } else {
      echo $response;
    }
    
    package main
    
    import (
        "fmt"
        "net/http"
        "io/ioutil"
    )
    
    func main() {
    
        url := "https://api.rebill.to/v1/plans/mpPlanID/43"
    
        req, _ := http.NewRequest("GET", url, nil)
    
        req.Header.Add("Authorization", "JWT eyJhbGciOiJIUzI1NiJ9.eyJpZCI6OSwicGFzc3dvcmQiOiIkMmEkMTAkcjdGQXlFNGZicnc1MEtWTkw0elJ4ZWxjaFdlREVwSDBYaUxNeFlPLlhDODR6RGkvWk9mcUsifQ.WJ_ijzdSYqPU8XqXRlDiR2YlSVhpijIPCU6aQFGSBOM")
    
        res, _ := http.DefaultClient.Do(req)
    
        defer res.Body.Close()
        body, _ := ioutil.ReadAll(res.Body)
    
        fmt.Println(res)
        fmt.Println(string(body))
    
    }
    

    HTTP Request

    GET https://api.rebill.to/v1/plans/:type/:id

    Header Content
    Authorization JWT eyJhbGciOiJIUzI1NiJ9.eyJpZCI6OSwicGFzc3dvcmQiOiIkMmEkMTAkcjdGQXlFNGZicnc1MEtWTkw0elJ4ZWxjaFdlREVwSDBYaUxNeFlPLlhDODR6RGkvWk9mcUsifQ.WJ_ijzdSYqPU8XqXRlDiR2YlSVhpijIPCU6aQFGSBOM
    Content-type application/json

    URL Parameters

    Parameter Description
    :type Retrieve the Plan by planID or mpPlanID.
    :id ID of the Plan to Retrieve.

    Products

    Request Example
    
    
    Request Example
    
    
    Request Example
    
    
    Request Example
    
    
    Request Example
    
    
    Request Example
    
    

    Note that the username and password shall be sent using Basic Authentication. This means that both components shall be sent in base64 format. Your e-mail is your username.

    HTTP Request

    GET https://api.rebill.to/v1/getToken

    Header Content Required Description
    Content-Type application/json Yes Can also be sent as application/x-www-form-urlencoded
    Authorization Basic base64_hash Yes Your username and password in base64.
    Response Example
    
    

    Regions

    Get All Plans

    
    
    
    
    
    
    
    
    
    

    HTTP Request

    GET https://api.rebill.to/v1/plans/all

    Header Content
    Authorization JWT eyJhbGciOiJIUzI1NiJ9.eyJpZCI6OSwicGFzc3dvcmQiOiIkMmEkMTAkcjdGQXlFNGZicnc1MEtWTkw0elJ4ZWxjaFdlREVwSDBYaUxNeFlPLlhDODR6RGkvWk9mcUsifQ.WJ_ijzdSYqPU8XqXRlDiR2YlSVhpijIPCU6aQFGSBOM
    Content-type application/json

    URL Parameters

    Parameter Description
    :type Retrieve the Plan by planID or mpPlanID.
    :id ID of the Plan to Retrieve.

    Regions

    Get All Plans

    
    
    
    
    
    
    
    
    
    

    HTTP Request

    GET https://api.rebill.to/v1/plans/all

    Header Content
    Authorization JWT eyJhbGciOiJIUzI1NiJ9.eyJpZCI6OSwicGFzc3dvcmQiOiIkMmEkMTAkcjdGQXlFNGZicnc1MEtWTkw0elJ4ZWxjaFdlREVwSDBYaUxNeFlPLlhDODR6RGkvWk9mcUsifQ.WJ_ijzdSYqPU8XqXRlDiR2YlSVhpijIPCU6aQFGSBOM
    Content-type application/json

    URL Parameters

    Parameter Description
    :type Retrieve the Plan by planID or mpPlanID.
    :id ID of the Plan to Retrieve.

    Roles and Permissions

    Request Example
    
    
    Request Example
    
    
    Request Example
    
    
    Request Example
    
    
    Request Example
    
    
    Request Example
    
    

    Note that the username and password shall be sent using Basic Authentication. This means that both components shall be sent in base64 format. Your e-mail is your username.

    HTTP Request

    GET https://api.rebill.to/v1/getToken

    Header Content Required Description
    Content-Type application/json Yes Can also be sent as application/x-www-form-urlencoded
    Authorization Basic base64_hash Yes Your username and password in base64.
    Response Example
    
    

    Subscriptions

    Get All Subscriptions

    curl --request GET \
      --url 'https://api.rebill.to/v1/subscriptions/all' \
      --header 'Authorization: JWT eyJhbGciOiJIUzI1NiJ9.eyJpZCI6MSwicGFzc3dvcmQiOiIkMmEkMTAkUzBCUk5TcWdBUTVDODVwa1cuSVpQZVZQeW95dWUxbDNQeko4MjVjcGRkVjMuOWxrT052ajYifQ.rD9kYRH6Q7VKYAuvxl0VL0b1JQwLMaDHArntRoVugrc'
    
    var http = require("http");
    
    var options = {
      "method": "GET",
      "hostname": [
        "https://api.rebill.to"
      ],
      "path": [
        "v1",
        "subscriptions",
        "subscriptionid",
        "3"
      ],
      "headers": {
        "Authorization": "JWT eyJhbGciOiJIUzI1NiJ9.eyJpZCI6OSwicGFzc3dvcmQiOiIkMmEkMTAkcjdGQXlFNGZicnc1MEtWTkw0elJ4ZWxjaFdlREVwSDBYaUxNeFlPLlhDODR6RGkvWk9mcUsifQ.WJ_ijzdSYqPU8XqXRlDiR2YlSVhpijIPCU6aQFGSBOM"
      }
    };
    
    var req = http.request(options, function (res) {
      var chunks = [];
    
      res.on("data", function (chunk) {
        chunks.push(chunk);
      });
    
      res.on("end", function () {
        var body = Buffer.concat(chunks);
        console.log(body.toString());
      });
    });
    
    req.end();
    
    require 'uri'
    require 'net/http'
    
    url = URI("https://api.rebill.to/v1/subscriptions/all")
    
    http = Net::HTTP.new(url.host, url.port)
    
    request = Net::HTTP::Get.new(url)
    request["Authorization"] = 'JWT eyJhbGciOiJIUzI1NiJ9.eyJpZCI6MSwicGFzc3dvcmQiOiIkMmEkMTAkUzBCUk5TcWdBUTVDODVwa1cuSVpQZVZQeW95dWUxbDNQeko4MjVjcGRkVjMuOWxrT052ajYifQ.rD9kYRH6Q7VKYAuvxl0VL0b1JQwLMaDHArntRoVugrc'
    
    response = http.request(request)
    puts response.read_body
    
    import requests
    
    url = "https://api.rebill.to/v1/subscriptions/all"
    
    headers = {'Authorization': 'JWT eyJhbGciOiJIUzI1NiJ9.eyJpZCI6MSwicGFzc3dvcmQiOiIkMmEkMTAkUzBCUk5TcWdBUTVDODVwa1cuSVpQZVZQeW95dWUxbDNQeko4MjVjcGRkVjMuOWxrT052ajYifQ.rD9kYRH6Q7VKYAuvxl0VL0b1JQwLMaDHArntRoVugrc'}
    
    response = requests.request("GET", url, headers=headers)
    
    print(response.text)
    
    <?php
    
    $curl = curl_init();
    
    curl_setopt_array($curl, array(
      CURLOPT_URL => "https://api.rebill.to/v1/subscriptions/all",
      CURLOPT_RETURNTRANSFER => true,
      CURLOPT_ENCODING => "",
      CURLOPT_MAXREDIRS => 10,
      CURLOPT_TIMEOUT => 30,
      CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
      CURLOPT_CUSTOMREQUEST => "GET",
      CURLOPT_HTTPHEADER => array(
        "Authorization: JWT eyJhbGciOiJIUzI1NiJ9.eyJpZCI6MSwicGFzc3dvcmQiOiIkMmEkMTAkUzBCUk5TcWdBUTVDODVwa1cuSVpQZVZQeW95dWUxbDNQeko4MjVjcGRkVjMuOWxrT052ajYifQ.rD9kYRH6Q7VKYAuvxl0VL0b1JQwLMaDHArntRoVugrc"
      ),
    ));
    
    $response = curl_exec($curl);
    $err = curl_error($curl);
    
    curl_close($curl);
    
    if ($err) {
      echo "cURL Error #:" . $err;
    } else {
      echo $response;
    }
    
    package main
    
    import (
        "fmt"
        "net/http"
        "io/ioutil"
    )
    
    func main() {
    
        url := "https://api.rebill.to/v1/subscriptions/all"
    
        req, _ := http.NewRequest("GET", url, nil)
    
        req.Header.Add("Authorization", "JWT eyJhbGciOiJIUzI1NiJ9.eyJpZCI6MSwicGFzc3dvcmQiOiIkMmEkMTAkUzBCUk5TcWdBUTVDODVwa1cuSVpQZVZQeW95dWUxbDNQeko4MjVjcGRkVjMuOWxrT052ajYifQ.rD9kYRH6Q7VKYAuvxl0VL0b1JQwLMaDHArntRoVugrc")
    
        res, _ := http.DefaultClient.Do(req)
    
        defer res.Body.Close()
        body, _ := ioutil.ReadAll(res.Body)
    
        fmt.Println(res)
        fmt.Println(string(body))
    
    }
    

    HTTP Request

    GET https://api.rebill.to/v1/subscriptions/all

    Header Content
    Authorization JWT eyJhbGciOiJIUzI1NiJ9.eyJpZCI6MSwicGFzc3dvcmQiOiIkMmEkMTAkUzBCUk5TcWdBUTVDODVwa1cuSVpQZVZQeW95dWUxbDNQeko4MjVjcGRkVjMuOWxrT052ajYifQ.rD9kYRH6Q7VKYAuvxl0VL0b1JQwLMaDHArntRoVugrc
    Content-type application/json

    Get a specific Subscription

    curl --request GET \
      --url 'https://api.rebill.to/v1/subscriptions/subscriptionid/3' \
      --header 'Authorization: JWT eyJhbGciOiJIUzI1NiJ9.eyJpZCI6OSwicGFzc3dvcmQiOiIkMmEkMTAkcjdGQXlFNGZicnc1MEtWTkw0elJ4ZWxjaFdlREVwSDBYaUxNeFlPLlhDODR6RGkvWk9mcUsifQ.WJ_ijzdSYqPU8XqXRlDiR2YlSVhpijIPCU6aQFGSBOM'
    
    var http = require("http");
    
    var options = {
      "method": "GET",
      "hostname": [
        "https://api.rebill.to"
      ],
      "path": [
        "v1",
        "subscriptions",
        "subscriptionid",
        "3"
      ],
      "headers": {
        "Authorization": "JWT eyJhbGciOiJIUzI1NiJ9.eyJpZCI6OSwicGFzc3dvcmQiOiIkMmEkMTAkcjdGQXlFNGZicnc1MEtWTkw0elJ4ZWxjaFdlREVwSDBYaUxNeFlPLlhDODR6RGkvWk9mcUsifQ.WJ_ijzdSYqPU8XqXRlDiR2YlSVhpijIPCU6aQFGSBOM"
      }
    };
    
    var req = http.request(options, function (res) {
      var chunks = [];
    
      res.on("data", function (chunk) {
        chunks.push(chunk);
      });
    
      res.on("end", function () {
        var body = Buffer.concat(chunks);
        console.log(body.toString());
      });
    });
    
    req.end();
    
    require 'uri'
    require 'net/http'
    
    url = URI("https://api.rebill.to/v1/subscriptions/subscriptionid/3")
    
    http = Net::HTTP.new(url.host, url.port)
    
    request = Net::HTTP::Get.new(url)
    request["Authorization"] = 'JWT eyJhbGciOiJIUzI1NiJ9.eyJpZCI6OSwicGFzc3dvcmQiOiIkMmEkMTAkcjdGQXlFNGZicnc1MEtWTkw0elJ4ZWxjaFdlREVwSDBYaUxNeFlPLlhDODR6RGkvWk9mcUsifQ.WJ_ijzdSYqPU8XqXRlDiR2YlSVhpijIPCU6aQFGSBOM'
    
    response = http.request(request)
    puts response.read_body
    
    import requests
    
    url = "https://api.rebill.to/v1/subscriptions/subscriptionid/3"
    
    headers = {'Authorization': 'JWT eyJhbGciOiJIUzI1NiJ9.eyJpZCI6OSwicGFzc3dvcmQiOiIkMmEkMTAkcjdGQXlFNGZicnc1MEtWTkw0elJ4ZWxjaFdlREVwSDBYaUxNeFlPLlhDODR6RGkvWk9mcUsifQ.WJ_ijzdSYqPU8XqXRlDiR2YlSVhpijIPCU6aQFGSBOM'}
    
    response = requests.request("GET", url, headers=headers)
    
    print(response.text)
    
    <?php
    
    $curl = curl_init();
    
    curl_setopt_array($curl, array(
      CURLOPT_URL => "https://api.rebill.to/v1/subscriptions/subscriptionid/3",
      CURLOPT_RETURNTRANSFER => true,
      CURLOPT_ENCODING => "",
      CURLOPT_MAXREDIRS => 10,
      CURLOPT_TIMEOUT => 30,
      CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
      CURLOPT_CUSTOMREQUEST => "GET",
      CURLOPT_HTTPHEADER => array(
        "Authorization: JWT eyJhbGciOiJIUzI1NiJ9.eyJpZCI6OSwicGFzc3dvcmQiOiIkMmEkMTAkcjdGQXlFNGZicnc1MEtWTkw0elJ4ZWxjaFdlREVwSDBYaUxNeFlPLlhDODR6RGkvWk9mcUsifQ.WJ_ijzdSYqPU8XqXRlDiR2YlSVhpijIPCU6aQFGSBOM"
      ),
    ));
    
    $response = curl_exec($curl);
    $err = curl_error($curl);
    
    curl_close($curl);
    
    if ($err) {
      echo "cURL Error #:" . $err;
    } else {
      echo $response;
    }
    
    package main
    
    import (
        "fmt"
        "net/http"
        "io/ioutil"
    )
    
    func main() {
    
        url := "https://api.rebill.to/v1/subscriptions/subscriptionid/3"
    
        req, _ := http.NewRequest("GET", url, nil)
    
        req.Header.Add("Authorization", "JWT eyJhbGciOiJIUzI1NiJ9.eyJpZCI6OSwicGFzc3dvcmQiOiIkMmEkMTAkcjdGQXlFNGZicnc1MEtWTkw0elJ4ZWxjaFdlREVwSDBYaUxNeFlPLlhDODR6RGkvWk9mcUsifQ.WJ_ijzdSYqPU8XqXRlDiR2YlSVhpijIPCU6aQFGSBOM")
    
        res, _ := http.DefaultClient.Do(req)
    
        defer res.Body.Close()
        body, _ := ioutil.ReadAll(res.Body)
    
        fmt.Println(res)
        fmt.Println(string(body))
    
    }
    

    HTTP Request

    GET https://api.rebill.to/v1/subscriptions/:type/;id

    Header Content
    Authorization JWT eyJhbGciOiJIUzI1NiJ9.eyJpZCI6MSwicGFzc3dvcmQiOiIkMmEkMTAkUzBCUk5TcWdBUTVDODVwa1cuSVpQZVZQeW95dWUxbDNQeko4MjVjcGRkVjMuOWxrT052ajYifQ.rD9kYRH6Q7VKYAuvxl0VL0b1JQwLMaDHArntRoVugrc
    Content-type application/json

    URL Parameters

    Parameter Description
    :type Use preapprovalid (referencing to the mercadopago preapprovalid) or subscriptionID.
    ID The ID of the subscription to retrieve.

    VAT

    Get All Plans

    
    
    
    
    
    
    
    
    
    

    HTTP Request

    GET https://api.rebill.to/v1/plans/all

    Header Content
    Authorization JWT eyJhbGciOiJIUzI1NiJ9.eyJpZCI6OSwicGFzc3dvcmQiOiIkMmEkMTAkcjdGQXlFNGZicnc1MEtWTkw0elJ4ZWxjaFdlREVwSDBYaUxNeFlPLlhDODR6RGkvWk9mcUsifQ.WJ_ijzdSYqPU8XqXRlDiR2YlSVhpijIPCU6aQFGSBOM
    Content-type application/json

    URL Parameters

    Parameter Description
    :type Retrieve the Plan by planID or mpPlanID.
    :id ID of the Plan to Retrieve.

    Title

    CURL Request Example
    
    
    Node.JS Request Example
    
    
    Ruby Request Example
    
    
    PHP Request Example
    
    
    GO Request Example
    
    
    JSON Response Example
    
    

    Some description here.

    Headers

    GET https://api.rebill.to/v1/getToken

    Header Content Required Description
    Content-Type application/json Yes Can also be sent as application/x-www-form-urlencoded
    Authorization Bearer {access_token} Yes Access token.

    Parameters

    Name Parameter Type Required Description
    something QueryString boolean No Something.
    something Path Parameter boolean No Something.

    Body

    Attribute Content Required Description
    Content-Type application/json Yes Can also be sent as application/x-www-form-urlencoded
    Authorization Basic base64_hash Yes Your username and password in base64.

    Response

    Attribute Content Always Present Description
    success boolean Yes Returns true if the performed action was success, otherwise false.
    response object Yes Contains an object with the result of the performed action if success. If an error ocurred, the response object will not exist. Check the error response format.

    Vendors

    Get All Roles

    
    
    
    
    
    
    
    
    
    

    HTTP Request

    GET https://api.rebill.to/v1/plans/all

    Header Content
    Authorization JWT eyJhbGciOiJIUzI1NiJ9.eyJpZCI6OSwicGFzc3dvcmQiOiIkMmEkMTAkcjdGQXlFNGZicnc1MEtWTkw0elJ4ZWxjaFdlREVwSDBYaUxNeFlPLlhDODR6RGkvWk9mcUsifQ.WJ_ijzdSYqPU8XqXRlDiR2YlSVhpijIPCU6aQFGSBOM
    Content-type application/json

    URL Parameters

    Parameter Description
    :type Retrieve the Plan by planID or mpPlanID.
    :id ID of the Plan to Retrieve.

    Webhooks

    Request Example
    
    
    Request Example
    
    
    Request Example
    
    
    Request Example
    
    
    Request Example
    
    
    Request Example
    
    

    Note that the username and password shall be sent using Basic Authentication. This means that both components shall be sent in base64 format. Your e-mail is your username.

    HTTP Request

    GET https://api.rebill.to/v1/getToken

    Header Content Required Description
    Content-Type application/json Yes Can also be sent as application/x-www-form-urlencoded
    Authorization Basic base64_hash Yes Your username and password in base64.
    Response Example
    
    

    Checkout Landing

    CURL Request Example
    
    
    Node.JS Request Example
    
    
    Ruby Request Example
    
    
    PHP Request Example
    
    
    GO Request Example
    
    
    JSON Response Example
    
    

    Some description here.

    Headers

    GET https://api.rebill.to/v1/getToken

    Header Content Required Description
    Content-Type application/json Yes Can also be sent as application/x-www-form-urlencoded
    Authorization Bearer {access_token} Yes Access token.

    Parameters

    Name Parameter Type Required Description
    something QueryString boolean No Something.
    something Path Parameter boolean No Something.

    Body

    Attribute Content Required Description
    Content-Type application/json Yes Can also be sent as application/x-www-form-urlencoded
    Authorization Basic base64_hash Yes Your username and password in base64.

    Response

    Attribute Content Always Present Description
    success boolean Yes Returns true if the performed action was success, otherwise false.
    response object Yes Contains an object with the result of the performed action if success. If an error ocurred, the response object will not exist. Check the error response format.

    Checkout Express

    CURL Request Example
    
    
    Node.JS Request Example
    
    
    Ruby Request Example
    
    
    PHP Request Example
    
    
    GO Request Example
    
    
    JSON Response Example
    
    

    Some description here.

    Headers

    GET https://api.rebill.to/v1/getToken

    Header Content Required Description
    Content-Type application/json Yes Can also be sent as application/x-www-form-urlencoded
    Authorization Bearer {access_token} Yes Access token.

    Parameters

    Name Parameter Type Required Description
    something QueryString boolean No Something.
    something Path Parameter boolean No Something.

    Body

    Attribute Content Required Description
    Content-Type application/json Yes Can also be sent as application/x-www-form-urlencoded
    Authorization Basic base64_hash Yes Your username and password in base64.

    Response

    Attribute Content Always Present Description
    success boolean Yes Returns true if the performed action was success, otherwise false.
    response object Yes Contains an object with the result of the performed action if success. If an error ocurred, the response object will not exist. Check the error response format.

    Common Errors Status Code

    Our API libraries raise exceptions for many reasons, such as a failed charge, invalid parameters, authentication errors, and network unavailability. We recommend writing code that gracefully handles all possible API exceptions.

    JSON Error Response

    Attribute Content Always Present Description
    success boolean Yes Returns false as the action performed was not completed successfully.
    response object Yes Contains an object with the result of the performed action if success. If an error ocurred, the response object will not exist. Check the error response format.

    Error Status Codes

    Error Code Meaning
    400 Bad Request
    401 Unauthorized -- Your API key is wrong.
    403 Forbidden -- The request is forbidden for your access level, contact the developer support.
    404 Not Found -- The request is not longer active, or does not exist.
    405 Method Not Allowed -- You tried to access a request with an invalid method.
    406 Not Acceptable -- You requested a format that isn't JSON.
    410 Gone -- The endpoint requested has been removed from our servers.
    429 Too Many Requests -- You're requesting too much information.
    500 Internal Server Error -- We had a problem with our server. Try again later.
    503 Service Unavailable -- We're temporarily offline for maintenance. Please try again later.

    Error Codes

    Code Description
    1001 Invalid password.