Skip to main content

Workflow

Last updated: 05-Sep-2019
Rate this article:
  1. Use the following URL: https://api.avangate.com/channel-manager/2.1/rpc/
  2. Authenticate using the login method and create a session (connection).
  3. Set partner
  4. Throughout the lifetime of the session (max 10 minutes), you can invoke all 2Checkout API methods. To invoke methods you need to send a request to 2Checkout. Read more on the request object below.
  5. The 2Checkout system provides responses to all requests. Read more on the response object below.

Response

Whenever you call an API method, 2Checkout replies with a response. The response is a single object serialized using JSON.

There are two types of response, with the properties detailed below.

Valid response

{
"id" : <int identifier>,
"jsonrpc" : 2.0,
"response" : {<return object>}
}
Valid response object
Properties Type/Description
jsonrpc Required (string)
  JSON-RPC protocol version. Must be 2.0.
id Required (int)
  Mandatory identifier that you control, used to identify the request and the response. Use only integer values.
response Required (object)
  Provided on success (is not included if there was an error invoking the method). Actual value depends on the method invoked.

Invalid response

{
"id" : <int identifier>,
"jsonrpc" : 2.0,
"error" : { "code" : <int error code>, "message" : "<error message>"}
}
Invalid response object
Properties Type/Description
jsonrpc Required (string)
  JSON-RPC protocol version. Must be 2.0.
id Required (int)
  Mandatory identifier that you control, used to identify the request and the response. Use only integer values.
error Required (object)
 

Code - Integer identifying the error.

Message - Error description (string).

Request

Calling API methods involves sending an API request to Avangate. The request object is detailed below. 

{ 
"jsonrpc" : 2.0, 
"id" : <int identifier>, 
"method" : "<methodName>", 
"params" : [<parameters array>] 
}
Request object
Properties Type/Description
jsonrpc Required (string)
  JSON-RPC protocol version. Must be 2.0.
id Required (int)
  Mandatory identifier that you control, used to identify the request and the response. Use only integer values.
method Required (string)
  The name of the method invoked. Case sensitive.
params Optional (object)
 

An object/structure containing the parameters valid for invoking the method used.

 

Parameters structure:

 

Parameters included into the RPC call need to be provided by-position using an Array. (structured value)

 

by-position: include all parameters into an Array. The values must be in order expected by Avangate.

 

At this point we don't support by-name parameters.

 

Rate this article:

Need help?

Do you have a question? If you didn’t find the answer you are looking for in our documentation, you can contact our Support teams for more information. If you have a technical issue or question, please contact us. We are happy to help.

Not yet a Verifone customer?

We’ll help you choose the right payment solution for your business, wherever you want to sell, in-person or online. Our team of experts will happily discuss your needs.

Verifone logo