Create, update and delete stripe webhooks with your app deployment
Project description
@cloudcomponents/cdk-stripe-webhook
Create, update and delete stripe webhooks with your app deployment
Install
TypeScript/JavaScript:
npm i @cloudcomponents/cdk-stripe-webhook
Python:
pip install cloudcomponents.cdk-stripe-webhook
How to use
# Example automatically generated without compilation. See https://github.com/aws/jsii/issues/826
from aws_cdk.core import Construct, Stack, StackProps
from aws_cdk.aws_apigateway import RestApi
from cloudcomponents.cdk_stripe_webhook import StripeWebhook
class StripeWebhookStack(Stack):
def __init__(self, scope, id, *, description=None, env=None, stackName=None, tags=None, synthesizer=None, terminationProtection=None, analyticsReporting=None):
super().__init__(scope, id, description=description, env=env, stackName=stackName, tags=tags, synthesizer=synthesizer, terminationProtection=terminationProtection, analyticsReporting=analyticsReporting)
api = RestApi(self, "Endpoint")
api.root.add_method("POST")
secret_key = process.env.SECRET_KEY
events = ["charge.failed", "charge.succeeded"]
StripeWebhook(self, "StripeWebhook",
secret_key=secret_key,
url=api.url,
events=events,
log_level="debug"
)
API Reference
See API.md.
Example
See more complete examples.
License
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Close
Hashes for cloudcomponents.cdk-stripe-webhook-1.2.1.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 9abac33555f86a751975d31052fd0bf26ab3c997a866220110cbdfc0ad83f558 |
|
MD5 | 772cb147c390318b8d3acaf9e25aa5e4 |
|
BLAKE2b-256 | 162dec9517c82f281ee3a618502e52ae613ae74f72f1d8db579ce1448f028687 |
Close
Hashes for cloudcomponents.cdk_stripe_webhook-1.2.1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 61f6411ce3f5272ef14ac5aca933a7c982458923f25d14af1b76dd48181daf37 |
|
MD5 | 54aae04014fb6302954acff2fd228818 |
|
BLAKE2b-256 | 69dd17976faa155fcadb4016d9a91e58cb552f6edc1fd17c811f9e7c9943d005 |