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.0.58.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | e7248580d3cb5120ac08c30df7d5cdab8e441925c34feddb5f7312c9dcb4c66d |
|
MD5 | 520db890737bdc1e197090768d2a81f6 |
|
BLAKE2b-256 | 7cda9149fe042534e72f28d81382223540263f9588cfc6996deac35a90c64bc7 |
Close
Hashes for cloudcomponents.cdk_stripe_webhook-1.0.58-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7d7661d2889232d7b94bc618831cee5b633ba02c5b26b97c25ef431ec1999182 |
|
MD5 | a06d00fac7be742be7759d74f3d9885a |
|
BLAKE2b-256 | 47e9974bdd6965d9a4742bc8c996746d677478cf9ac8cbe403dc077fe8f88780 |