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.57.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 2a7048cfccb8b95fed4e4ab96bc37e4f19179c4ee5e757f4241b3c08d7c8f00a |
|
MD5 | aaca4180bfcc6172afb17e856eae6ada |
|
BLAKE2b-256 | bc30f2cccae5a0b31f08b803434673dab944407bf7ddd868ce4fdee962126121 |
Close
Hashes for cloudcomponents.cdk_stripe_webhook-1.0.57-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 4ab3fda93940bd4321e06ae03ee638250413257769902b414da875caf6b63bb8 |
|
MD5 | 455bf48ff4c3d78d55e7da3b96dd8a0b |
|
BLAKE2b-256 | 625854ea0cb5e28d78275196154ec603eb24bdfaffb6a5b71c77d0b7151a50af |