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.25.0.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 70ed1c72e5050de461b840e2b305284fdf9788e32308a61b2b703210aaca63f4 |
|
MD5 | 3a3a70fbcf7990a7161db5b3463fe633 |
|
BLAKE2b-256 | f35e111fae204551136bdc699494bc57861f532a9780c6f28e902d0540cb6e1c |
Close
Hashes for cloudcomponents.cdk_stripe_webhook-1.25.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | bd87059b4a309f7051005d4b3ea4bf58452125443eb6c7e4b14fa16bed842126 |
|
MD5 | 26e30145eda08e29eb4acd6409a64a2f |
|
BLAKE2b-256 | e9e7eaa43d8e8cdddb2d398bfde69692bca67ea68314d6426e2e5d8d2f3e2eb6 |