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.10.0.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | ffdf6f7c7f6237f1af5c915963af65fc93f856ffc5a97d7b326f8599d25667c2 |
|
MD5 | 76c400e8fe616b7d14516f0eda017df2 |
|
BLAKE2b-256 | a24928be7b5e4527909e531dfb538c0929c7df4c93b762fdd44e5b62ad759e52 |
Close
Hashes for cloudcomponents.cdk_stripe_webhook-1.10.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | a5db5669438c47140a10608604a7b8c09b1f314266bf93d8ccefcfd3d92f58c5 |
|
MD5 | 3b6f8cd1ca162af67fee41a148483514 |
|
BLAKE2b-256 | 515a27d027a4a9364f1cd0bf4ddbdf5f623f3410fe8955a0743b99a24dcb7820 |