payment-kit

1.18.48 • Public • Published

Payment Kit

The decentralized stripe for blocklet platform.

Contribution

Development

  1. clone the repo
  2. run make build
  3. run cd blocklets/core && blocklet dev
when error
  1. pre-start error component xxx is not running or unreachable
  • create .env.local file in this root
    • add BLOCKLET_DEV_APP_DID="did:abt:your payment kit server did"
    • add BLOCKLET_DEV_MOUNT_POINT="/example"
  • copy .env.local to be under the /core
    • edit BLOCKLET_DEV_MOUNT_POINT="/"
  1. Insufficient fund to pay for tx cost from xxx, expected 1.0020909, got 0
    • copy BLOCKLET_DEV_APP_DID
    • transfer 2 TBA in your DID Wallet to your copied address

Debug Stripe

  1. Install and login with instructions from: https://stripe.com/docs/stripe-cli
  2. Start your local payment-kit server, get it's port
  3. Run stripe listen --forward-to http://127.0.0.1:8188/api/integrations/stripe/webhook --log-level=debug --latest

Test Stripe

Invoices for subscriptions are not finalized automatically. You can use stripe postman collection to finalize it and then confirm the payment.

Easter Eggs

None public environment variables used in the code, can change the behavior of the payment-kit.

  • PAYMENT_CHANGE_LOCKED_PRICE: allow change locked price, must be set to "1" to work
  • PAYMENT_RELOAD_SUBSCRIPTION_JOBS: reload subscription jobs on start, must be set to "1" to work
  • PAYMENT_BILLING_THRESHOLD: global default billing threshold, must be a number
  • PAYMENT_MIN_STAKE_AMOUNT: global min stake amount limit, must be a number
  • PAYMENT_DAYS_UNTIL_DUE: global default days until due, must be a number
  • PAYMENT_DAYS_UNTIL_CANCEL: global default days until cancel, must be a number

Readme

Keywords

none

Package Sidebar

Install

npm i payment-kit

Weekly Downloads

124

Version

1.18.48

License

none

Unpacked Size

8.36 MB

Total Files

442

Last publish

Collaborators

  • wangshijun