Workflow
Last updated
Was this helpful?
Use the following URL: https://api.avangate.com/channel-manager/2.1/rpc/
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.
{
"id" : <int identifier>,
"jsonrpc" : 2.0,
"response" : {<return object>}
}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 object
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).
Calling API methods involves sending an API request to Avangate. The request object is detailed below.
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 included into the RPC call need to be provided by-position using an Array (structured value). The values must be in the order expected by Avangate. At this point we don't support by-name parameters.
Last updated
Was this helpful?
Was this helpful?
{
"id" : <int identifier>,
"jsonrpc" : 2.0,
"error" : { "code" : <int error code>, "message" : "<error message>"}
}{
"jsonrpc" : 2.0,
"id" : <int identifier>,
"method" : "<methodName>",
"params" : [<parameters array>]
}