Финансы · Чувствительное действие
Платежи · Возврат средств · Создание
payment_refund_create
Попробуйте три запроса
Подготовить
- Вы указываетеPaymentintentid
- ПомощникПодготовка
- Вы получаетеПредпросмотр
Запрос в чат
Подготовь «Платежи / Возврат средств / Создание». Для изменения нужны paymentIntentId, amountMinor. Покажи объект и ожидаемый эффект до выполнения.
- paymentIntentId
- Параметр
- amountMinor
- Параметр
- currency
- Валюта
Применить
- Вы указываетеСогласованные значения
- ПомощникОдин вызов
- Вы получаетеОтвет операции
Запрос в чат
На учебной записи подготовь «Платежи / Возврат средств / Создание» с параметром currency = USD. Покажи остальные обязательные значения и выполни действие, когда согласованы все поля.
- currency
- USD
- confirmed
- true
Проверить итог
- Вы указываетеИсходный ответ
- ПомощникСверка результата
- Вы получаетеПодтверждение
Запрос в чат
Проверь результат «Платежи / Возврат средств / Создание» по исходному ответу. Покажи companyId, operationId. Объясни, чем подтвердить эффект для выбранного объекта.
- ЗапросСохранить исходный ключ
- ОтветПроверить статус
- ПроверкаСверить эффект операции
Как работает действие
Этот вызов может изменить рабочие данные. Согласуйте точный объект, новые значения и ожидаемый результат. Присвойте операции стабильный requestId. При повторе той же операции используйте прежний ключ и те же значения.
Описание разработчика
Refund an exact user-authorized captured Stripe payment through the existing native refundStripePayment service, including partial refunds. Uses durable per-payment exclusion, exact amount/currency/context, and provider result checks. state recorded means a provider refund exists; only providerStatus succeeded proves completion. An uncertain outcome must be recovered with the original request ID, never replaced. Does not by itself restock goods, cancel the order, or prove its accounting reconciliation.
Параметры запроса
- paymentIntentId
- Native paymentIntentId value; use the value and type returned by the corresponding service. обязательно по схеме · string
- amountMinor
- Native amountMinor value; use the value and type returned by the corresponding service. обязательно по схеме · integer · максимум 9007199254740991
- currency
- Native currency value; use the value and type returned by the corresponding service. обязательно по схеме · string
- expectedContextHash
- Native expectedContextHash value; use the value and type returned by the corresponding service. обязательно по схеме · string
- eventTickets
- Bind this refund to exactly the selected issued event tickets. необязательно · object
- confirmed
- The user explicitly authorized refunding this exact payment and amount. Read the context and present the amount/currency first. обязательно по схеме · boolean
- requestId
- Ключ этой операции. Для повтора с теми же аргументами сохраните исходное значение. обязательно по схеме · string
Что вернёт команда
- companyId
- Native companyId value; use the value and type returned by the corresponding service. обязательно по схеме · string
- operationId
- Native operationId value; use the value and type returned by the corresponding service. обязательно по схеме · string
- paymentIntentId
- Native paymentIntentId value; use the value and type returned by the corresponding service. обязательно по схеме · string
- amountMinor
- Native amountMinor value; use the value and type returned by the corresponding service. обязательно по схеме · integer · максимум 9007199254740991
- currency
- Native currency value; use the value and type returned by the corresponding service. обязательно по схеме · string
- state
- Native state value; use the value and type returned by the corresponding service. обязательно по схеме · string · варианты submitted, recorded, rejected
- refundId
- Native refundId value; use the value and type returned by the corresponding service. обязательно по схеме · string / null
- providerStatus
- Native providerStatus value; use the value and type returned by the corresponding service. обязательно по схеме · string / null
- reason
- Native reason value; use the value and type returned by the corresponding service. обязательно по схеме · string / null
- updatedAt
- Native updatedAt value; use the value and type returned by the corresponding service. обязательно по схеме · integer · минимум 0 · максимум 9007199254740991
Поля и технические схемы

Вход · JSON Schema
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"type": "object",
"properties": {
"paymentIntentId": {
"type": "string",
"pattern": "^pi_[A-Za-z0-9]+$",
"description": "Native paymentIntentId value; use the value and type returned by the corresponding service."
},
"amountMinor": {
"type": "integer",
"exclusiveMinimum": 0,
"maximum": 9007199254740991,
"description": "Native amountMinor value; use the value and type returned by the corresponding service."
},
"currency": {
"type": "string",
"pattern": "^[A-Z]{3}$",
"description": "Native currency value; use the value and type returned by the corresponding service."
},
"expectedContextHash": {
"type": "string",
"pattern": "^[a-f0-9]{64}$",
"description": "Native expectedContextHash value; use the value and type returned by the corresponding service."
},
"eventTickets": {
"description": "Bind this refund to exactly the selected issued event tickets.",
"type": "object",
"properties": {
"eventId": {
"type": "string",
"pattern": "^[A-Za-z0-9_-]{1,80}$",
"description": "Event session of the selected tickets."
},
"holdId": {
"type": "string",
"pattern": "^[A-Za-z0-9_-]{1,80}$",
"description": "Reservation that issued the selected tickets."
},
"ticketIds": {
"minItems": 1,
"maxItems": 20,
"type": "array",
"items": {
"type": "string",
"pattern": "^[a-f0-9]{32}$"
},
"description": "Exact separate ticket units to revoke if Stripe confirms the refund."
}
},
"required": [
"eventId",
"holdId",
"ticketIds"
],
"additionalProperties": false
},
"confirmed": {
"type": "boolean",
"const": true,
"description": "The user explicitly authorized refunding this exact payment and amount. Read the context and present the amount/currency first."
},
"requestId": {
"type": "string",
"pattern": "^[A-Za-z0-9_-]{8,128}$",
"description": "Stable request ID for these exact arguments. Keep it if the response is uncertain."
}
},
"required": [
"paymentIntentId",
"amountMinor",
"currency",
"expectedContextHash",
"confirmed",
"requestId"
],
"additionalProperties": false
}Выход · JSON Schema
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"type": "object",
"properties": {
"companyId": {
"type": "string",
"description": "Native companyId value; use the value and type returned by the corresponding service."
},
"operationId": {
"type": "string",
"pattern": "^[a-f0-9]{64}$",
"description": "Native operationId value; use the value and type returned by the corresponding service."
},
"paymentIntentId": {
"type": "string",
"pattern": "^pi_[A-Za-z0-9]+$",
"description": "Native paymentIntentId value; use the value and type returned by the corresponding service."
},
"amountMinor": {
"type": "integer",
"exclusiveMinimum": 0,
"maximum": 9007199254740991,
"description": "Native amountMinor value; use the value and type returned by the corresponding service."
},
"currency": {
"type": "string",
"pattern": "^[A-Z]{3}$",
"description": "Native currency value; use the value and type returned by the corresponding service."
},
"state": {
"type": "string",
"enum": [
"submitted",
"recorded",
"rejected"
],
"description": "Native state value; use the value and type returned by the corresponding service."
},
"refundId": {
"anyOf": [
{
"type": "string",
"pattern": "^re_[A-Za-z0-9]+$"
},
{
"type": "null"
}
],
"description": "Native refundId value; use the value and type returned by the corresponding service."
},
"providerStatus": {
"anyOf": [
{
"type": "string",
"enum": [
"pending",
"requires_action",
"succeeded",
"failed",
"canceled"
]
},
{
"type": "null"
}
],
"description": "Native providerStatus value; use the value and type returned by the corresponding service."
},
"reason": {
"description": "Native reason value; use the value and type returned by the corresponding service.",
"type": [
"string",
"null"
]
},
"updatedAt": {
"type": "integer",
"minimum": 0,
"maximum": 9007199254740991,
"description": "Native updatedAt value; use the value and type returned by the corresponding service."
}
},
"required": [
"companyId",
"operationId",
"paymentIntentId",
"amountMinor",
"currency",
"state",
"refundId",
"providerStatus",
"reason",
"updatedAt"
],
"additionalProperties": false
}