POST payment_gateway_requests/bulk/process

Available from CRM.COM R11.0.0

This method is used to set multiple payment gateway requests, which are in a "Pending" life cycle state, to an "Under Processing" state within a single Web API method call. Note that the maximum number of payment gateway requests that can be specified is 1000

Resource URL

Parameters

Name

Type

Description

token

String

The token retrieved from the login method

payment_gateway_requests_set

(mandatory)

Set of Payment Gateway Request Objects

The set of payment gateway requests that will be processed by this Web API method. Note that the maximum number of payment gateway requests that can be specified within a single Web API call is 1000

fields_set

(optional)

List of Strings, comma separated

 

A list of fields that should be included in the results. If not specified then all the available fields will be returned

Referred Parameter Objects


 bulk payment gateway request parameter object data

Name

Type

Description

request_unique_identifier

(mandatory)

StringA unique identifier of the request, provided by the caller, in order to identify the successful or failed results. Note that this information should be unique and is not stored within CRM.COM

payment_gateway_request_identifier

(mandatory)

 

Payment Gateway Request Identifier

The payment gateway request that will be set as "Under Processing". Only payment gateway requests which are in an "Under Processing" life cycle state can be specified. Only pending payment gateway requests can be specified. The allowed payment gateway request identifier fields are the following:

Name

Type

Description

id

(semi-optional)

String

The id of the payment gateway request

number

(semi-optional)

String

The number of the retrieved payment gateway request

reference_numberStringA reference number that will be set on the payment gateway request that will be set as "Under Processing".

Response Data

Name

Type

Description

processed_payment_gateway_requests_set

Set of Processed Payment Gateway Request Objects

A set that contains the ID and the number of the payment gateway requests that were processed successfully

 

unprocessed_payment_gateway_requests_set

Set of Unprocessed Payment Gateway Request Objects

A set that contains the ID and the number of the payment gateway requests that were not processed successfully due to an error. Each row includes the unique request identifier , as provided by the caller, along with an error code and error description.

 

Referred Objects Response Data

 processed payment gateway request object response data

Name

Type

Description

request_unique_identifierStringA unique identifier of the request, as provided by the caller, in order to identify the successful results.

id

String

The ID of the payment gateway request

number

String

The number of the payment gateway request

 unprocessed payment gateway request object response data

Name

Type

Description

request_unique_identifierStringA unique identifier of the request, as provided by the caller, in order to identify the failed results.
error_code

String

The code of the error that was raised

error_descriptionString

The description of the error that was raised


Examples

 Example 1

HTTP Method: POST

 

Request:

Body:

{
  "token":"{{token}}",
  "payment_gateway_requests_set":
   [
        {
            "request_unique_identifier":"01",
            "payment_gateway_request_identifier":{"number":"49"},
            "reference_number":"R0001"
        },
        {
            "request_unique_identifier":"02",
            "payment_gateway_request_identifier":{"number":"55"},
            "reference_number":"R0002"
        }
    ]
}


Response:

{
  "data": {
    "processed_payment_gateway_requests_set": [
      {
        "number": "49",
        "id": "7C6A80E14F41452DA2D03E3CEDE43365",
        "request_unique_identifier": "01"
      }
    ],
    "unprocessed_payment_gateway_requests_set": [
      {
        "error_description": "Error:Cannot Set Payment Gateway Request Into UNDER_PROCESSING Life Cycle State. Payment Gateway Request Life Cycle State is Not PENDING. - Description:Cannot set Payment Gateway Request into UNDER_PROCESSING life cycle state. Payment Gateway Request life cycle state is not PENDING.",
        "error_code": "CannotSetPaymentGatewayRequestUnderProcessingException",
        "request_unique_identifier": "02"
      }
    ]
  },
  "status": {
    "code": "OK",
    "description": "",
    "message": ""
  }
}