Lease charges

Pay out a credit balance to a tenant

Pays money back to a tenant when the lease is in credit — for example after a final reconciliation. Choose how the money leaves with paymentType, and fill in the fields that method needs.

POST
https://api.portal.magicdoor.com/company-app/leases/{leaseId}/charges/release

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

leaseIdstringrequired

The lease holding the credit balance. A Snowflake id, sent as a decimal string.

example: 1830472847398404096

Body

application/json

tenantIdstringrequired

The tenant to pay. A Snowflake id, sent as a decimal string.

amountnumberrequired

How much to pay out, as a decimal amount of at least 1.

paymentTypeenum<string>required

How the money leaves: print a cheque, record a payment made outside MagicDoor, or send an ACH transfer.

printCheckmanualach
memostring

Note on the payout. Up to 500 characters.

paymentDatestring · date

The date the payment was made. Only used for printCheck and manual, and may not be in the future.

paymentMethodenum<string>

How the money was actually moved. Required when paymentType is manual.

achdebitCardwalletcreditCardcheckcashiersCheckmoneyOrdercashzelleothercredittransfer
externalTransactionIdstring

Reference from wherever the money moved. Required when paymentType is manual, 1 to 200 characters.

paymentAccountIdstring

The tenant payment account to send to. Give this or paymentMethodId, not both, when paymentType is ach. A Snowflake id, sent as a decimal string.

paymentMethodIdstring

The payment method to send to. Give this or paymentAccountId, not both, when paymentType is ach. A Snowflake id, sent as a decimal string.

Response

200 · The outgoing transaction that was created.

idstring

Id of the transaction. A Snowflake id, sent as a decimal string.

createdstring · date-time

When the transaction was recorded, in the company's timezone.

updatedstring · date-time

When the transaction last changed.

creatorobject

Who created the record.

typeenum<string>

What kind of movement this is.

paymentreturnrefunddisputecredittransfer
identityenum<string>

What the money is for.

leaseChargeleaseDepositleaseProcessingFeerentalApplicationFeepropertyChargeownerContributionownerDistributionmanagementFeeserviceBillvendorBillcompanyDisbursementmagicDoorBillbankLedgerTransfer
directionenum<string>

in when money comes to the company, out when it leaves.

inout
amountnumber

Amount moved, as a decimal.

paymentMethodenum<string>

How the money moved.

achdebitCardwalletcreditCardcheckcashiersCheckmoneyOrdercashzelleothercredittransfer
statusenum<string>

Where the transaction has got to.

pendingfailedsuccesscancelledreturnedrefundeddisputingdisputed
transactionDatestring · date

The date the transaction counts for.

finalizedDatestring · date

The date it settled. Absent while it is still moving.

referencestring

Cheque number or other reference the payer gave.

memostring

Free-text note.

bankAccountIdstring

Bank account the money moved through. A Snowflake id, sent as a decimal string.

chartOfAccountIdstring

Account the amount was booked to. A Snowflake id, sent as a decimal string.

portfolioIdstring

Portfolio the transaction belongs to. A Snowflake id, sent as a decimal string.

propertyIdstring

Property the transaction belongs to. A Snowflake id, sent as a decimal string.

unitIdstring

Unit the transaction belongs to. A Snowflake id, sent as a decimal string.

leaseIdstring

Lease the transaction belongs to. A Snowflake id, sent as a decimal string.

tenantIdstring

Tenant the money came from or went to. A Snowflake id, sent as a decimal string.

ownerIdstring

Owner the money came from or went to. A Snowflake id, sent as a decimal string.

vendorIdstring

Vendor the money went to. A Snowflake id, sent as a decimal string.

subsidizerIdstring

Subsidizer the money came from. A Snowflake id, sent as a decimal string.

rentalApplicationIdstring

Rental application the money relates to. A Snowflake id, sent as a decimal string.

externalTransactionTypeenum<string>

Which system moved the money.

plaidstripezelleofflinemagicDoor
externalTransactionIdstring

That system's own id for the movement.

failureReasonenum<string>

Why it failed. Present only on a failed transaction.

noSufficientFundsunknowntransferLimitReachedpaymentProcessorDeclinedcardLoststolenCardexpiredCardpaymentAccountSetupErrorcompanyAccountSetupError
paymentProcessorErrorMessagestring

The processor's own message, when it failed.

transferGroupIdstring

Groups the two halves of a transfer together.

linkedTransactionIdstring

The other transaction in a pair, such as the return of a payment. A Snowflake id, sent as a decimal string.

checkIdstring

The printed cheque this paid out on. A Snowflake id, sent as a decimal string.

recurringPaymentIdstring

The recurring payment that produced this. A Snowflake id, sent as a decimal string.

leaseSubsidyIdstring

The lease subsidy that produced this. A Snowflake id, sent as a decimal string.

allowedChartOfAccountIdsstring[]

Accounts this transaction may be re-booked to.

metadataobject

Free-form key/value data carried on the transaction.

bankAccountobject

The bank account the money moved through.

chartOfAccountobject

The account the amount was booked to.

propertyobject

The property, when the transaction has one.

unitobject

The unit, when the transaction has one.

leaseobject

The lease, when the transaction has one.

tenantobject

The tenant, when the transaction has one.

subsidizerobject

The subsidizer, when the transaction has one.

vendorobject

The vendor, when the transaction has one.

ownerobject

The owner, when the transaction has one.

checkobject

The printed cheque, when the transaction paid out on one.

creatorInfoobject

The full record of whoever created this, under whichever one key matches the creator's type.

400 · The body failed validation, or `paymentDate` is in the future.

401 · The access token is missing, expired, or not for this company.

404 · No lease or tenant matched the id, or it belongs to another company.