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.21.1.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | c39d35567894b12accc350b961d4346dc17cf9109073b131f91810a812d3d6a1 |
|
MD5 | 3e9a685b7139f78d4a53601bd30e71e3 |
|
BLAKE2b-256 | e6a7733a0fb6b78de1e547f519a4a54d5347a561e11276d69657a0c3e76dc1b3 |
Close
Hashes for cloudcomponents.cdk_stripe_webhook-1.21.1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | bc88dd3a8179041fea3e7e93b58d7f45ee23a8f8c96ba7e79a41f3e5211051e4 |
|
MD5 | a76e1d50c600d831171ea98a8d0ba270 |
|
BLAKE2b-256 | df7590537a2ac270f9866c296eb7159b2aab0e02ce11fa1928166be67d8da772 |