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.14.1.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 5c99000e42e84e3574717b051a24521c0933ae06f390b4c16bd1f8fd5a3aa5bc |
|
MD5 | b69115a8753ce2b701b3076260ea7d56 |
|
BLAKE2b-256 | 5812f0b4fcf870c76d5b6f6a2b07cc185be9ab79fcfda32627502317058f0092 |
Close
Hashes for cloudcomponents.cdk_stripe_webhook-1.14.1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 9d41d21bf9ebd49976cd21d634988af6169ae0a0c0544d699a59250db5cefa61 |
|
MD5 | 569818229888c202eb7958176a9dd4e4 |
|
BLAKE2b-256 | ac743e97d75a2b684d3842cad521102d231fce5a36a4346d073026a4569abd6e |