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.27.0.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | bc948360a5dfe5be92b6c177118223e0624e8a7bde670fc0a9b8e7bb1cb0f48a |
|
MD5 | 56a631bfc8dd8f91c3a0f01c2cb055f4 |
|
BLAKE2b-256 | f44481a984785d9f7ea15333cafe1e482c9144565f39ae5204191fc2d67b18f4 |
Close
Hashes for cloudcomponents.cdk_stripe_webhook-1.27.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | dc42b3c25c46d6fd4faa933a2adcab64240abba3d3cefb110a7762fcfe2ea49d |
|
MD5 | e6c8fa25ca08691f17de179269e5a49c |
|
BLAKE2b-256 | c04956a127a08b39ed4f2073c7524b8c1ebd6042189bc1913e952ca6c82c424c |