---
title: "Refund a guest's payment provider payment"
method: POST
path: "/api/public/v1/payments/refundProviderPayment"
---

# Refund a guest's payment provider payment

`POST /api/public/v1/payments/refundProviderPayment`

## Request

- Base URL: `https://app.fortuneos.ai`
- URL: `https://app.fortuneos.ai/api/public/v1/payments/refundProviderPayment`
- Auth: none declared

Sends a real refund to the guest's card through the payment provider that took the payment (MyFatoorah today), even if the business has since switched providers: all that is left of the payment, `amountCents` of it, or the `itemIds` a payment made by items paid for, plus the guest's QR tip on it in the share of the payment refunded, given back as a negative tip row once the provider returns it. Answers `pending` once the provider accepted it, `scheduled` when its balance can't fund it yet (sent again daily), or `unknown` when it never answered (looked up before anything is resent). Refused with BAD_REQUEST and refusal `notMyFatoorah` for a payment not made through a payment provider, BAD_REQUEST and refusal `overLimit` for more than is left of it, CONFLICT and refusal `inDoubt` while its last refund is still unconfirmed, and PRECONDITION_FAILED when the business has no connection to that provider. A retried `idempotencyKey` returns the same refund. An order that sold or renewed a guest's pass is refunded only whole, within 14 days of the sale and while the pass is unused; anything else is refused with BAD_REQUEST and refusal `passRefundPartial`, `passRefundLate` or `passRefundUsed` before the provider is asked, and an allowed refund voids the pass or takes the renewal back. Refused with FORBIDDEN as `paywallLocked` when the caller is an Owner or Manager of a business the merchant Paywall locks: one with no verified subscription that has taken 5 orders while the Paywall's rollout reaches it, an order counting from its first saved line, whether or not it is paid or completed, until it is archived or cancelled before activation. Nothing is read or written; a verified subscription lifts the lock.

## Request body

- object
  - `orderId` string, required
  - `paymentId` string, required
  - `amountCents` integer
  - `itemIds` string[]
  - `reason` string
  - `idempotencyKey` string, required

## Response `200`

OK

- object
  - `refundId` string, required
  - `status` 'requested' | 'scheduled' | 'pending' | 'refunded' | 'canceled' | 'failed' | 'unknown' | 'released' | 'withdrawn', required

## Changes

- **2026-11-04** `18e5eca1efb4`: 1 info
  - endpoint added

[Operation history](https://skmtc.dev/fortis/apis/fortune-os-api/changes/api/public/v1/payments/refundProviderPayment/post.md)

---

[API](https://skmtc.dev/fortis/apis/fortune-os-api.md) - [All operations](https://skmtc.dev/fortis/apis/fortune-os-api/llms.txt) - [OpenAPI document](https://skmtc.dev/fortis/apis/fortune-os-api/revisions/522f3cea550d?raw)
