diff --git a/admin/create-product.sh b/admin/create-product.sh new file mode 100644 index 0000000000000000000000000000000000000000..797e825d00e2d4f7be21ab5d4ba344ba03501400 --- /dev/null +++ b/admin/create-product.sh @@ -0,0 +1,16 @@ +#!/usr/bin/env bash + +set -euo pipefail + +KEY=$1 +shift + +curl https://api.stripe.com/v1/products \ + -u "${KEY}:" \ + -d "name=30 GiB-months" \ + -d "description=30 GiB-months of Private.Storage storage × time" \ + -d "default_price_data[currency]=USD" \ + -d "default_price_data[unit_amount]=650" \ + -d "default_price_data[tax_behavior]=exclusive" \ + -d "statement_descriptor=PRIVATE STORAGE" \ + -d "url=https://private.storage/" diff --git a/admin/create-webhook.sh b/admin/create-webhook.sh new file mode 100644 index 0000000000000000000000000000000000000000..eacc3308e4c1e29a02372a69868a79daf435657a --- /dev/null +++ b/admin/create-webhook.sh @@ -0,0 +1,15 @@ +#!/usr/bin/env bash + +set -euo pipefail + +KEY=$1 +shift + +DOMAIN=$1 +shift + +curl \ + https://api.stripe.com/v1/webhook_endpoints \ + -u "${KEY}:" \ + -d url="https://payments.${DOMAIN}/v1/stripe/webhook" \ + -d "enabled_events[]"="checkout.session.completed"