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.15.0.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | a9665c0ec7a170c92a4af40cb8f2c6440557753b321b0592714ce99645656869 |
|
MD5 | dc4b6d3e41d45218e7cf114f09fcd493 |
|
BLAKE2b-256 | 17129afaad9fb64c7155bf1aa7c364b9416c1564c9048f5c8a04bdca0184b6a8 |
Close
Hashes for cloudcomponents.cdk_stripe_webhook-1.15.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 49501e5470228056bfd79a3982594212b043fdb6e84a207b17beaed3887bfe82 |
|
MD5 | e93315a1c074f068b1fa5381e6aaf398 |
|
BLAKE2b-256 | 2e3c7ee71cc3dcad51b37c44e16e304f3620ea2b524436a9e3cf3973de970603 |