Settings API
Manage merchant account settings programmatically.
Update Email Notification Settings
Update the notification settings for a company.
PATCH /api/company
Headers
| Header | Value |
|---|---|
authorization | Bearer YOUR_PUBLIC_TOKEN |
content-type | application/json |
Request Body
{
"notification": {
"merchantPaymentReceived": false,
"merchantTransactionFailed": true,
"customerPaymentReceived": false,
"customerTransactionFailed": true
}
}
Request Parameters
| Field | Type | Description |
|---|---|---|
merchantPaymentReceived | boolean | true — receive emails about payment receiving, false — don't |
merchantTransactionFailed | boolean | true — receive emails about payment failure, false — don't |
customerPaymentReceived | boolean | true — customer receives emails about payment receiving, false — don't |
customerTransactionFailed | boolean | true — customer receives emails about payment failure, false — don't |
cURL
curl --location --request PATCH 'https://my.paidlys.com/api/company' \
--header 'authorization: Bearer YOUR_PUBLIC_TOKEN' \
--header 'content-type: application/json' \
--data '<body>'
Body:
{
"notification": {
"merchantPaymentReceived": false,
"merchantTransactionFailed": true,
"customerPaymentReceived": false,
"customerTransactionFailed": true
}
}
Response
The response will include current merchant's company info with the notification block:
{
"notification": {
"merchantPaymentReceived": false,
"merchantTransactionFailed": true,
"customerPaymentReceived": false,
"customerTransactionFailed": true
}
}
Set Redirect URL
Set the default redirection URL for "Done"-status invoices. This setting will be applied for newly created invoices when the redirectURL parameter is absent or null in the invoice creation request.
PUT /api/company/settings/redirect-url
Headers
| Header | Value |
|---|---|
authorization | Bearer YOUR_PUBLIC_TOKEN |
content-type | application/json |
Request Body
{
"redirectURL": "https://myshop.com/payment-success"
}
Request Parameters
| Field | Type | Required | Description |
|---|---|---|---|
redirectURL | string | Yes | URL-formatted link address. If null, redirection will use the redirectURL from the invoice creation request. If no link was provided during creation and Settings value is null, redirection won't be executed — the client will see the "Done" invoice page permanently |
cURL
curl --location --request PUT 'https://my.paidlys.com/api/company/settings/redirect-url' \
--header 'authorization: Bearer YOUR_PUBLIC_TOKEN' \
--header 'content-type: application/json' \
--data '<body>'
Body:
{
"redirectURL": "https://myshop.com/payment-success"
}
Response
All the company payment settings will be returned with the redirectURL parameter's actual value.
Set Webhook URL
Configure the URL for receiving webhook notifications.
PUT /api/company/settings/webhook-url
Headers
| Header | Value |
|---|---|
Authorization | Bearer YOUR_PUBLIC_TOKEN |
Content-Type | application/json |
Request Body
{
"webHookUrl": "https://your-server.com/webhook"
}
cURL
curl -X PUT 'https://my.paidlys.com/api/company/settings/webhook-url' \
--header 'Authorization: Bearer YOUR_PUBLIC_TOKEN' \
--header 'Content-Type: application/json' \
--data '<body>'
Body:
{
"webHookUrl": "https://your-server.com/webhook"
}