Documentation

sale.paysystem.settings.get

Scope: pay_system Permission to execute: administrator

Description and parameters

Method returns payment system settings.


Method parameters

Required parameters are marked with asterisk (*)

Parameter Description
ID*
sale_paysystem.ID
Payment system identifier to get the settings
PERSON_TYPE_ID*
sale_person_type.id
Payer type identifier to get the settings. Pass 0 to get default settings.

Code examples


  • cURL (Webhook)
    curl -X POST \
    -H "Content-Type: application/json" \
    -H "Accept: application/json" \
    -d '{"ID":11,"PERSON_TYPE_ID":1}' \
    https://**put_your_bitrix24_address**/rest/**put_your_user_id_here**/**put_your_webhook_here**/sale.paysystem.settings.get
    
  • cURL (OAuth)
    curl -X POST \
    -H "Content-Type: application/json" \
    -H "Accept: application/json" \
    -d '{"ID":11,"PERSON_TYPE_ID":1,"auth":"**put_access_token_here**"}' \
    https://**put_your_bitrix24_address**/rest/sale.paysystem.settings.get
    
  • JS
    BX24.callMethod('sale.paysystem.settings.get', {
    	'ID': 11,
    	'PERSON_TYPE_ID': 1,
    }, 
    	function(result) 
    	{ 
    		if(result.error()) 
    			console.error(result.error()); 
    		else 
    		{ 
    			console.dir(result.data()); 
    		} 
    	} 
    );
  • PHP
    require_once('crest.php');
    
    $result = CRest::call(
    	'sale.paysystem.settings.get',
    	[
    		'ID' => 11,
    		'PERSON_TYPE_ID' => 1
    	]
    );
    
    echo '
    ';
    print_r($result);
    echo '
    ';

Response and error processing


Response processing

HTTP-status: 200

{
	"result": {
		"REST_SERVICE_ID_IFRAME": "snum",
		"REST_SERVICE_KEY_IFRAME": "skey",
		"PS_WORK_MODE_IFRAME": "REGULAR"
	},
	"time": {
		"start": 1712135335.026931,
		"finish": 1712135335.407762,
		"duration": 0.3808310031890869,
		"processing": 0.0336611270904541,
		"date_start": "2024-04-03T11:08:55+02:00",
		"date_finish": "2024-04-03T11:08:55+02:00",
		"operating_reset_at": 1705765533,
		"operating": 3.3076241016387939
	}
}

Returned data

Parameter Description
result
object
Response root element.

Object keys are parameter codes, specified when adding a handler via [link=6345193]sale.paysystem.handler.add[/link] in the CODES parameter.

Object values are the parameter values as follows:

time
time
Query execution time

Error processing

HTTP-статус: 400, 403

{
	"error": " ERROR_CHECK_FAILURE",
	"error_description": "Pay system not found"
}
Title Description
error
string
Error string code. Can contain digits, Latin letters and underscore characters
error_description
error_description
Error text description. Description is not intended to be displayed to an end-user in the unprocessed format

Possible error codes

Code Description Status
ACCESS_DENIED Insufficient permissions to read settings 403
ERROR_CHECK_FAILURE One or several required field values are not specified or a specified payment system is not found (find more details in the error description) 400


© «Bitrix24», 2001-2024