Alias-Based Invoicing#
Alias-based invoicing is CasaPay's low-code solution for operators who want to invoice tenants without deep API integration. CasaPay generates a unique email alias (e.g., jane.doe@casapay.me) for each tenant. When the operator sends a PDF invoice to that alias — from their PMS, accounting tool, or plain email — CasaPay automatically processes the PDF and converts it into a payment request delivered to the tenant via email and the CasaPay Wallet.
How it works#
- Generate an alias — Call the API or use the CasaPay Chrome Extension to create an alias for a tenant
- Send invoices to the alias — From any tool (PMS, CRM, email), send PDF invoices to
tenant.name@casapay.me - CasaPay processes the PDF — The system extracts invoice details (amount, due date, line items) from the PDF
- Tenant receives payment request — The tenant gets a payment link via email and an in-app notification in the CasaPay Wallet
- Tenant pays — The tenant clicks the link or opens the wallet to complete payment
Low-code integration
Alias-based invoicing requires no webhook handling, no payment intent creation, and no checkout integration. Just generate an alias once and send your invoices to it. CasaPay handles the rest.
The Email Alias object#
| Attribute | Type | Description |
|---|---|---|
id | string | Unique identifier with alias_ prefix |
object | string | Always "email_alias" |
email | string | The generated alias address (e.g., jane.doe@casapay.me) |
tenant | string | Associated tenant/customer ID |
payment_agreement | string | Associated Payment Agreement ID |
entity | string | Operator entity ID |
status | enum | active, paused, disabled |
invoices_received | integer | Number of PDF invoices processed through this alias |
last_invoice_at | timestamp | When the last invoice was received |
metadata | hash | Key-value pairs |
created | timestamp | Time at which the alias was created |
livemode | boolean | Whether this is a live mode object |
{
"id": "alias_abc123",
"object": "email_alias",
"email": "jane.doe@casapay.me",
"tenant": "cus_123456789",
"payment_agreement": "pa_789xyz",
"entity": "ent_456def",
"status": "active",
"invoices_received": 12,
"last_invoice_at": 1708732800,
"metadata": {
"property_id": "prop_456",
"unit": "4B"
},
"created": 1700000000,
"livemode": true
}Create an Email Alias#
Creates a new email alias for a tenant. If the tenant does not exist, one is created automatically from the provided email.
Parameters#
tenant_emailstringREQUIREDThe tenant's actual email address. Used to generate the alias and create the tenant record if needed.
entity_idstringREQUIREDThe operator entity ID this alias belongs to.
tenant_first_namestringTenant's first name. If not provided, extracted from the email address.
tenant_last_namestringTenant's last name. If not provided, extracted from the email address.
currencystringThree-letter ISO 4217 currency code. Defaults to the entity's currency.
metadatahashSet of key-value pairs for additional information.
Response#
Returns the Email Alias object. If a tenant with this email already exists, returns the existing alias with already_exists: true.
curl https://api.casapay.com/v1/email_aliases \
-H "Authorization: Bearer sk_test_4eC39HqLyjWDarjtT1zdp7dc" \
-H "Content-Type: application/json" \
-d '{
"tenant_email": "jane.doe@example.com",
"entity_id": "ent_456def",
"tenant_first_name": "Jane",
"tenant_last_name": "Doe",
"currency": "eur",
"metadata": {
"property_id": "prop_456",
"unit": "4B"
}
}'{
"id": "alias_abc123",
"object": "email_alias",
"email": "jane.doe@casapay.me",
"tenant": "cus_new789",
"payment_agreement": "pa_auto456",
"entity": "ent_456def",
"status": "active",
"already_exists": false,
"invoices_received": 0,
"last_invoice_at": null,
"metadata": {
"property_id": "prop_456",
"unit": "4B"
},
"created": 1708732800,
"livemode": false
}Retrieve an Email Alias#
Retrieves the details of an existing email alias.
curl https://api.casapay.com/v1/email_aliases/alias_abc123 \
-H "Authorization: Bearer sk_test_4eC39HqLyjWDarjtT1zdp7dc"List Email Aliases#
Returns a list of email aliases. The aliases are sorted by creation date, with the most recent first.
Parameters#
entity_idstringFilter by operator entity.
tenantstringFilter by tenant/customer ID.
statusstringFilter by status: active, paused, or disabled.
limitintegerMaximum number of objects to return. Default is 10, maximum is 100.
starting_afterstringCursor for pagination. Pass the ID of the last object from the previous page.
curl "https://api.casapay.com/v1/email_aliases?entity_id=ent_456def&limit=10" \
-H "Authorization: Bearer sk_test_4eC39HqLyjWDarjtT1zdp7dc"Update an Email Alias#
Updates the specified email alias.
Parameters#
statusstringSet to paused to temporarily stop processing invoices, or disabled to permanently deactivate.
metadatahashUpdate key-value pairs.
curl https://api.casapay.com/v1/email_aliases/alias_abc123 \
-H "Authorization: Bearer sk_test_4eC39HqLyjWDarjtT1zdp7dc" \
-H "Content-Type: application/json" \
-d '{"status": "paused"}'Bulk Create Aliases#
Creates multiple email aliases in a single request. Useful when onboarding multiple tenants at once.
Parameters#
entity_idstringREQUIREDThe operator entity ID.
aliasesarrayREQUIREDArray of alias creation objects, each containing tenant_email and optionally tenant_first_name, tenant_last_name.
currencystringDefault currency for all aliases. Defaults to entity currency.
curl https://api.casapay.com/v1/email_aliases/bulk \
-H "Authorization: Bearer sk_test_4eC39HqLyjWDarjtT1zdp7dc" \
-H "Content-Type: application/json" \
-d '{
"entity_id": "ent_456def",
"aliases": [
{"tenant_email": "jane.doe@example.com", "tenant_first_name": "Jane", "tenant_last_name": "Doe"},
{"tenant_email": "john.smith@example.com"},
{"tenant_email": "maria.garcia@example.com", "tenant_first_name": "Maria", "tenant_last_name": "Garcia"}
],
"currency": "eur"
}'{
"object": "list",
"data": [
{
"id": "alias_abc123",
"email": "jane.doe@casapay.me",
"tenant": "cus_new789",
"status": "active",
"already_exists": false
},
{
"id": "alias_def456",
"email": "john.smith@casapay.me",
"tenant": "cus_new790",
"status": "active",
"already_exists": false
},
{
"id": "alias_ghi789",
"email": "maria.garcia@casapay.me",
"tenant": "cus_existing123",
"status": "active",
"already_exists": true
}
],
"total_created": 2,
"total_existing": 1
}Chrome Extension#
CasaPay provides a Chrome Extension for operators who prefer a visual interface for generating aliases. The extension supports:
- Single alias generation — Paste a tenant email and get the alias instantly
- Bulk CSV upload — Upload a CSV of tenant emails and download results with generated aliases
- Copy to clipboard — One-click copy of generated aliases for pasting into PMS or email
- Recent history — Quick access to the last 10 generated aliases
- Sandbox mode — Test alias generation without affecting production data
Install the extension
The CasaPay Chrome Extension is available for operators on all plans. Contact your account manager or visit the CasaPay Dashboard to get started.
PDF Processing#
When a PDF invoice is sent to a CasaPay email alias, the system:
- Identifies the tenant from the alias routing
- Extracts invoice data including amount, due date, line items, and reference numbers
- Creates an Alias Invoice record linking the PDF to the payment agreement
- Generates a payment request with a unique payment link
- Notifies the tenant via email (with payment link + formatted invoice) and in the CasaPay Wallet
Supported PDF formats#
CasaPay processes invoices from any PMS or accounting tool. The system uses OCR and document intelligence to extract:
- Total amount due
- Due date
- Line item descriptions and amounts
- Invoice reference numbers
- Tax amounts
Processing time
PDF processing typically completes within 30 seconds. Complex or multi-page invoices may take up to 2 minutes. Subscribe to alias_invoice.processed webhooks for real-time notifications.