Deactivate a payment method
Takes one of the company's own payment methods out of use without removing it. The method stays on file with its deactivated timestamp and the reason you give. A method that is already deactivated is returned unchanged. Requires the payment_methods:write permission.
Authorization
AuthorizationstringrequiredPath parameters
methodIdstringrequiredThe payment method to deactivate. A Snowflake id, sent as a decimal string.
Body
application/json
Why the method is being taken out of use.
reasonstringrequiredThe reason, 1 to 500 characters. It is stored and returned as deactivationReason.
Response
200 · The payment method after being deactivated.
idstringrequiredThe payment method. Send this value wherever a methodId is asked for. A Snowflake id, sent as a decimal string.
typeenum<string>requiredWhat kind of funding source this is. ach is a US bank account reached by Automated Clearing House transfer.
brandstringThe card network or bank brand the processor reported, for example "Visa". Absent when the processor reported none.
holderstringThe name on the card or bank account, as the processor reported it. Absent when the processor reported none.
last4stringThe last four digits of the card or account number. The full number is never returned. Absent when the processor reported none.
expiresobjectThe card expiry, month and year only. Absent for bank accounts, and for cards whose expiry the processor did not report.
cardTypeenum<string>Whether the card draws on a bank balance or a credit line. Absent for bank accounts, and when the processor did not report it.
accountTypeenum<string>The kind of bank account. Absent for cards, and when the processor did not report it.
descriptionstringThe free-text label supplied when the method was added. Absent when none was given.
deactivatedstring · date-timeWhen the method was deactivated, in the company's timezone and without an offset. Absent while the method is usable.
isDeactivatedbooleanrequiredTrue when deactivated is present. A deactivated method stays on file but cannot be charged.
deactivationReasonstringThe reason given when the method was deactivated. Absent while the method is usable.
createdstring · date-timerequiredWhen the method was added, in the company's timezone and without an offset.
capabilitiesenum<string>[]requiredWhat the method may be used for. collect takes money in, payout sends money out. Bank accounts normally get both; cards get collect only. The array is empty when the method has no capability with the processor MagicDoor currently runs.
400 · `reason` is missing, empty, or longer than 500 characters.
401 · The request carried no valid access token.
403 · The token is not a property manager token, or it lacks the `payment_methods:write` permission.
404 · No such payment method, or it belongs to another company, or it was deleted, or it belongs to a tenant, owner, vendor, or applicant rather than to the company itself.
422 · This is the company's last usable payment method, so it cannot be deactivated.
MagicDoor collects the company's own fees from these methods, so the last usable one cannot be deactivated. The check counts the company's own methods that are not deactivated, and refuses with 422 when only one is left.