Application payments

Refund an application fee

Refunds all or part of an application fee that was paid by card, returning the money through the card processor and reversing the accounting entry. Requires the rental_applications:write permission.

POST
https://services.magicdoor.com/leasing/company-portal/rental-applications/{applicationId}/payment/refund

Authorization

Authorizationstringrequired
Bearer token — Send your API token in the Authorization header as Bearer <token>. Requests without a valid token are rejected with 401 Unauthorized.

Path parameters

applicationIdstringrequired

The rental application to work with. A Snowflake id, sent as a decimal string.

example: 1830472847398404096

Body

application/json

amountnumberrequired

How much to give back, as a decimal amount. At least 1 and no more than what the applicant paid. A partial refund is allowed, but the payment is still marked fully refunded afterwards.

reasonstring

Why the refund was given. Recorded on the accounting reversal. Between 1 and 500 characters.

Response

200 · The refund went through. The response has no body — re-read the application to see the payment now marked `refunded`.

400 · The refund cannot be made: there is no payment on the application, the payment is not in `paid` status, the amount is more than was paid, or the money was not taken by card through Stripe. Fees recorded offline and fees taken through MagicDoor's own processor cannot be refunded here.

401 · The access token is missing, expired, or not valid.

403 · The caller is authenticated but does not hold the `rental_applications:write` permission.

404 · No rental application with this id exists, or it belongs to another company. Both cases look identical so that ids cannot be probed across companies.

Card payments only

Only fees collected by card through Stripe can be refunded through this API. A fee recorded offline, or collected through MagicDoor's own payment processor, is refused with a 400 — those have to be handled outside MagicDoor, and for the MagicDoor processor the message tells the caller to contact support.

A partial refund still closes the payment

Whatever amount you refund, the payment moves to refunded and no further refund can be made against it.