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.53.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | b7ffb6dfff7c2598f367e1cdde92b2f75f548119cd7d3f2536518e315c9bd412 |
|
MD5 | 7bab2b9bccf4eef734f1c2653af229b5 |
|
BLAKE2b-256 | fde0298efeee976c0c2fbf1a301d4a4f32ce023590f46f869435fe14cd6acd52 |
Close
Hashes for cloudcomponents.cdk_stripe_webhook-1.0.53-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 94c7d06f1892824cd3a5ebab4574f0d39a47a3619ce5ef76b8843b76980395cb |
|
MD5 | fabb5881bf1cdfb08d612666cac181aa |
|
BLAKE2b-256 | cd1ee428fcdd7808063c93ad097827e6b38ee546bb0d6e8022786f112b324b97 |