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.12.0.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | fc3fe6c468daa483a0edf93d5d557aafd613ed123d452ab0529fa298c81ef769 |
|
MD5 | 0101b6ed3a96a131f7ffe1ca2fac5a74 |
|
BLAKE2b-256 | 36f07961b450f565fc1c3ab6291d1c430874bc398310b476f0f85017302b4914 |
Close
Hashes for cloudcomponents.cdk_stripe_webhook-1.12.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 1304cf0ec797c121c6e03cafdeac7b0daf86a6e5f84634304b1e39cc9c13bd60 |
|
MD5 | 6644726b387c7def950612835f893f41 |
|
BLAKE2b-256 | a4b972453b04b3f544f5a17cd6846455682b3066be1cc7dd7ce0933516cf9b86 |