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.1.0.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 09b75f6ac10d94e52e8e1559f9fa84ef3135887d150923e8bf8443c92a07894a |
|
MD5 | c57bc360447725a2bf85240785556d25 |
|
BLAKE2b-256 | 19e2de8cc331fdf8a974a12c107ea0d91205030e8df85d21b0c3258953625b5f |
Close
Hashes for cloudcomponents.cdk_stripe_webhook-1.1.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 9528855af6b6dd6a5b1721245aa96d9999b18fcfb64a04c6a934e40e60938c99 |
|
MD5 | 6c01189b3ffb5bf3df67d95736fbd261 |
|
BLAKE2b-256 | a9a6089326b1c168435e2ba9650bb107b319454f31eddbce7a811fba348e293c |