mail-previews

Stable. Describes behaviour that is built and covered by tests in this repository.

API reference

POST /v1/mail-previews/price-change #

The notice a customer would get of a price change, without sending anything

Renders the price-change notice in the language given (the tenant's default when none), with the date written in the tenant's time zone and the amount, in the tenant's currency, the way that language writes money. It is the mail the notifier would send; nothing is sent or kept. Show html in a sandboxed frame.

Request body

FieldTypeDescription
localestringThe customer's language: en, tr, de, fr, es or ar; empty is the tenant's default language.
customer_namestring
plan_code requiredstring
effective_time requiredstring · date-timeWhen the new price starts.
new_renewal_minor requiredinteger · int64The new renewal fee in the tenant's currency, in minor units.
Example
{
  "plan_code": "string",
  "effective_time": "2026-11-03T10:15:00Z",
  "new_renewal_minor": 1
}

Responses

StatusMeaningBody
200OKRenderedMail
400Error envelopeError
503Error envelopeError
Example response
{
  "subject": "string",
  "html": "string",
  "text": "string"
}
curl
curl -X POST https://YOUR-API-ADDRESS/v1/mail-previews/price-change \
  -H "Authorization: Bearer $PAYRUDDER_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"plan_code":"string","effective_time":"2026-11-03T10:15:00Z","new_renewal_minor":1}'

Models

Error

FieldTypeDescription
error requiredobject

PriceChangeMailPreviewRequest

FieldTypeDescription
localestringThe customer's language: en, tr, de, fr, es or ar; empty is the tenant's default language.
customer_namestring
plan_code requiredstring
effective_time requiredstring · date-timeWhen the new price starts.
new_renewal_minor requiredinteger · int64The new renewal fee in the tenant's currency, in minor units.

RenderedMail

FieldTypeDescription
subject requiredstring
html requiredstring
text requiredstring