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.14.0.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 44ce6e652128b1dc0c3ddee7c0ad6da8c32e46f7937e8bb950402d73ae0a3e73 |
|
MD5 | f6a21f8f1d0b17d06b82c83ff14137e3 |
|
BLAKE2b-256 | 4d5bf4ddfcab6091d366c21ee4b341a353ecae5770b0f9659160c68bcefc160e |
Close
Hashes for cloudcomponents.cdk_stripe_webhook-1.14.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | fb878680e73878b8a8db77f5e14e3543e86898d8a0b26e795052adda3332233f |
|
MD5 | c887ede4bd7227af7f48f0d78a4219b2 |
|
BLAKE2b-256 | c1259aad3a9a56ef768a018b44b8ba9ea78901b60ad0c28d2da6dacb7314f7c5 |