WoyraDocs
Get an API key

Start a product subscription

POST/v1/subscriptions

Billing · Requires an API key

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

FieldTypeDescription
productrequiredstring
One of mail, email.
planrequiredstring

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.

FieldTypeDescription
object"subscription"
idstring
productstring
planstring
statusstring
urlstring

Errors

StatusCodes
400invalid_request, unsupported_version
503route_unavailable

Also in Billing