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.8.0.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 5e6bdb214098730295d742235b2705e5f9544aed5990b32d22c93f99db56dae7 |
|
MD5 | eeded51dc0ede1b54507ff26cfd6958f |
|
BLAKE2b-256 | 44794ddc94ce46f6867c0cda951e61e7a76493131916129373dc46f5bdeeca6f |
Close
Hashes for cloudcomponents.cdk_stripe_webhook-1.8.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | ab6efece5c24d82e9a7162f9abf137ceb9c78f63cf60bca10e839d8d6a4a6894 |
|
MD5 | 09d1c855c80b049df0be5abe4283ff99 |
|
BLAKE2b-256 | 3d34e3d0f7e6fcd3895a5b615ba7a383e6fadc631fac12e6df1fe514a76fddcd |