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.16.0.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | f598383d97d0bb532dff628e0cf7a8bdaaddaa693cb0e03b2f5891442bc1aea3 |
|
MD5 | ade6ff7cde51c421664e5fed88c28f3c |
|
BLAKE2b-256 | 405446366647146e63f87f430cb0ffb7970a505bf25cd1d7c3729fabae46b7ca |
Close
Hashes for cloudcomponents.cdk_stripe_webhook-1.16.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | c26acd6d5d7551d59972d7b05ba950da8a106488d1bb793aaf0402e3819cf446 |
|
MD5 | 44392a7c716a0bfd23fe0c65cda02c0b |
|
BLAKE2b-256 | 0e0e0c04eae7d8b0c3e108fbbdc6b4f7ada8e2d94777aac445b1f2f990e40c2b |