NAV Navbar
Shell HTTP Node.JS Python Ruby Java C#
  • WireCash API
  • Authentication
  • Resources
  • Schemas
  • WireCash API

    A Java api client is available on maven:

    <dependency>
        <groupId>com.wirecash</groupId>
        <artifactId>api-client</artifactId>
        <version>1.1.1</version>
    </dependency>
    

    The WireCash API provides Services from our partners with fees, rates. Searchable by US state of origin, country remitting to, or both. See the various API resources for more information.

    In order to obtain a username and password for API use you must contact us at tech@wirecash.com

    Base URLs:

    Authentication

    - Header name: Authorization. The Authorization Header is required by all API requests excluding /authenticate and /token requests. The Authorization header value is the access_token value provided by /authenticate or /token

    POST /authenticate

    Code samples

    # You can also use wget
    curl -X post https://api.wirecash.com/sandbox/authenticate \
      -H 'Content-Type: application/json' \
      -H 'Accept: application/json' \
      -d '{"username":"YOUR USERNAME","password":"YOUR PASSWORD"}'
    
    POST https://api.wirecash.com/sandbox/authenticate HTTP/1.1
    Host: api.wirecash.com
    Content-Type: application/json
    Accept: application/json
    {"username":"YOUR USERNAME","password":"YOUR PASSWORD"}
    
    const request = require('node-fetch');
    const inputBody = '{
      "password": "YOUR USERNAME",
      "username": "YOUR PASSWORD"
    }';
    const headers = {
      'Content-Type':'application/json',
      'Accept':'application/json'
    };
    
    fetch('https://api.wirecash.com/sandbox/authenticate',
    {
      method: 'POST',
      body: inputBody,
      headers: headers
    })
    .then(function(res) {
        return res.json();
    }).then(function(body) {
        console.log(body);
    });
    
    require 'rest-client'
    require 'json'
    
    headers = {
      'Content-Type' => 'application/json',
      'Accept' => 'application/json'
    }
    
    result = RestClient.post 'https://api.wirecash.com/sandbox/authenticate',
      params: {
        'username' => 'YOUR USERNAME',
        'password' => 'YOUR PASSWORD'
      }, headers: headers
    
    p JSON.parse(result)
    
    import requests
    headers = {
      'Content-Type': 'application/json',
      'Accept': 'application/json'
    }
    
    r = requests.post('https://api.wirecash.com/sandbox/authenticate', params={
      'username': 'YOUR USERNAME',
      'password': 'YOUR PASSWORD'
    }, headers = headers)
    
    print r.json()
    
    //create the client
    WirecashClient client = WirecashClient.newBuilder()
        .developmentBaseUrl().build();
    //make an authenticate request with the server
    Response<AuthenticateResponse> response = client.service().authenticate(
        new AuthenticateRequest()
                .withUsername("YOUR_USERNAME")
                .withPassword("YOUR_PASSOWRD")).execute();
    //verify request was a success first
    if(response.isSuccessful()){
        System.out.println(response.body().getAccess_token());
    }
    
    //some code
    
    

    Obtains tokens related to given username and password. The AuthenticateRequest must be in the body of the request in JSON format.

    Body parameter

    {
      "password": "string",
      "username": "string"
    }
    

    Parameters

    Parameter In Type Required Description
    body body AuthenticateRequest true Requires the username and password

    Example responses

    {
      "access_token": "string",
      "expires_in": 0,
      "refresh_token": "string",
      "token_type": "string"
    }
    

    Responses

    Status Meaning Description Schema
    200 OK Successful response AuthenticateResponse
    400 Bad Request Invalid username or password provided. None
    500 Internal Server Error Internal server error None

    POST /token

    Code samples

    # You can also use wget
    curl -X post https://api.wirecash.com/sandbox/token \
      -H 'Content-Type: application/json' \
      -H 'Accept: application/json' \
      -d '{"username":"YOUR USERNAME","access_token":"YOUR ACCESS TOKEN", "refresh_token": "YOUR REFRESH TOKEN"}'
    
    POST https://api.wirecash.com/sandbox/token HTTP/1.1
    Host: api.wirecash.com
    Content-Type: application/json
    Accept: application/json
    {"username":"YOUR USERNAME","access_token":"YOUR ACCESS TOKEN", "refresh_token": "YOUR REFRESH TOKEN"}
    
    const request = require('node-fetch');
    const inputBody = '{
      "access_token": "YOUR ACCESS TOKEN",
      "refresh_token": "YOUR REFRESH TOKEN",
      "username": "YOUR USERNAME"
    }';
    const headers = {
      'Content-Type':'application/json',
      'Accept':'application/json'
    };
    
    fetch('https://api.wirecash.com/sandbox/token',
    {
      method: 'POST',
      body: inputBody,
      headers: headers
    })
    .then(function(res) {
        return res.json();
    }).then(function(body) {
        console.log(body);
    });
    
    require 'rest-client'
    require 'json'
    
    headers = {
      'Content-Type' => 'application/json',
      'Accept' => 'application/json'
    }
    
    result = RestClient.post 'https://api.wirecash.com/sandbox/token',
      params: {
      }, headers: headers
    
    p JSON.parse(result)
    
    import requests
    headers = {
      'Content-Type': 'application/json',
      'Accept': 'application/json'
    }
    
    r = requests.post('https://api.wirecash.com/sandbox/token', params={
      'access_token': 'YOUR ACCESS TOKEN',
      'refresh_token': 'YOUR REFRESH TOKEN',
      'username': 'YOUR USERNAME'
    }, headers = headers)
    
    print r.json()
    
    Response<AuthenticateResponse> response = client.service().refreshToken(
        new RefreshTokenRequest()
            .withUsername("USERNAME")
            .withRefresh_token("REFRESH_TOKEN")
            .withAccess_token("ACCESS_TOKEN")
    ).execute();
    if (response.isSuccessful()) {
        //do something
    }
    
    //some code
    
    

    Used to refresh the access_token. The request must be placed in the body in JSON format.

    Body parameter

    {
      "access_token": "string",
      "refresh_token": "string",
      "username": "string"
    }
    

    Parameters

    Parameter In Type Required Description
    body body RefreshTokenRequest true RefreshTokenRequest object in json format

    Example responses

    {
      "access_token": "string",
      "expires_in": 0,
      "refresh_token": "string",
      "token_type": "string"
    }
    

    Responses

    Status Meaning Description Schema
    200 OK Successful response AuthenticateResponse
    400 Bad Request Invalid data provided None
    500 Internal Server Error Internal server error None

    Resources

    GET /company/{id}

    Code samples

    # You can also use wget
    curl -X get https://api.wirecash.com/sandbox/company/7 \  
      -H 'Accept: application/json' \
      -H 'Authorization: YOUR_ACCESS_TOKEN'
    
    GET https://api.wirecash.com/sandbox/company/7 HTTP/1.1
    Host: api.wirecash.com
    
    Accept: application/json
    Authorization: YOUR_ACCESS_TOKEN
    
    
    const request = require('node-fetch');
    
    const headers = {
      'Authorization':'YOUR_ACCESS_TOKEN',
      'Accept':'application/json'
    };
    
    fetch('https://api.wirecash.com/sandbox/company/7',
    {
      method: 'GET',
      headers: headers
    })
    .then(function(res) {
        return res.json();
    }).then(function(body) {
        console.log(body);
    });
    
    require 'rest-client'
    require 'json'
    
    headers = {
      'Authorization' => 'YOUR_ACCESS_TOKEN',
      'Accept' => 'application/json'
    }
    
    result = RestClient.get 'https://api.wirecash.com/sandbox/company/7',
      params: {}, headers: headers
    
    p JSON.parse(result)
    
    import requests
    headers = {
      'Authorization': 'YOUR_ACCESS_TOKEN',
      'Accept': 'application/json'
    }
    
    r = requests.get('https://api.wirecash.com/sandbox/company/7', params={
    
    }, headers = headers)
    
    print r.json()
    
    Response<CompaniesResponse> response = client.service().getCompany(
        COMPANY_ID,
        authenticateResponse.getAccess_token()
    ).execute();
    if(response.isSuccessful()){
        //do something with the response
    }
    
    //some code
    
    

    Gets details about given company by id.

    Parameters

    Parameter In Type Required Description
    amount query string false Returns the results fee based on the given amount, defaults to $200
    Authorization header string true access_token value
    id path string true Company id

    Example responses

    {
      "companies": [
        {
          "company_logo": "string",
          "company_name": "string",
          "description": "string",
          "id": 0,
          "rating": 0,
          "services": {
            "GH": [
              {
                "delivery_type": "string",
                "exchange_rate": [
                  {
                    "currency_id": 0,
                    "currency_name": "string",
                    "currency_symbol": "string",
                    "exchange_rate": "string"
                  }
                ],
                "fee": 0,
                "id": 0,
                "max_limit": 0,
                "min_limit": 0,
                "payers": [
                  {
                    "id": 0,
                    "payer_logo": "string",
                    "payer_name": "string"
                  }
                ]
              }
            ],
            "MX": [
              {
                "delivery_type": "string",
                "exchange_rate": [
                  {
                    "currency_id": 0,
                    "currency_name": "string",
                    "currency_symbol": "string",
                    "exchange_rate": "string"
                  }
                ],
                "fee": 0,
                "id": 0,
                "max_limit": 0,
                "min_limit": 0,
                "payers": [
                  {
                    "id": 0,
                    "payer_logo": "string",
                    "payer_name": "string"
                  }
                ]
              }
            ]
          }
        }
      ]
    }
    

    Responses

    Status Meaning Description Schema
    200 OK Successful response CompaniesResponse
    401 Unauthorized The access_token has exipred None
    404 Not Found The provided id was not found None
    500 Internal Server Error Internal server error None

    GET /country/{country_code}

    Code samples

    # You can also use wget
    curl -X get https://api.wirecash.com/sandbox/country/BR \  
      -H 'Accept: application/json' \
      -H 'Authorization: YOUR_ACCESS_TOKEN'
    
    GET https://api.wirecash.com/sandbox/country/BR HTTP/1.1
    Host: api.wirecash.com
    
    Accept: application/json
    Authorization: YOUR_ACCESS_TOKEN
    
    
    const request = require('node-fetch');
    
    const headers = {
      'Authorization':'YOUR_ACCESS_TOKEN',
      'Accept':'application/json'
    };
    
    fetch('https://api.wirecash.com/sandbox/country/BR',
    {
      method: 'GET',
      headers: headers
    })
    .then(function(res) {
        return res.json();
    }).then(function(body) {
        console.log(body);
    });
    
    require 'rest-client'
    require 'json'
    
    headers = {
      'Authorization' => 'YOUR_ACCESS_TOKEN',
      'Accept' => 'application/json'
    }
    
    result = RestClient.get 'https://api.wirecash.com/sandbox/country/BR',
      params: {}, headers: headers
    
    p JSON.parse(result)
    
    import requests
    headers = {
      'Authorization': 'YOUR_ACCESS_TOKEN',
      'Accept': 'application/json'
    }
    
    r = requests.get('https://api.wirecash.com/sandbox/country/BR', params={
    
    }, headers = headers)
    
    print r.json()
    
    Response<CompaniesResponse> response = client.service().getServicesByCountry(
        COUNTRY_CODE,
        authenticateResponse.getAccess_token()
    ).execute();
    if(response.isSuccessful()){
        //do something with the response
    }
    
    //some code
    
    

    Gets a list of Companies and their service offerings for the given country code.

    Parameters

    Parameter In Type Required Description
    amount query string false Returns the results fee based on the given amount, defaults to $200
    country_code path string true Country code searching services for.
    Authorization header string true access_token value

    Example responses

    {
      "companies": [
        {
          "company_logo": "string",
          "company_name": "string",
          "description": "string",
          "id": 0,
          "rating": 0,
          "services": {
            "GH": [
              {
                "delivery_type": "string",
                "exchange_rate": [
                  {
                    "currency_id": 0,
                    "currency_name": "string",
                    "currency_symbol": "string",
                    "exchange_rate": "string"
                  }
                ],
                "fee": 0,
                "id": 0,
                "max_limit": 0,
                "min_limit": 0,
                "payers": [
                  {
                    "id": 0,
                    "payer_logo": "string",
                    "payer_name": "string"
                  }
                ]
              }
            ],
            "MX": [
              {
                "delivery_type": "string",
                "exchange_rate": [
                  {
                    "currency_id": 0,
                    "currency_name": "string",
                    "currency_symbol": "string",
                    "exchange_rate": "string"
                  }
                ],
                "fee": 0,
                "id": 0,
                "max_limit": 0,
                "min_limit": 0,
                "payers": [
                  {
                    "id": 0,
                    "payer_logo": "string",
                    "payer_name": "string"
                  }
                ]
              }
            ]
          }
        }
      ]
    }
    

    Responses

    Status Meaning Description Schema
    200 OK Successful response CompaniesResponse
    401 Unauthorized The access_token has exipred None
    400 Bad Request Invalid country code provided None
    404 Not Found Country code not found None
    500 Internal Server Error Internal server error None

    GET /country/list

    Code samples

    # You can also use wget
    curl -X get https://api.wirecash.com/sandbox/country/list \  
      -H 'Accept: application/json' \
      -H 'Authorization: YOUR_ACCESS_TOKEN'
    
    GET https://api.wirecash.com/sandbox/country/list HTTP/1.1
    Host: api.wirecash.com
    
    Accept: application/json
    Authorization: YOUR_ACCESS_TOKEN
    
    
    const request = require('node-fetch');
    
    const headers = {
      'Authorization':'YOUR_ACCESS_TOKEN',
      'Accept':'application/json'
    };
    
    fetch('https://api.wirecash.com/sandbox/country/list',
    {
      method: 'GET',
      headers: headers
    })
    .then(function(res) {
        return res.json();
    }).then(function(body) {
        console.log(body);
    });
    
    require 'rest-client'
    require 'json'
    
    headers = {
      'Authorization' => 'YOUR_ACCESS_TOKEN',
      'Accept' => 'application/json'
    }
    
    result = RestClient.get 'https://api.wirecash.com/sandbox/country/list',
      params: {}, headers: headers
    
    p JSON.parse(result)
    
    import requests
    headers = {
      'Authorization': 'YOUR_ACCESS_TOKEN',
      'Accept': 'application/json'
    }
    
    r = requests.get('https://api.wirecash.com/sandbox/country/list', params={
    
    }, headers = headers)
    
    print r.json()
    
    Response<CountryListResponse> response = client.service()
        .getCountryList(authenticateResponse.getAccess_token()).execute();
    if(response.isSuccessful()){
        //do something
    }
    
    //some code
    
    

    Gets a list of countries where services offered.

    Parameters

    Parameter In Type Required Description
    Authorization header string true access_token value

    Example responses

    {
      "countries": [
        {
          "code": "string",
          "name": "string"
        }
      ]
    }
    

    Responses

    Status Meaning Description Schema
    200 OK Successful response CountryListResponse
    401 Unauthorized The access_token has exipred None
    500 Internal Server Error Internal server error None

    GET /quote

    Code samples

    # You can also use wget
    curl -X get https://api.wirecash.com/quote \  
      -H 'Accept: application/json' \
      -H 'Authorization: YOUR_ACCESS_TOKEN' \
      -d '{"amount":25.0,"currency_symbol":"BRL", "payer_id": 34, "service_id": 2541}'
    
    GET https://api.wirecash.com/sandbox/quote HTTP/1.1
    Host: api.wirecash.com
    
    Accept: application/json
    Authorization: YOUR_ACCESS_TOKEN
    {"amount":25.0,"currency_symbol":"BRL", "payer_id": 34, "service_id": 2541}
    
    const request = require('node-fetch');
    const inputBody = '{"amount":25.0,"currency_symbol":"BRL", "payer_id": 34, "service_id": 2541}';
    const headers = {
      'Authorization':'YOUR_ACCESS_TOKEN',
      'Accept':'application/json'
    };
    
    fetch('https://api.wirecash.com/sandbox/quote',
    {
      method: 'GET',
      body: inputBody,
      headers: headers
    })
    .then(function(res) {
        return res.json();
    }).then(function(body) {
        console.log(body);
    });
    
    require 'rest-client'
    require 'json'
    
    headers = {
      'Authorization' => 'YOUR_ACCESS_TOKEN',
      'Accept' => 'application/json'
    }
    
    result = RestClient.get 'https://api.wirecash.com/sandbox/quote',
      params: {
          'amount' => 25,
          'currency_symbol' => 'BRL',
          'payer_id' => 34,
          'service_id' => 2541      
        }, headers: headers
    
    p JSON.parse(result)
    
    import requests
    headers = {
      'Authorization': 'YOUR_ACCESS_TOKEN',
      'Accept': 'application/json'
    }
    
    r = requests.get('https://api.wirecash.com/sandbox/quote', params={
     'amount': 25.0,
     'currency_symbol': 'BRL',
     'payer_id': 34,
     'service_id': 2541
    }, headers = headers)
    
    print r.json()
    
    Response<QuoteResponse> response = client.service().getQuote(
        new QuoteRequest()
                .withServiceId(2451L)
                .withCurrencySymbol("BRL")
                .withAmount(250.0), 
        authenticateResponse.getAccess_token()
    ).execute();
    if(response.isSuccessful()){
        //do something
    }
    
    //some code
    
    

    Returns a quote for the given service and amount.

    Parameters

    Parameter In Type Required Description
    Authorization header string true access_token value
    body body QuoteRequest true All fields are required except payer_id as some services don't provide it. If no payers are available send 0 for payer_id.

    Example responses

    {
      "exchange_rate": 3.2373,
      "fee": 4.99,
      "recipient_receives": 323.73,
      "total": 104.99,
      "amount": 100,
      "id": 11559
    }
    

    Responses

    Status Meaning Description Schema
    200 OK Successful response QuoteResponse
    400 Bad Request Failed validation None
    401 Unauthorized The access_token has exipred None
    500 Internal Server Error Internal server error None

    GET /state/{state_code}

    Code samples

    # You can also use wget
    curl -X get https://api.wirecash.com/sandbox/state/CA \  
      -H 'Accept: application/json' \
      -H 'Authorization: YOUR_ACCESS_TOKEN'
    
    GET https://api.wirecash.com/sandbox/state/CA HTTP/1.1
    Host: api.wirecash.com
    
    Accept: application/json
    Authorization: YOUR_ACCESS_TOKEN
    
    
    const request = require('node-fetch');
    
    const headers = {
      'Authorization':'YOUR_ACCESS_TOKEN',
      'Accept':'application/json'
    };
    
    fetch('https://api.wirecash.com/sandbox/state/CA',
    {
      method: 'GET',
    
      headers: headers
    })
    .then(function(res) {
        return res.json();
    }).then(function(body) {
        console.log(body);
    });
    
    require 'rest-client'
    require 'json'
    
    headers = {
      'Authorization' => 'YOUR_ACCESS_TOKEN',
      'Accept' => 'application/json'
    }
    
    result = RestClient.get 'https://api.wirecash.com/sandbox/state/CA',
      params: {}, headers: headers
    
    p JSON.parse(result)
    
    import requests
    headers = {
      'Authorization': 'YOUR_ACCESS_TOKEN',
      'Accept': 'application/json'
    }
    
    r = requests.get('https://api.wirecash.com/sandbox/state/CA', params={
    
    }, headers = headers)
    
    print r.json()
    
    Response<CompaniesResponse> response = client.service()
        .getServicesByState(
                "CA",
                authenticateResponse.getAccess_token())
        .execute();
    if (response.isSuccessful()) {
        //do something
    }
    
    //some code
    
    

    Returns a list of Companies and the services offered by US state of origin.

    Parameters

    Parameter In Type Required Description
    amount query string false Returns the results fee based on the given amount, defaults to $200
    state_code path string true State code searching services for.
    Authorization header string true access_token value

    Example responses

    {
      "companies": [
        {
          "company_logo": "string",
          "company_name": "string",
          "description": "string",
          "id": 0,
          "rating": 0,
          "services": {
            "GH": [
              {
                "delivery_type": "string",
                "exchange_rate": [
                  {
                    "currency_id": 0,
                    "currency_name": "string",
                    "currency_symbol": "string",
                    "exchange_rate": "string"
                  }
                ],
                "fee": 0,
                "id": 0,
                "max_limit": 0,
                "min_limit": 0,
                "payers": [
                  {
                    "id": 0,
                    "payer_logo": "string",
                    "payer_name": "string"
                  }
                ]
              }
            ],
            "MX": [
              {
                "delivery_type": "string",
                "exchange_rate": [
                  {
                    "currency_id": 0,
                    "currency_name": "string",
                    "currency_symbol": "string",
                    "exchange_rate": "string"
                  }
                ],
                "fee": 0,
                "id": 0,
                "max_limit": 0,
                "min_limit": 0,
                "payers": [
                  {
                    "id": 0,
                    "payer_logo": "string",
                    "payer_name": "string"
                  }
                ]
              }
            ]
          }
        }
      ]
    }
    

    Responses

    Status Meaning Description Schema
    200 OK Successful response CompaniesResponse
    400 Bad Request Invalid data provided. None
    401 Unauthorized The access_token has exipred None
    404 Not Found No information found for state code None

    GET /state/{state_code}/country/{country_code}

    Code samples

    # You can also use wget
    curl -X get https://api.wirecash.com/sandbox/state/CA/country/BR \  
      -H 'Accept: application/json' \
      -H 'Authorization: YOUR_ACCESS_TOKEN'
    
    GET https://api.wirecash.com/sandbox/state/CA/country/BR HTTP/1.1
    Host: api.wirecash.com
    
    Accept: application/json
    Authorization: YOUR_ACCESS_TOKEN
    
    
    const request = require('node-fetch');
    
    const headers = {
      'Authorization':'YOUR_ACCESS_TOKEN',
      'Accept':'application/json'
    };
    
    fetch('https://api.wirecash.com/sandbox/state/CA/country/BR',
    {
      method: 'GET',
      headers: headers
    })
    .then(function(res) {
        return res.json();
    }).then(function(body) {
        console.log(body);
    });
    
    require 'rest-client'
    require 'json'
    
    headers = {
      'Authorization' => 'YOUR_ACCESS_TOKEN',
      'Accept' => 'application/json'
    }
    
    result = RestClient.get 'https://api.wirecash.com/sandbox/state/CA/country/BR',
      params: {}, headers: headers
    
    p JSON.parse(result)
    
    import requests
    headers = {
      'Authorization': 'YOUR_ACCESS_TOKEN',
      'Accept': 'application/json'
    }
    
    r = requests.get('https://api.wirecash.com/sandbox/state/CA/country/BR', params={
    
    }, headers = headers)
    
    print r.json()
    
    Response<CompaniesResponse> response = client.service()
        .getServicesByStateCountry(
            "CA","BR",
            authenticateResponse.getAccess_token())
        .execute();
    if (response.isSuccessful()) {
        //do something
    }
    
    //some code
    
    

    Returns a list of Companies and services narrowed down by US State of origin, and Country sending to. All services are sorted by country.

    Parameters

    Parameter In Type Required Description
    amount query string false Returns the results fee based on the given amount, defaults to $200
    country_code path string true Country code to narrow search results by.
    state_code path string true State code to narrow search results by.
    Authorization header string true access_token value

    Example responses

    {
      "companies": [
        {
          "company_logo": "string",
          "company_name": "string",
          "description": "string",
          "id": 0,
          "rating": 0,
          "services": {
            "GH": [
              {
                "delivery_type": "string",
                "exchange_rate": [
                  {
                    "currency_id": 0,
                    "currency_name": "string",
                    "currency_symbol": "string",
                    "exchange_rate": "string"
                  }
                ],
                "fee": 0,
                "id": 0,
                "max_limit": 0,
                "min_limit": 0,
                "payers": [
                  {
                    "id": 0,
                    "payer_logo": "string",
                    "payer_name": "string"
                  }
                ]
              }
            ],
            "MX": [
              {
                "delivery_type": "string",
                "exchange_rate": [
                  {
                    "currency_id": 0,
                    "currency_name": "string",
                    "currency_symbol": "string",
                    "exchange_rate": "string"
                  }
                ],
                "fee": 0,
                "id": 0,
                "max_limit": 0,
                "min_limit": 0,
                "payers": [
                  {
                    "id": 0,
                    "payer_logo": "string",
                    "payer_name": "string"
                  }
                ]
              }
            ]
          }
        }
      ]
    }
    

    Responses

    Status Meaning Description Schema
    200 OK Successful response CompaniesResponse
    400 Bad Request Invalid data provided. None
    401 Unauthorized The access_token has exipred None
    500 Internal Server Error Internal server error None

    GET /state/list

    Code samples

    # You can also use wget
    curl -X get https://api.wirecash.com/state/list \  
      -H 'Accept: application/json' \
      -H 'Authorization: YOUR_ACCESS_TOKEN'
    
    GET https://api.wirecash.com/sandbox/state/list HTTP/1.1
    Host: api.wirecash.com
    
    Accept: application/json
    Authorization: YOUR_ACCESS_TOKEN
    
    
    const request = require('node-fetch');
    
    const headers = {
      'Authorization':'YOUR_ACCESS_TOKEN',
      'Accept':'application/json'
    };
    
    fetch('https://api.wirecash.com/sandbox/state/list',
    {
      method: 'GET',
    
      headers: headers
    })
    .then(function(res) {
        return res.json();
    }).then(function(body) {
        console.log(body);
    });
    
    require 'rest-client'
    require 'json'
    
    headers = {
      'Authorization' => 'YOUR_ACCESS_TOKEN',
      'Accept' => 'application/json'
    }
    
    result = RestClient.get 'https://api.wirecash.com/sandbox/state/list',
      params: {}, headers: headers
    
    p JSON.parse(result)
    
    import requests
    headers = {
      'Authorization': 'YOUR_ACCESS_TOKEN',
      'Accept': 'application/json'
    }
    
    r = requests.get('https://api.wirecash.com/sandbox/state/list', params={
    
    }, headers = headers)
    
    print r.json()
    
    Response<StateListResponse> response = client.service()
        .getStateList(authenticateResponse.getAccess_token()).execute();
    if (response.isSuccessful()) {
        //do something
    }
    
    //some code
    
    

    Returns a list of state name and 2 letter code for every US state where services are available from.

    Parameters

    Parameter In Type Required Description
    Authorization header string true access_token value

    Example responses

    {
      "states": [
        {
          "code": "string",
          "name": "string"
        }
      ]
    }
    

    Responses

    Status Meaning Description Schema
    200 OK Successful response StateListResponse
    401 Unauthorized The access_token has exipred None
    500 Internal Server Error Internal server error None

    Schemas

    AuthenticateRequest

    {
      "password": "string",
      "username": "string"
    }
    

    Properties

    Name Type Required Description
    password string true The password provided for API use.
    username string true The username provided for API use.

    AuthenticateResponse

    {
      "access_token": "string",
      "expires_in": 0,
      "refresh_token": "string",
      "token_type": "string"
    }
    

    Properties

    Name Type Required Description
    access_token string true The access token used in the Authorization header for every call in the API
    expires_in integer true The time the access_token will expire in seconds.
    refresh_token string true Refresh token used by the /token to obtain a new access_token.
    token_type string true Token type.

    CompaniesResponse

    {
      "companies": [
        {
          "company_logo": "string",
          "company_name": "string",
          "description": "string",
          "id": 0,
          "rating": 0,
          "services": {
            "GH": [
              {
                "delivery_type": "string",
                "exchange_rate": [
                  {
                    "currency_id": 0,
                    "currency_name": "string",
                    "currency_symbol": "string",
                    "exchange_rate": "string"
                  }
                ],
                "fee": 0,
                "id": 0,
                "max_limit": 0,
                "min_limit": 0,
                "payers": [
                  {
                    "id": 0,
                    "payer_logo": "string",
                    "payer_name": "string"
                  }
                ]
              }
            ],
            "MX": [
              {
                "delivery_type": "string",
                "exchange_rate": [
                  {
                    "currency_id": 0,
                    "currency_name": "string",
                    "currency_symbol": "string",
                    "exchange_rate": "string"
                  }
                ],
                "fee": 0,
                "id": 0,
                "max_limit": 0,
                "min_limit": 0,
                "payers": [
                  {
                    "id": 0,
                    "payer_logo": "string",
                    "payer_name": "string"
                  }
                ]
              }
            ]
          }
        }
      ]
    }
    

    Properties

    Name Type Required Description
    companies [Company] false An array of Company Objects

    Company

    {
      "company_logo": "string",
      "company_name": "string",
      "description": "string",
      "id": 0,
      "rating": 0,
      "services": {
        "GH": [
          {
            "delivery_type": "string",
            "exchange_rate": [
              {
                "currency_id": 0,
                "currency_name": "string",
                "currency_symbol": "string",
                "exchange_rate": "string"
              }
            ],
            "fee": 0,
            "id": 0,
            "max_limit": 0,
            "min_limit": 0,
            "payers": [
              {
                "id": 0,
                "payer_logo": "string",
                "payer_name": "string"
              }
            ]
          }
        ],
        "MX": [
          {
            "delivery_type": "string",
            "exchange_rate": [
              {
                "currency_id": 0,
                "currency_name": "string",
                "currency_symbol": "string",
                "exchange_rate": "string"
              }
            ],
            "fee": 0,
            "id": 0,
            "max_limit": 0,
            "min_limit": 0,
            "payers": [
              {
                "id": 0,
                "payer_logo": "string",
                "payer_name": "string"
              }
            ]
          }
        ]
      }
    }
    

    Properties

    Name Type Required Description
    company_logo string false URL for company logo
    company_name string false The company name
    description string false A short description of the company
    id integer false The company id.
    rating integer false The star rating given by customers
    services object false Object where key: 2 letter country code, value: array of [Service] objects

    CountryListResponse

    {
      "countries": [
        {
          "code": "string",
          "name": "string"
        }
      ]
    }
    

    Properties

    Name Type Required Description
    countries [NameCode] false Array of NameCode Objects
    - code string false 2 letter country code
    - name string false Country name

    ExchangeRate

    {
      "currency_id": 0,
      "currency_name": "string",
      "currency_symbol": "string",
      "exchange_rate": "string"
    }
    

    Properties

    Name Type Required Description
    currency_id integer false The currency id
    currency_name string false Name of the currency.
    currency_symbol string false The two letter currency code.
    exchange_rate string false The exchange rate.

    NameCode

    {
      "code": "string",
      "name": "string"
    }
    

    Properties

    Name Type Required Description
    code string false The two letter code for either Country or State
    name string false The name of the the Country or State

    Payer

    {
      "id": 0,
      "payer_logo": "string",
      "payer_name": "string"
    }
    

    Properties

    Name Type Required Description
    id integer false Payer id
    payer_logo string false URL to payer logo
    payer_name string false Payer name.

    QuoteRequest

    {
      "service_id": 4,
      "currency_symbol": "BRL",
      "amount": 200.0,
      "payer_id": 34
    }
    

    Properties

    Name Type Required Description
    service_id number true Service id
    currency_symbol string true The 3 letter currency code
    amount number true An amount between the bounds of the limits provided by the service min_limit and max_limit. The general minimum send amount must be $25 USD or above.
    payer_id number true The username provided for API use.

    QuoteResponse

    {
      "exchange_rate": 3.2373,
      "fee": 4.99,
      "recipient_receives": 323.73,
      "total": 104.99,
      "amount": 100.0,
      "id": 11559
    }
    

    Properties

    Name Type Required Description
    exchange_rate number true FX rate for the service
    fee number true Base fee
    recipient_receives number true The amount the recipient receives (Fx rate * amount)
    total number true The sender total (fee + send amount)
    amount number true The amount provided for the quote
    id number number Quote id

    RefreshTokenRequest

    {
      "access_token": "string",
      "refresh_token": "string",
      "username": "string"
    }
    

    Properties

    Name Type Required Description
    access_token string true access_token provided by the Authentication Request or token request
    refresh_token string true The refresh token provided by the Authentication Request or token request
    username string true API username

    Service

    {
      "delivery_type": "string",
      "exchange_rate": [
        {
          "currency_id": 0,
          "currency_name": "string",
          "currency_symbol": "string",
          "exchange_rate": "string"
        }
      ],
      "fee": 0,
      "id": 0,
      "max_limit": 0,
      "min_limit": 0,
      "payers": [
        {
          "id": 0,
          "payer_logo": "string",
          "payer_name": "string"
        }
      ]
    }
    

    Properties

    Name Type Required Description
    delivery_type string false Type of delivery method this service provides
    fee integer false Base fee for this particular service.
    id integer false Id of service.
    max_limit integer false The maximum amount the user can send with this service.
    min_limit integer false The minimum amount the user needs to send with this service..
    exchange_rate [ExchangeRate] false ExchangeRate Object
    payers [Payer] false Payer Object

    StateListResponse

    {
      "states": [
        {
          "code": "string",
          "name": "string"
        }
      ]
    }
    

    Properties

    Name Type Required Description
    states [NameCode] false An Array of NameCode Objects
    - code string false 2 letter state code
    - name string false State name