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.aws_apigateway import RestApi
from aws_cdk.core import Construct, Stack, StackProps
from cloudcomponents.cdk_secret_key import SecretKey
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 = SecretKey.from_plain_text(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.29.0.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | a654240753600dfebf5f6f58cb0137691db046b1e632d7b9e5983bc56b8f4843 |
|
MD5 | 70f186fe7078fce2dce377c02e3e287a |
|
BLAKE2b-256 | 3a6508263d76fde1360222edc89d944847fa8baf8872b563a3763966f2335d76 |
Close
Hashes for cloudcomponents.cdk_stripe_webhook-1.29.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | f8d435642fcf5f3e287db113d6bb8ecd3c80610b52b5aca4814e088ea8edfa00 |
|
MD5 | b3a436ecdae058eb64d1869cf63fc296 |
|
BLAKE2b-256 | 8034ce125ce01d9043be1452057afcf04fc7afb9dffc8ca3240363e6f44bbc41 |