Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Handle tiers that creates a "prepaid" card after payment #2129

Closed
znarf opened this issue Jun 18, 2019 · 2 comments
Closed

Handle tiers that creates a "prepaid" card after payment #2129

znarf opened this issue Jun 18, 2019 · 2 comments
Assignees
Labels
api Issues that require some work on the API (https://github.com/opencollective/opencollective-api) complexity → complex feature

Comments

@znarf
Copy link
Member

znarf commented Jun 18, 2019

Draft

User story

For "host collectives" (collectives linked to a fiscal host to manage their budget), we want to create special tiers that create a "prepaid" card after a payment is validated.

Limitations

  • This should be available at first only for tiers of "host collectives". They can be recognized with their settings.hostCollective=true ie: http://opencollective.com/opensource
  • The tier itself should be activated for this special behavior: settings.createPrepaidCard=true

Specification

  • A prepaid card (valid on the host) will be created and owned by the account initiating the donation. Platform fees and host feeds should naturally be removed from it.
  • The balance of the "host collective" should be deducted from the value once the prepaid card is created. Do we need to create a transaction to materialize that?

Data

Payment Method entry

{
    "primary" : false,
    "initialBalance" : order.totalAmount - fees,
    "CollectiveId" : order.fromCollective.id,
    "currency" : order.fromCollective.host.currency,
    "customerId" : order.fromCollective.slug,
    "service" : "opencollective",
    "type" : "prepaid",
    "data" : {
      "HostCollectiveId": order.fromCollective.host.id
    },
    "createdAt" : NOW(),
    "expiryDate" : NOW() + 1 month
}
@znarf znarf changed the title Handle special tier that create a "prepaid" card after payment Handle tiers that creates a "prepaid" card after payment Jun 18, 2019
@flickz flickz added api Issues that require some work on the API (https://github.com/opencollective/opencollective-api) complexity → complex feature frontend and removed frontend labels Jun 20, 2019
@stale
Copy link

stale bot commented Sep 18, 2019

This issue has been automatically marked as stale because it has not had recent activity. We want to keep it in our todo list but haven't had the time to address it yet.
Thank you for your contributions!

@stale stale bot added the stale label Sep 18, 2019
@znarf
Copy link
Member Author

znarf commented Sep 18, 2019

It was not exactly implemented like initially specified but this is done.

@stale stale bot removed the stale label Sep 18, 2019
@znarf znarf closed this as completed Sep 18, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
api Issues that require some work on the API (https://github.com/opencollective/opencollective-api) complexity → complex feature
Projects
None yet
Development

No branches or pull requests

2 participants