Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/mezielabs/adonis-stripe
This package makes it seamless to work with Stripe in AdonisJS 5 applications.
https://github.com/mezielabs/adonis-stripe
adonis-stripe typescript
Last synced: 3 months ago
JSON representation
This package makes it seamless to work with Stripe in AdonisJS 5 applications.
- Host: GitHub
- URL: https://github.com/mezielabs/adonis-stripe
- Owner: mezielabs
- License: mit
- Created: 2020-05-28T18:30:43.000Z (over 4 years ago)
- Default Branch: master
- Last Pushed: 2023-04-24T17:41:51.000Z (over 1 year ago)
- Last Synced: 2024-07-08T23:03:21.054Z (4 months ago)
- Topics: adonis-stripe, typescript
- Language: HTML
- Homepage:
- Size: 847 KB
- Stars: 38
- Watchers: 3
- Forks: 3
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- Contributing: CONTRIBUTING.md
- License: LICENSE.md
Awesome Lists containing this project
- awesome-adonisjs - Adonis Stripe - This package makes it seamless to work with Stripe in AdonisJS 5 applications. (Packages)
README
## Table of contents
- [Adonis Stripe](#adonis-stripe)
- [Installation](#installation)
- [Usage](#usage)
- [Learn AdonisJS](#learn-adonisjs)# Adonis Stripe
> Stripe provider for AdonisJS 5
[![typescript-image]][typescript-url] [![npm-image]][npm-url] [![license-image]][license-url]
This packages makes it seamless to work with Stripe in AdonisJS 5 applications.
## Installation
Install the package using either npm or yarn:
```bash
npm i @mezielabs/adonis-stripe
# or
yarn add @mezielabs/adonis-stripe
```Then, configure the package using the `configure` command:
```bash
node ace configure @mezielabs/adonis-stripe
```This package needs to be configured with your Stripe account's API keys, which you can get from your [Stripe Dashboard](https://dashboard.stripe.com/account/apikeys). Also, you can specify the API version as well as your webhook secret.
```txt
// .envSTRIPE_SECRET_KEY=YOUR_STRIPE_SECRET_KEY
STRIPE_PUBLIC_KEY=YOUR_STRIPE_PUBLISHABLE_KEY
STRIPE_API_VERSION=STRIPE_API_VERSION // defaults to Stripe account's API version
STRIPE_WEBHOOK_SECRET=YOUR_STRIPE_WEBHOOK_SECRET
```## Usage
```ts
import Stripe from '@ioc:Mezielabs/Stripe'async checkout ({ view }) {
paymentIntent = await Stripe.paymentIntents.create({
amount: 1900,
currency: 'usd'
})
}
```This package is built top of [`stripe-node`](https://github.com/stripe/stripe-node). For usage, see the [stripe-node API docs](https://stripe.com/docs/api?lang=node) for Node.js.
## Learn AdonisJS
Want to learn how to build projects like this with AdonisJS? Check out [Adonis Mastery](https://adonismastery.com), where you get to learn AdonisJS through practical screencasts.
[typescript-image]: https://img.shields.io/badge/Typescript-294E80.svg?style=for-the-badge&logo=typescript
[typescript-url]: "typescript"[npm-image]: https://img.shields.io/npm/v/@mezielabs/adonis-stripe.svg?style=for-the-badge&logo=npm
[npm-url]: https://npmjs.org/package/@mezielabs/adonis-stripe "npm"[license-image]: https://img.shields.io/npm/l/@mezielabs/adonis-stripe?color=blueviolet&style=for-the-badge
[license-url]: LICENSE.md "license"