Lease deposits

Record a deposit payment

Records a deposit payment the tenant made outside MagicDoor and applies it to the lease's outstanding deposits. The date may not be in the future.

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

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 being paid. A Snowflake id, sent as a decimal string.

example: 1830472847398404096

Body

application/json

amountnumberrequired

How much was paid, as a decimal amount of at least 1.

datestring · daterequired

The date the payment was taken. May not be in the future.

paymentMethodenum<string>

How the tenant paid. Defaults to other when left out.

checkcashiersCheckmoneyOrdercashother
referencestring

Cheque number or similar. Up to 200 characters.

descriptionstring

Note on the payment. Up to 1000 characters.

tenantIdstring

Which tenant paid. A Snowflake id, sent as a decimal string.

targetDepositIdsstring[]

Apply the money only to these deposits. Leave it out to let MagicDoor allocate it.

Response

200 · The payment transaction that was recorded.

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 request failed validation. `errors` maps each field name to what was wrong with it.

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

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

422 · The payment date is in the future.