Communications
Last updated: 6/17/2026
Send branded SMS and email messages to your customers.
The Communication service sends SMS and email messages on your behalf — for example, the invite link a customer receives during an Invite2Pay flow. Each business unit can be configured with its own messaging providers, and messages can be sent ad hoc or rendered from reusable templates.
Communication Services & Providers
A communication service ties a business unit to a provider for a given channel. HatchPay supports SMS and email channels through providers such as Twilio as well as custom HTTP endpoints. Provider credentials are stored as separate, encrypted auth configurations and are redacted in API responses.
POST /v1/communication/services — register an SMS or email service.
GET /v1/communication/{bu_id}/services — list the services configured for a business unit.
POST /v1/communication/auth-info — store provider credentials, referenced by a service.
Sending a Message
To send a one-off message, provide the channel, recipient, and content.
POST /v1/communication/send
{
"communication_type": "EMAIL",
"recipient": "jordan.lee@example.com",
"subject": "Your receipt",
"body": "Thank you for your payment.",
"bu_id": "79772e73-7a93-40ba-889f-3bdd37ab1d18",
"metadata": { "transaction_id": "a8d664f8-1673-4f58-8e70-ffe278dd28a5" }
}
The response reports a status of COMPLETED, PENDING, or FAILED, along with the provider’s response payload.
Templates
For messages you send repeatedly, define a template once and supply only the variable values at send time. Templates support variable substitution using placeholders such as {{first_name}} and {{invite_link}}.
POST /v1/communication/templates — create a template with a name, type (SMS or EMAIL), optional subject, and body.
GET /v1/communication/templates — list templates and the parameters each one expects.
POST /v1/communication/templates/{template_id}/send — render and send a template.
{
"communication_type": "EMAIL",
"recipient": "jordan.lee@example.com",
"template_parameters": { "first_name": "Jordan", "invite_link": "https://pay.example.com/i2p/ABC123" },
"bu_id": "79772e73-7a93-40ba-889f-3bdd37ab1d18"
}
Because notifications carry customer-facing branding and are often triggered automatically by other flows (such as I2P invites), configure each business unit’s services and templates before going live. See I2P for how invite communications are sent as part of a payment request.