Initiate fee processing between master and investment accounts
Use this API method to initiate fee processing between a master account and a subscribed investment account
To initiate fee calculation and deduction from investment accounts subscribed to a specific master account, use the following method:
POST [host]/api/admin/fees/v2/fee/feeservice/processext
Request
Body parameters
account_login
string
Yes
The account login (number).
request_id
string
Yes
The identifier of a withdrawal request initiated in the external CRM system.
Key points about request_id
The request_id represents the withdrawal operation ID in your external CRM system. It's used is to link a withdrawal request in the CRM with fee processing in B2COPY.
How it works:
A user initiates a withdrawal request in your CRM.
The CRM generates a unique ID for this withdrawal.
You pass this ID as
request_idto the B2COPY API method.Use the same
request_idin subsequent polling requests to track the fee payment status for this withdrawal.
This ensures a direct and reliable connection between the withdrawal in your CRM and its corresponding fee processing in B2COPY.
Request example
curl -X POST "https://demo-standalone-v2.prod.b2copy.tech/api/admin/fees/v2/fee/feeservice/processext" \
-H "Authorization: Bearer <your-access-token>" \
-d '{
"account_login": "123456",
"request_id": "withdrawal_req_789"
}'Response
The response returns the status of the initiated fee processing.
Response example
Possible statuses:
1 —
FEE_PROCESS_STATUS_PENDING: the request is being processed (temporary status).Fee payments from investment accounts to the master account are in progress. After receiving this status, start monitoring by using polling.
2 —
FEE_PROCESS_STATUS_SUCCESS: the request completed successfully (final status).All fees have been paid from investment accounts to the master account. No further action is required.
3 —
FEE_PROCESS_STATUS_ERROR: an error occurred during request processing (final status).Check the error details and retry if necessary.
Polling implementation
The FEE_PROCESS_STATUS_PENDING status is temporary and indicates that B2COPY is actively processing fee payments between accounts. Implement polling as follows:
After make the initial request with
account_loginandrequest_idand receiving theFEE_PROCESS_STATUS_PENDINGstatus, wait 3-5 seconds.Repeat the request with the same
request_id.Continue polling until you receive
FEE_PROCESS_STATUS_SUCCESSorFEE_PROCESS_STATUS_ERROR.
Polling example
Last updated
Was this helpful?

