mail-settings

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

API reference

GET /v1/mail-settings #

Which kinds of e-mail Payrudder sends for the tenant (all on until switched off, except customer_notices, which is off until switched on)

Categories: invoice_issued, payment_receipts, payment_failed, usage_alerts, system, customer_notices. customer_notices is the notice to a customer that the seller blocked them or lifted the block (never with the seller's reason); it is off until the tenant switches it on, the other categories are on. A mail of a category that is off is dropped by the notifier (counted in notifier_mail_dropped_total), not retried. Whether a provider sends its own receipts is a separate rule (Paddle does, so Payrudder sends none for its payments).

Responses

StatusMeaningBody
200OKMailSettings
Example response
{
  "categories": [
    {
      "category": "invoice_issued",
      "enabled": false
    }
  ]
}
curl
curl -X GET https://YOUR-API-ADDRESS/v1/mail-settings \
  -H "Authorization: Bearer $PAYRUDDER_API_KEY"

PUT /v1/mail-settings #

Switch the listed categories on or off; the others keep their setting

An unknown category is rejected with the error key plans.mail.unknown_category. A category listed twice takes its last value.

Request body

FieldTypeDescription
categoriesarray of object
Example
{}

Responses

StatusMeaningBody
200Every category with its new stateMailSettings
400Error envelopeError
Example response
{
  "categories": [
    {
      "category": "invoice_issued",
      "enabled": false
    }
  ]
}
curl
curl -X PUT https://YOUR-API-ADDRESS/v1/mail-settings \
  -H "Authorization: Bearer $PAYRUDDER_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{}'

Models

Error

FieldTypeDescription
error requiredobject

MailSettings

FieldTypeDescription
categories requiredarray of object

MailSettingsInput

FieldTypeDescription
categoriesarray of object