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.9.0.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 3c944f33bab7c831525872581789b95c662336af473578a636a03c2d45200d6a |
|
MD5 | a5c584fcb35ed87bbe0c00946516be5c |
|
BLAKE2b-256 | 9653aa84c7a163562467db25532d062fb38061e1ccb99e4069d086beb2e08a9a |
Close
Hashes for cloudcomponents.cdk_stripe_webhook-1.9.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 187f06bfdb6c5d60501e25026dc7bc51120e26524665aa83a3dd799ec2dcd6bb |
|
MD5 | 1087b1d2ffdc6817ef349390a8ed6ed6 |
|
BLAKE2b-256 | 0e917587e6ae5a80d32aedfb42c58712fdbf4a085426eda7a795f75f0f4dba7e |