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):
super().__init__(scope, id, description=description, env=env, stackName=stackName, tags=tags, synthesizer=synthesizer, terminationProtection=terminationProtection)
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.0.50.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 3a20b4c0c3c393cd403f6aa3bbb727935b13611131c5b84a5e90e5d307574073 |
|
MD5 | aade68289e7d10c6acea5faa79de1500 |
|
BLAKE2b-256 | c48d8e9e41e1344b1c036348690ab6b0e65ff5d014a7da7a98e78caa80ee7c39 |
Close
Hashes for cloudcomponents.cdk_stripe_webhook-1.0.50-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 92c3efb6631be4fdab31edff7c4eeed71abdac862032503dbc8ea3cc8a2df6f2 |
|
MD5 | 88593073c7821eaa2c182cccc07ca006 |
|
BLAKE2b-256 | 35b889d9e050262238febcb72346db77905a8c637230412a0d78f76de7111e44 |