💰 Создание платежа
Code samples
POST /v2/payments
Body parameter
{
"currency": "rub",
"amount": "1000.50",
"uuid": "invoice_123",
"shopId": 5,
"description": "Покупка булочек",
"website_url": "https://example.com",
"subscribe": null,
"holdTime": null,
"language": "ru",
"items": [
{
"description": "string",
"quantity": 0,
"price": 0,
"vat_code": 0,
"payment_subject": 1,
"payment_mode": 1,
"product_code": "string",
"country_of_origin_code": "string",
"customs_declaration_number": "string",
"excise": "string",
"measurement_unit": 0
}
],
"sign": "string"
}
🛠️ Параметры
| Name | In | Type | Required | Description |
|---|---|---|---|---|
| body | body | PaymentRequest | false | none |
Example responses
201 Response
{
"success": true,
"paymentUrl": "https://mulenpay.ru/",
"id": 1
}
401 Response
{
"error": "unauthorized",
"status": 401
}
422 Response
{
"error": "param is missing or the value is empty: article",
"status": 422
}
🔁 Ответы
| Status | Meaning | Description | Schema |
|---|---|---|---|
| 201 | Created | Платеж | Inline |
| 401 | Unauthorized | Unauthorized | None |
| 422 | Unprocessable Entity | Ошибка валидации данных | None |
Response Schema
Status Code 201
| Name | Type | Required | Restrictions | Description |
|---|---|---|---|---|
| » success | boolean | false | none | Флаг успеха |
| » paymentUrl | string | false | none | URL для оплаты |
| » id | integer | false | none | ID платежа |