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.18.0.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 9ad269986ef63c0945c4111d2e21f1e0946ccb6b9136ad1f1dc0f19338a79b4b |
|
MD5 | 8138f3833c13bdf63933f0b4f756bd88 |
|
BLAKE2b-256 | 73b48e1ce0598c723364aae0847d2c1fc82d63e715428697f45498a7160b2e11 |
Close
Hashes for cloudcomponents.cdk_stripe_webhook-1.18.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 43f36113cf719e87037466237669b2c17692c66365b811844d36ea55259a000d |
|
MD5 | 47d01e8f1ba398b5e35ed6964eb693c6 |
|
BLAKE2b-256 | 0e2a3e8f7d002fb3db8f9bb503f9abf6e072ff73572c206f007dbe4aba89bccd |