Payment Systems: Overview of Methods
If you are developing integrations for Bitrix24 using AI tools (Codex, Claude Code, Cursor), connect to the MCP server so that the assistant can utilize the official REST documentation.
Payment systems accept payments from customers. For example, you can integrate bank acquiring or an online payment service. The customer selects a payment method during the checkout process, after which the system processes the transaction.
This section consolidates methods for registering a handler, creating a payment system, configuring parameters, and initiating payments.
Quick navigation: all methods
Relationships with Other Objects
The payment system operates in conjunction with the payer type, payment, order, and handler. These connections determine the availability of the system and the external service through which the payment is processed.
Payer Type. The parameter PERSON_TYPE_ID defines which type of payer the payment system operates for.
Payment. The parameters PAYMENT_ID and PAY_SYSTEM_ID link the payment to a specific payment system. The payment settings are returned by the method sale.paysystem.settings.payment.get, and the payment is initiated by sale.paysystem.pay.payment.
Order. In the CRM invoice scenario, payment is executed through the associated order at the API level. When paying the invoice, the system changes the payment status of that order. The link between the invoice and the order is returned by the method crm.orderentity.list.
REST Handler. The code BX_REST_HANDLER connects the payment system with an external payment provider.
How to Get Started
- Obtain the payer type identifier
PERSON_TYPE_IDusing the method sale.persontype.list. - Register the REST handler using the method sale.paysystem.handler.add.
- Create the payment system using the method sale.paysystem.add. Pass
PERSON_TYPE_IDand the handler codeBX_REST_HANDLER. - Check the result using the method sale.paysystem.list. If necessary, update the data using the method sale.paysystem.update.
- Configure the operational parameters using the methods sale.paysystem.settings.get and sale.paysystem.settings.update.
- To process the order payment, obtain
PAYMENT_IDusing the method sale.payment.list, then initiate the payment through sale.paysystem.pay.payment. - For the CRM invoice, use a separate scenario: obtain
orderIdvia crm.orderentity.list, then findPAYMENT_IDin sale.payment.list with the filter{"=orderId": <orderId>}and pass this identifier to crm.item.payment.pay.
Overview of Methods
Scope:
pay_systemWho can execute the methods: depending on the method
REST Handlers for Payment Systems
|
Method |
Description |
|
Adds a REST handler for the payment system |
|
|
Updates a REST handler for the payment system |
|
|
Returns a list of REST handlers for the payment system |
|
|
Deletes a REST handler for the payment system |
Payment Systems
|
Method |
Description |
|
Adds a payment system |
|
|
Modifies a payment system |
|
|
Returns a list of payment systems |
|
|
Deletes a payment system |
|
|
Returns settings for the payment system |
|
|
Updates settings for the payment system |
|
|
Returns settings for the payment system for a specific payment |
|
|
Initiates payment for an order through the selected payment system |