Start a product subscription
POST/v1/subscriptions
Opens Stripe Checkout in subscription mode for Woyra Mail or Woyra Email API. Stripe presents the payment methods enabled and eligible for the customer, including card wallets such as Apple Pay, Google Pay and Link where available. Requires billing:manage.
Body
| Field | Type | Description |
|---|---|---|
| productrequired | string | One of mail, email. |
| planrequired | string |
Example
curl -X POST https://api.woyra.io/v1/subscriptions \
-H "Authorization: Bearer $WOYRA_KEY" \
-H 'Content-Type: application/json' \
-d '{
"product": "mail",
"plan": "<plan>"
}'Response
201 Pending subscription with Stripe Checkout URL.
| Field | Type | Description |
|---|---|---|
| object | "subscription" | |
| id | string | |
| product | string | |
| plan | string | |
| status | string | |
| url | string |
Errors
| Status | Codes |
|---|---|
| 400 | invalid_request, unsupported_version |
| 503 | route_unavailable |
Also in Billing
- POST /v1/topups — Add funds by card
- GET /v1/topups/{id} — One top-up
- GET /v1/subscriptions/{product} — Current product subscription
- POST /v1/payments/stripe/webhook — Stripe's webhook
- GET /v1/ledger — The account statement
- GET /v1/billing/payment_options — How this account can pay
- PUT /v1/billing/payment_currency — Choose to pay in birr or in US dollars
- GET /v1/billing/bank_deposits — Recent birr bank deposits
- POST /v1/billing/bank_deposits — Request a birr bank deposit
- POST /v1/billing/bank_deposits/{id}/receipt — Upload the bank receipt for a deposit
- POST /v1/billing/bank_deposits/{id}/cancel — Cancel a deposit that has not been submitted or was returned
- GET /v1/balance — Retrieve account balance
- GET /v1/billing/email_tariff — The email price this account pays
- GET /v1/billing/email_subscription — This account's monthly email plan
- PUT /v1/billing/email_subscription — Take an email plan, or change it
- POST /v1/billing/email_subscription/cancel — Stop the email plan renewing
- GET /v1/pricing/email — The published email tariff