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.56.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7bd8071edc8499ac0d71ccb676495ad9f6e8aa4f198127bd68e62f12e0d6964d |
|
MD5 | 1a972b3d5fd6fb7a0847ace84f19763f |
|
BLAKE2b-256 | 11b0ccc98c9b009fa6021df4c12112e51eb36321fba3834716b66d2f9ef092a0 |
Close
Hashes for cloudcomponents.cdk_stripe_webhook-1.0.56-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 01372943e67f18774aeb7bf92d341f6b6cd3ce619182f35c9df4cd59121eb725 |
|
MD5 | af4d5aa99a2219e01d925c39940409b5 |
|
BLAKE2b-256 | 99fd7067bfe21a4412d07d9c17342959d6e9d76eb59408e574aa7989c8efd19a |