API Documentation

In-depth reference documentation for iQmetrix API's.

NAV

OVERVIEW

The Payment Method service is used to maintain and provide methods of payment for items such as cash, credit, or debit.

ENDPOINTS

Sandbox: https://paymentmethodsdemo.iqmetrix.net/v1
Production: https://paymentmethods.iqmetrix.net/v1

RESOURCES

PaymentMethod

{
    "Id": 4,
    "PaymentName": "Cash",
    "IsPrivate": false,
    "PaymentMethodType": "PhysicalCurrency"
}
Name Description
Id (Integer) Identifier
PaymentName (String) Name
IsPrivate (Boolean) Private or public payment method
PaymentMethodType (String) Type of payment this method uses, see PaymentMethodType for a list of acceptable values

Enumerations

PaymentMethodType

Name
PhysicalCurrency
NonIntegratedCard
IntegratedCard
Other
OnlineCreditCard

REQUESTS

GET All Payment Methods

Request

GET /PaymentMethods

Example Request

GET /PaymentMethods
Authorization: Bearer (Access Token)
Accept: application/json

curl -X GET "https://paymentmethodsdemo.iqmetrix.net/v1/PaymentMethods" -H "Authorization: Bearer (Access Token)" -H "Accept: application/json"
static IRestResponse GettingAllPaymentMethods()
{
    var client = new RestClient("https://paymentmethodsdemo.iqmetrix.net/v1/PaymentMethods");
    var request = new RestRequest(Method.GET);
     
    request.AddHeader("Authorization", "Bearer (Access Token)"); 
    request.AddHeader("Accept", "application/json"); 

    

    return client.Execute(request);
}

import org.apache.http.client.methods.CloseableHttpResponse;
import org.apache.http.client.methods.HttpGet;
import org.apache.http.impl.client.CloseableHttpClient;
import org.apache.http.impl.client.HttpClients;
import java.io.IOException;

public static CloseableHttpResponse GettingAllPaymentMethods() throws IOException {
    CloseableHttpClient httpClient = HttpClients.createDefault();
    HttpGet request = new HttpGet("https://paymentmethodsdemo.iqmetrix.net/v1/PaymentMethods");
     
    request.addHeader("Authorization", "Bearer (Access Token)"); 
    request.addHeader("Accept", "application/json"); 
    
    return httpClient.execute(request);
}
require 'rest-client'



response = RestClient.get 'https://paymentmethodsdemo.iqmetrix.net/v1/PaymentMethods', {
     :'Authorization' => 'Bearer (Access Token)',
     :'Accept' => 'application/json',
    } 

puts response

Response Parameters

Example Response

HTTP 200 Content-Type: application/json
[
    {
        "Id": 4,
        "PaymentName": "Cash",
        "IsPrivate": false,
        "PaymentMethodType": "PhysicalCurrency"
    }
]

Array[PaymentMethod]

GET a Payment Method

Request

GET /PaymentMethods({PaymentMethodId})

Example Request

GET /PaymentMethods(4)
Authorization: Bearer (Access Token)
Accept: application/json

curl -X GET "https://paymentmethodsdemo.iqmetrix.net/v1/PaymentMethods(4)" -H "Authorization: Bearer (Access Token)" -H "Accept: application/json"
static IRestResponse GettingAPaymentMethod()
{
    var client = new RestClient("https://paymentmethodsdemo.iqmetrix.net/v1/PaymentMethods(4)");
    var request = new RestRequest(Method.GET);
     
    request.AddHeader("Authorization", "Bearer (Access Token)"); 
    request.AddHeader("Accept", "application/json"); 

    

    return client.Execute(request);
}

import org.apache.http.client.methods.CloseableHttpResponse;
import org.apache.http.client.methods.HttpGet;
import org.apache.http.impl.client.CloseableHttpClient;
import org.apache.http.impl.client.HttpClients;
import java.io.IOException;

public static CloseableHttpResponse GettingAPaymentMethod() throws IOException {
    CloseableHttpClient httpClient = HttpClients.createDefault();
    HttpGet request = new HttpGet("https://paymentmethodsdemo.iqmetrix.net/v1/PaymentMethods(4)");
     
    request.addHeader("Authorization", "Bearer (Access Token)"); 
    request.addHeader("Accept", "application/json"); 
    
    return httpClient.execute(request);
}
require 'rest-client'



response = RestClient.get 'https://paymentmethodsdemo.iqmetrix.net/v1/PaymentMethods(4)', {
     :'Authorization' => 'Bearer (Access Token)',
     :'Accept' => 'application/json',
    } 

puts response

URI Parameters

Response Parameters

Example Response

HTTP 200 Content-Type: application/json
{
    "Id": 4,
    "PaymentName": "Cash",
    "IsPrivate": false,
    "PaymentMethodType": "PhysicalCurrency"
}

PaymentMethod

GET All Payment Methods for a Company

Request

GET /Companies({CompanyId})/PaymentMethods

Example Request

GET /Companies(14146)/PaymentMethods
Authorization: Bearer (Access Token)
Accept: application/json

curl -X GET "https://paymentmethodsdemo.iqmetrix.net/v1/Companies(14146)/PaymentMethods" -H "Authorization: Bearer (Access Token)" -H "Accept: application/json"
static IRestResponse GettingAllPaymentMethodsForACompany()
{
    var client = new RestClient("https://paymentmethodsdemo.iqmetrix.net/v1/Companies(14146)/PaymentMethods");
    var request = new RestRequest(Method.GET);
     
    request.AddHeader("Authorization", "Bearer (Access Token)"); 
    request.AddHeader("Accept", "application/json"); 

    

    return client.Execute(request);
}

import org.apache.http.client.methods.CloseableHttpResponse;
import org.apache.http.client.methods.HttpGet;
import org.apache.http.impl.client.CloseableHttpClient;
import org.apache.http.impl.client.HttpClients;
import java.io.IOException;

public static CloseableHttpResponse GettingAllPaymentMethodsForACompany() throws IOException {
    CloseableHttpClient httpClient = HttpClients.createDefault();
    HttpGet request = new HttpGet("https://paymentmethodsdemo.iqmetrix.net/v1/Companies(14146)/PaymentMethods");
     
    request.addHeader("Authorization", "Bearer (Access Token)"); 
    request.addHeader("Accept", "application/json"); 
    
    return httpClient.execute(request);
}
require 'rest-client'



response = RestClient.get 'https://paymentmethodsdemo.iqmetrix.net/v1/Companies(14146)/PaymentMethods', {
     :'Authorization' => 'Bearer (Access Token)',
     :'Accept' => 'application/json',
    } 

puts response

URI Parameters

Response Parameters

Example Response

HTTP 200 Content-Type: application/json
[
    {
        "Id": 4,
        "PaymentName": "Cash",
        "IsPrivate": false,
        "PaymentMethodType": "PhysicalCurrency"
    }
]

Array[PaymentMethod]

ERRORS

HTTP Status Code Description How to Resolve
HTTP 404 That result was not found Ensure PaymentMethodId is correct
Was this page helpful?