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):
super().__init__(scope, id, description=description, env=env, stackName=stackName, tags=tags, synthesizer=synthesizer, terminationProtection=terminationProtection)
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.51.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | d749c4b9a6693b2ee8e367235946752c877924cf96f99bcd9abc24ebe24198a2 |
|
MD5 | 95ea913dab29368e643a9821427d9218 |
|
BLAKE2b-256 | 890dba4f71a994985b1cb6e31fb4bec20edb30f5beee2258faf804092788ee45 |
Close
Hashes for cloudcomponents.cdk_stripe_webhook-1.0.51-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | be0427d0f247ccc7ce7cc0c52d54280cfee9d5722b6b2c2c08e9e912d3aacfe1 |
|
MD5 | f0849d292256f9bdf53095b80d016437 |
|
BLAKE2b-256 | d9d414f972558126afa0432a6243165c24726f9762c19bda0868266e53e2b05e |