Payment methods

On this page:

THE PAYMENT METHOD OBJECT

A detailed description of the JSON object

THE PAYMENT METHOD DRIVER OBJECT

A detailed description of the JSON object

GET[base]/methods

Get a payment methods list

GET[base]/methods/{methodId}

Get payment method details

POST[base]/methods

Add a new payment method

PUT[base]/methods/{methodId}

Update a payment method

DELETE[base]/methods/{methodId}

Delete a payment method

GET[base]/methods/{methodId}/drivers

Get a payment method drivers list

GET[base]/methods/{methodId}/drivers/{driverId}

Get payment method driver details

POST[base]/methods/{methodId}/drivers

Add a new payment method driver

PUT[base]/methods/{methodId}/drivers/{driverId}

Update a payment method driver

DELETE[base]/method/{methodId}/drivers/{driverId}

Delete a payment method driver

GET[base]/methods/{methodId}/drivers/{driverId}/diagnostics

Run payment method diagnostics


The Payment method object

This object provides the following data about a payment method:

methodId string

The payment method identifier.

name string

The payment method name.

provider string

The payment method provider.

createTime string

The date and time when the object has been created.

updateTime string

The date and time when the object has been last updated.

uuid string

The unique universal identifier of the object (if provided). Refer to Integrations for more information.

THE PAYMENT METHOD OBJECT
{
  "methodId": "6006dda272f002519c3eb505",
  "name": "Wallet",
  "provider": "wallet",
  "createTime": "2021-01-01T00:00:00+00:00",
  "updateTime": "2021-01-01T00:00:00+00:00",
  "uuid": null
}

The Payment method driver object

This object provides the following data about a payment method driver:

driverId string

The driver identifier.

driverNumber string

The driver number.

address string

The driver address.

credentials object

The credentials used to access a driver.

name string

The driver name.

provider string

The provider name.

version integer

The driver version.

createTime string

The date and time when the object has been created.

updateTime string

The date and time when the object has been last updated.

uuid string

The unique universal identifier of the object (if provided). Refer to Integrations for more information.

THE PAYMENT METHOD DRIVER OBJECT
{
  "driverId": "6006dda272f002519c3eb505",
  "driverNumber": "12345",
  "address": "mysql:host=localhost;port=3306;dbname=test;charset=utf8;collation=utf8_unicode_ci;timezone=+00:00",
  "credentials": {
    "username": "Report"
  },
  "name": "Report",
  "provider": "PDO",
  "version": 2,
  "createTime": "2021-01-01T00:00:00+00:00",
  "updateTime": "2021-01-01T00:00:00+00:00",
  "uuid": null
}

Get a payment methods list

Use this method to obtain a list of payment methods.

To obtain detailed information about a specified payment method, use a separate method to get payment method details.

Request

Header parameters:

  • Authorization: Bearer <token>

Query parameters:

This method supports pagination, sorting, and filtering. For details on applying the parameters, refer to the Query parameters section. Possible parameters for filtering and sorting are listed below. For values description, refer to the Payment method object.

Possible values for the filter parameter:

  • methodName

Possible values for the sort_by parameter:

  • createTime (default)

  • methodId

  • name

  • provider

  • updateTime

GET[base]/methods

curl --location -g --request GET 'https://your.base-url.here/methods?limit=10&offset=0&sort_by=createTime&sort_order=desc&filter[methodName]=Wallet' \
--header 'Authorization: Bearer <token>'

Response

Body:

In case of success, the response body contains an array of Payment method objects providing information about all payment methods that correspond to the query parameters specified in the request.


Get payment method details

Use this method to obtain detailed information about a specified payment method.

To obtain a list of payment methods, use a separate method to get a list of payment methods.

Request

Header parameters:

  • Authorization: Bearer <token>

Path parameters:

methodId required

The payment method identifier.

GET[base]/methods/{methodId}

curl --location --request GET 'https://your.base-url.here/methods/60ba407d15951453e60e49f8' \
--header 'Authorization: Bearer <token>'

Response

Body:

In case of success, the response body contains a Payment method object providing information about the specified payment method.


Add a new payment method

Use this method to add a new payment method.

Request

Header parameters:

  • Authorization: Bearer <token>

  • Content-Type: application/json

Body:

drivers array

An array of Drivers objects.

Expand fields
address string

The address of a driver.

The string value length can’t exceed 1024 characters.

name string

The name of a driver.

The string value length can’t exceed 255 characters.

provider string

The driver provider.

version integer

The version of a driver.

credentials object

The credentials used to access a driver.

provider string required

The payment method provider name.

name string

The payment method name.

uuid string

The unique universal identifier of the object. Refer to Integrations for more information.

POST[base]/methods

curl --location --request POST 'https://your.base-url.here/methods' \
--header 'Authorization: Bearer <token>' \
--data-raw '{
  "provider": "wallet",
  "drivers": [
    {
      "address": "mysql:host=localhost;port=3306;dbname=test;charset=utf8;collation=utf8_unicode_ci;timezone=+00:00",
      "credentials": {
        "username": "Report",
        "password": "3213dwqdwqdwq"
      },
      "name": "Report",
      "provider": "PDO",
      "version": 2
    },
    {
      "address": "mysql:host=localhost;port=3306;dbname=test;charset=utf8;collation=utf8_unicode_ci;timezone=+00:00",
      "credentials": {
        "username": "Report",
        "password": "3213dwqdwqdwq"
      },
      "name": "Report",
      "provider": "PDO",
      "version": 2
    }
  ],
  "name": "Wallet",
  "uuid": null
}'

Response

Body:

In case of success, the response body contains a Payment method object providing information about the newly created payment method.


Update a payment method

Use this method to update a specified payment method.

Note

Instead of the method described below, you can use a similar method that uses the HTTP verb PATCH.

Request

Header parameters:

  • Authorization: Bearer <token>

  • Content-Type: application/json

Path parameters:

methodId required

The payment method identifier.

Body:

The values of the following fields can be updated:

name string

The payment method name.

uuid string

The unique universal identifier of the object. Refer to Integrations for more information.

PUT[base]/methods/{methodId}

curl --location --request PUT 'https://your.base-url.here/methods/60ba407d15951453e60e49f8' \
--header 'Authorization: Bearer <token>' \
--data-raw '{
  "name": "Wallet",
  "uuid": null
}'

Response

Body:

In case of success, the response body contains a Payment method object providing information about the updated payment method.


Delete a payment method

Use this method to delete a specified payment method.

Request

Header parameters:

  • Authorization: Bearer <token>

Path parameters:

methodId required

The payment method identifier.

DELETE[base]/methods/{methodId}

curl --location --request DELETE 'https://your.base-url.here/methods/60ba407d15951453e60e49f8' \
--header 'Authorization: Bearer <token>'

Response

Body:

In case of success, no response body is returned.


Get a payment method drivers list

Use this method to obtain a list of payment method drivers.

To obtain detailed information about a specified payment method driver, use a separate method to get payment method driver details.

Request

Header parameters:

  • Authorization: Bearer <token>

Path parameters:

methodId required

The payment method identifier.

GET[base]/methods/{methodId}/drivers

curl --location --request GET 'https://your.base-url.here/methods/60ba407d15951453e60e49f8/drivers' \
--header 'Authorization: Bearer <token>'

Response

Body:

In case of success, the response body contains an array of Driver objects providing information about all drivers that correspond to the query parameters specified in the request.


Get payment method driver details

Use this method to obtain detailed information about a specified payment method driver.

To obtain a list of payment method drivers, use a separate method to get a list of payment method drivers.

Request

Header parameters:

  • Authorization: Bearer <token>

Path parameters:

methodId required

The payment method identifier.

driverId required

The payment method driver identifier.

GET[base]/methods/{methodId}/drivers/{driverId}

curl --location --request GET 'https://your.base-url.here/methods/60ba407d15951453e60e49f8/drivers/60ba407d15951453e60e49f8' \
--header 'Authorization: Bearer <token>'

Response

Body:

In case of success, the response body contains a Driver object providing information about the specified payment method driver.


Add a new payment method driver

Use this method to add a new payment method driver.

Request

Header parameters:

  • Authorization: Bearer <token>

  • Content-Type: application/json

Path parameters:

methodId required

The payment method identifier.

Body:

address string

The driver address.

credentials object

The credentials used to access a driver.

name string

The driver name.

provider string

The provider name.

version integer

The driver version.

uuid string

The unique universal identifier of the object. Refer to Integrations for more information.

POST[base]/methods/{methodId}/drivers

curl --location --request POST 'https://your.base-url.here/methods/60ba407d15951453e60e49f8/drivers' \
--header 'Authorization: Bearer <token>' \
--data-raw '{
  "provider": "PDO",
  "address": "mysql:host=localhost;port=3306;dbname=test;charset=utf8;collation=utf8_unicode_ci;timezone=+00:00",
  "credentials": {
    "username": "Report",
    "password": "3213dwqdwqdwq"
  },
  "name": "Report",
  "version": 2,
  "uuid": null
}'

Response

Body:

In case of success, the response body contains a Driver object providing information about the newly created payment method driver.


Update a payment method driver

Use this method to update a specified payment method driver.

Note

Instead of the method described below, you can use a similar method that uses the HTTP verb PATCH.

Request

Header parameters:

  • Authorization: Bearer <token>

  • Content-Type: application/json

Path parameters:

methodId required

The payment method identifier.

driverId required

The payment method driver identifier.

Body:

The values of the following fields can be updated:

address string

The driver address.

credentials object

The credentials used to access a driver.

name string

The driver name.

version integer

The driver version.

uuid string

The unique universal identifier of the object. Refer to Integrations for more information.

PUT[base]/methods/{methodId}/drivers/{driverId}

curl --location --request PUT 'https://your.base-url.here/methods/60ba407d15951453e60e49f8/drivers/60ba407d15951453e60e49f8' \
--header 'Authorization: Bearer <token>' \
--data-raw '{
  "address": "mysql:host=localhost;port=3306;dbname=test;charset=utf8;collation=utf8_unicode_ci;timezone=+00:00",
  "credentials": {
    "username": "Report",
    "password": "3213dwqdwqdwq"
  },
  "version": 2,
  "name": "Report",
  "uuid": null
}'

Response

Body:

In case of success, the response body contains a Driver object providing information about the updated payment method driver.


Delete a payment method driver

Use this method to delete a specified driver.

Request

Header parameters:

  • Authorization: Bearer <token>

Path parameters:

methodId required

The payment method identifier.

driverId required

The payment method driver identifier.

DELETE[base]/methods/{methodId}/drivers/{driverId}

curl --location --request DELETE 'https://your.base-url.here/methods/60ba407d15951453e60e49f8/drivers/60ba407d15951453e60e49f8' \
--header 'Authorization: Bearer <token>'

Response

Body:

In case of success, no response body is returned.


Run payment method diagnostics

Use this method to run payment methods diagnostics.

Request

Header parameters:

  • Authorization: Bearer <token>

Path parameters:

methodId required

The payment method identifier.

driverId required

The payment method driver identifier.

GET[base]/methods/{methodId}/drivers/{driverId}/diagnostics

curl --location --request GET 'https://your.base-url.here/methods/60ba407d15951453e60e49f8/drivers/60ba407d15951453e60e49f8/diagnostics' \
--header 'Authorization: Bearer <token>'

Response

Body:

health boolean

If true, the payment method operates correctly. If false, diagnostics failed.

message string

If diagnostics failed, this field contains a problem description. If the payment method operates correctly, null.

RESPONSE BODY EXAMPLE
{
  "health": true,
  "message": null
}