Buyer notifications using the API
Default notifications provides with a centralized way to specify the notifications that will be sent to a buyer
(receive_invoices
capability) once an invoice is issued.
Optionally, it is also possible to configure default notifications at the seller (issue_invoices
capability) level. In
order to achieve that, it is required to contact the getpaid support team indicating what's the seller and the desired
email configuration.
Steps
1. Set up default notifications
The default notifications are configured in notifications
within the capabilities.receive_invoices.settings
block as
part of the capability receive_invoices
configuration.
The notifications can be specified during the account creation by calling POST /accounts or at any time when updating the account by calling PATCH /accounts/{account_id}.
In the case of active subscriptions, if the default notification options are deleted from the buyer (or seller) accounts, no notifications would be sent every time a new invoice is issued.
Request
{
"capabilities": {
"receive_invoices": {
"enabled": true,
"settings": {
"notifications": [
{
"type": "email",
"to": ["john.doe@email.com"],
"cc": ["invoicing.department@email.com"],
"bcc": ["admin@email.com"]
}
]
}
}
},
[...]
}
Response
{
"id": "acc_4567107zf94k842z8511n9c7dt",
"version": "20241217132818130",
[...]
}
2. Issue invoice with default notifications
The default notifications can be used when creating standalong invoices by calling POST /invoices or for recurring subscriptions.
The request must include a single notification of type
all_defaults
within the buyer.notifications
array.
Request
{
"buyer": {
"notifications": [
{
"type": "all_defaults"
}
]
[...]
},
[...]
}
Response
{
"id": "inv_4ehg1mkv3mvt3256vcn8dspb4h",
[...]
}