GithubHelp home page GithubHelp logo

Comments (23)

mjallday avatar mjallday commented on September 21, 2024

The issue that we run into is that once a resource, such as a card, is used for an operation it's very hard to properly perform a DELETE operation on it. If we delete the card, what do we show as the source for the payments associated with that card?

My suggestion is that we remove the vaulted card details (satisfying the requirement of purging the data) while retaining the card name / last_four and mark it deleted. This card would then no longer be returned via a GET on the cards index URI but it would still be able to be returned if you did a GET on the actual URI of the card itself. It would return a deleted_at field which shows the date the DELETE operation was performed.

For other resources the DELETE operation would be similar, a hard delete if there are no dependencies, a soft delete (marked deleted and not returned via index operations) if other items depend on it.

from balanced-api.

matin avatar matin commented on September 21, 2024

DELETE api_keys already works. Create an issue per resource, so there can be separate discussions. The ramification of deleting an instance of a different resource varies

from balanced-api.

matin avatar matin commented on September 21, 2024

This is being done in the ach branch and should be ported back.

from balanced-api.

aac avatar aac commented on September 21, 2024

Is this still a WIP? We'd like to be able to delete accounts and cards via API.

from balanced-api.

chadwhitacre avatar chadwhitacre commented on September 21, 2024

My suggestion is that we remove the vaulted card details (satisfying the requirement of purging the data) while retaining the card name / last_four and mark it deleted.

This would be acceptable.

from balanced-api.

quellhorst avatar quellhorst commented on September 21, 2024

👍

from balanced-api.

matin avatar matin commented on September 21, 2024

DELETE should be supported on the following resources

Cards

DELETE will act as an unstore operation

Bank Accounts

This is supported on /v1/bank_accounts but not on /v1/marketplaces/:marketplace_id/bank_accounts. The later is going to be deprecated once the Customers resource is introduced.

Holds

A DELETE will be overloaded to void the hold, which will be the equivalent of setting is_void = true. The account object will still exist for further reference, but it's more clear to use a DELETE on a hold than updating the is_void field. By making this change, it also becomes possible to deprecate is_void and introduce voided_at.

from balanced-api.

mahmoudimus avatar mahmoudimus commented on September 21, 2024

I propose we allow DELETE of accounts/customers if they have no transactions associated to them. There's a pretty good use case that some customers are experiencing where they're creating test accounts in production marketplaces that are never used and email us to delete them via support. We should support this.

from balanced-api.

matin avatar matin commented on September 21, 2024

@mahmoudimus +1

from balanced-api.

mrtrosen avatar mrtrosen commented on September 21, 2024

@mahmoudimus +1 We have had issues on our end where we create a bank account, and have an error, that caused the bank account to not be associated with an account, so there is data laying around that will only get messy later on.

from balanced-api.

eblanshey avatar eblanshey commented on September 21, 2024

@mahmoudimus +1. Deleting accounts if there are no transactions would be great. It would help clean up inactive users and test users.

from balanced-api.

 avatar commented on September 21, 2024

+1

DELETE is crucial for our customers that are very suspicious of their cards being stored online (as unreasonable as that may be, we're not going to be able to change the culture of our audience)...

from balanced-api.

trenton42 avatar trenton42 commented on September 21, 2024

We have had a issue where a merchant does not complete a failed verification, then gives up. This leaves some empty accounts that have no roles, and no other data associated with them.

So +1 on deleting accounts with no transactions associated with them.

from balanced-api.

o100ja avatar o100ja commented on September 21, 2024

+1 on DELETE for accounts w/o transactions.

I'd like to see this feature at least in TEST marketplaces so that we can develop further functionality more easily and without confusion.

from balanced-api.

mjallday avatar mjallday commented on September 21, 2024

The customers endpoint implements DELETE, I do not believe we're going to port this back to accounts.

DELETE is implemented for:

  • Customers without transactions
  • Cards and bank accounts associated under customers. (DELETE in this case will invalidate the card and stop it from being returned via index requests)

from balanced-api.

matin avatar matin commented on September 21, 2024

@mjallday is this done?

from balanced-api.

mjallday avatar mjallday commented on September 21, 2024

Partially implemented: Works on cards and bank accounts, will not be implemented for accounts, and has not been implemented yet for marketplaces.

from balanced-api.

matin avatar matin commented on September 21, 2024

@remear @cieplak has this been documented properly?

from balanced-api.

remear avatar remear commented on September 21, 2024

It's documented for cards and bank accounts.

It is not yet documented for Customer.

from balanced-api.

remear avatar remear commented on September 21, 2024

It's now documented for Customer. https://docs.balancedpayments.com/current/api.html?language=bash#delete-a-customer

from balanced-api.

mjallday avatar mjallday commented on September 21, 2024

The example uses the POST verb, not DELETE:

Definition

DELETE https://api.balancedpayments.com/v1/customers/:customer_id

Request

curl https://api.balancedpayments.com/v1/customers/CU4X4fhZ5txOKbKpqTC0fMh9
-u 82be5036022e11e3b844026ba7f8ec28:
-X POST

from balanced-api.

remear avatar remear commented on September 21, 2024

Fixed by balanced/balanced-docs#230

from balanced-api.

steveklabnik avatar steveklabnik commented on September 21, 2024

We don't generally encourage deletion, but it's used appropriately now where it should be.

from balanced-api.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.