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.46.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | dd5d7008bdaa9f99304e7e12c13049f56a5b4721bcb129f5f469dbc5ed27f489 |
|
MD5 | d88dc1ce68779a4306021bcc0a2bc4dc |
|
BLAKE2b-256 | de617ee6df496c29469981c23f831ecedec7e4bfb2b240563fa643823ef11321 |
Close
Hashes for cloudcomponents.cdk_stripe_webhook-1.0.46-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 8c1c683daf91da9154e7f15036d159fefa2e93ae0ef998216db1e435e0f1b505 |
|
MD5 | 97db5de2045898469ba6dfd28a3f5e4c |
|
BLAKE2b-256 | 92f8f25cd79c429caaaf28c2ee3cafc82f91014d99a5fadedb38b8f3f329b9d1 |