#Payments
Entity: payment | Scope: sale | Base path: /v1/payments
SPA entity (camelCase field names) — field names pass through without transformation.
#Operations
| Method | Path | Description | Bitrix24 Method |
|---|---|---|---|
GET |
/v1/payments |
List all (with filter, sort, pagination) | sale.payment.list |
GET |
/v1/payments/:id |
Get by ID | sale.payment.get |
POST |
/v1/payments |
Create new | sale.payment.add |
PATCH |
/v1/payments/:id |
Update by ID | sale.payment.update |
DELETE |
/v1/payments/:id |
Delete by ID | sale.payment.delete |
#Fields
| API Name | Bitrix24 Name | Type | Readonly | Description |
|---|---|---|---|---|
id |
id |
number | yes | Идентификатор записи |
orderId |
orderId |
number | ||
paySystemId |
paySystemId |
number | ||
sum |
sum |
number | ||
currency |
currency |
string | ||
paid |
paid |
boolean | ||
datePaid |
datePaid |
datetime | ||
comments |
comments |
string | Комментарий | |
accountNumber |
accountNumber |
string | yes | |
dateBill |
dateBill |
datetime | ||
xmlId |
xmlId |
string | ||
responsibleId |
responsibleId |
number | ||
isReturn |
isReturn |
boolean | ||
paySystemName |
paySystemName |
string | yes |
#Examples
#List
curl -X GET '/v1/payments?limit=10' \
-H 'X-Api-Key: YOUR_KEY'
#Get by ID
curl -X GET '/v1/payments/123' \
-H 'X-Api-Key: YOUR_KEY'
#Create
curl -X POST '/v1/payments' \
-H 'X-Api-Key: YOUR_KEY' \
-H 'Content-Type: application/json' \
-d '{"orderId":1,"paySystemId":1,"sum":1}'
#Update
curl -X PATCH '/v1/payments/123' \
-H 'X-Api-Key: YOUR_KEY' \
-H 'Content-Type: application/json' \
-d '{"title":"updated"}'
#Delete
curl -X DELETE '/v1/payments/123' \
-H 'X-Api-Key: YOUR_KEY'
#Batch
curl -X POST '/v1/batch' \
-H 'X-Api-Key: YOUR_KEY' \
-H 'Content-Type: application/json' \
-d '{"calls":[{"entity":"payments","action":"list","params":{"limit":5}}]}'