Skip to main content

Settings API

Manage merchant account settings programmatically.

Update Email Notification Settings

Update the notification settings for a company.

PATCH /api/company

Headers

HeaderValue
authorizationBearer YOUR_PUBLIC_TOKEN
content-typeapplication/json

Request Body

{
"notification": {
"merchantPaymentReceived": false,
"merchantTransactionFailed": true,
"customerPaymentReceived": false,
"customerTransactionFailed": true
}
}

Request Parameters

FieldTypeDescription
merchantPaymentReceivedbooleantrue — receive emails about payment receiving, false — don't
merchantTransactionFailedbooleantrue — receive emails about payment failure, false — don't
customerPaymentReceivedbooleantrue — customer receives emails about payment receiving, false — don't
customerTransactionFailedbooleantrue — 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

HeaderValue
authorizationBearer YOUR_PUBLIC_TOKEN
content-typeapplication/json

Request Body

{
"redirectURL": "https://myshop.com/payment-success"
}

Request Parameters

FieldTypeRequiredDescription
redirectURLstringYesURL-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

HeaderValue
AuthorizationBearer YOUR_PUBLIC_TOKEN
Content-Typeapplication/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"
}