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.19.0.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | cad7ca1f3914553f90c6623fd7c22368f9639879242f2d0dda85a8f9fb05f410 |
|
MD5 | 9f6739e5a36510f252a77c12321c7a13 |
|
BLAKE2b-256 | 54b47bda5b02397fa992784c6fed6dfb7816f03e7b33fe888f82654363d88274 |
Close
Hashes for cloudcomponents.cdk_stripe_webhook-1.19.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | f12b22b952f326aadb82749b1963cc6f3cdaca0645c1e7a01f5dbc046378be72 |
|
MD5 | 7aaad65af99e1f61ce473627fa76aa73 |
|
BLAKE2b-256 | b57ac9b3b497721a0a10ed2d7f2a8b0c54a596998abe13fd736a01163769950d |