Manage automation rules
Rules belong to the API key environment. A test rule cannot read or modify a live balance.
Configure automatic conversions
A conversion rule converts its source balance after the balance reaches the configured threshold.
GET
https://lirpay.org/api/v2/integration/conversion-rulesList automatic conversion rules.
API key requiredconversions:read
| Parameter | Type | In | Required | Description |
|---|---|---|---|---|
| page | integer | query | no | Page number. Defaults to 1. |
| limit | integer | query | no | Items per page. Maximum 100. |
POST
https://lirpay.org/api/v2/integration/conversion-rulesCreate an automatic conversion rule.
API key requiredconversions:write
| Parameter | Type | In | Required | Description |
|---|---|---|---|---|
| from_currency | string | body | yes | Source balance currency. |
| to_currency | string | body | yes | Destination balance currency. |
| min_trigger_amount_minor | integer | body | no | Minimum source balance in minor units. |
| enabled | boolean | body | no | Rule state. Defaults to true. |
GET
https://lirpay.org/api/v2/integration/conversion-rules/{id}Read one automatic conversion rule.
API key requiredconversions:read
| Parameter | Type | In | Required | Description |
|---|---|---|---|---|
| id | uuid | path | yes | Resource identifier returned by a list or create operation. |
PATCH
https://lirpay.org/api/v2/integration/conversion-rules/{id}Update the threshold or enabled state.
API key requiredconversions:write
| Parameter | Type | In | Required | Description |
|---|---|---|---|---|
| id | uuid | path | yes | Resource identifier returned by a list or create operation. |
| min_trigger_amount_minor | integer | body | no | New non-negative trigger amount. |
| enabled | boolean | body | no | New rule state. |
DELETE
https://lirpay.org/api/v2/integration/conversion-rules/{id}Delete an automatic conversion rule.
API key requiredconversions:write
| Parameter | Type | In | Required | Description |
|---|---|---|---|---|
| id | uuid | path | yes | Resource identifier returned by a list or create operation. |
Configure automatic withdrawals
A withdrawal rule creates payouts to its configured recipient after the balance reaches the threshold.
GET
https://lirpay.org/api/v2/integration/withdrawal-rulesList automatic withdrawal rules.
API key requiredwithdrawals:read
| Parameter | Type | In | Required | Description |
|---|---|---|---|---|
| page | integer | query | no | Page number. Defaults to 1. |
| limit | integer | query | no | Items per page. Maximum 100. |
POST
https://lirpay.org/api/v2/integration/withdrawal-rulesCreate an automatic withdrawal rule.
API key requiredwithdrawals:write
| Parameter | Type | In | Required | Description |
|---|---|---|---|---|
| method_id | string | body | yes | Stable method identifier. |
| receiver_address | string | body | yes | Rule payout recipient. |
| provider_fields | object | body | no | Additional method fields. |
| min_trigger_amount_minor | integer | body | no | Minimum balance in minor units. |
| enabled | boolean | body | no | Rule state. Defaults to true. |
GET
https://lirpay.org/api/v2/integration/withdrawal-rules/{id}Read one automatic withdrawal rule.
API key requiredwithdrawals:read
| Parameter | Type | In | Required | Description |
|---|---|---|---|---|
| id | uuid | path | yes | Resource identifier returned by a list or create operation. |
PATCH
https://lirpay.org/api/v2/integration/withdrawal-rules/{id}Update recipient fields, threshold, or enabled state.
API key requiredwithdrawals:write
| Parameter | Type | In | Required | Description |
|---|---|---|---|---|
| id | uuid | path | yes | Resource identifier returned by a list or create operation. |
| receiver_address | string | body | no | New non-empty recipient. |
| provider_fields | object | body | no | Replacement provider fields. |
| min_trigger_amount_minor | integer | body | no | New non-negative trigger amount. |
| enabled | boolean | body | no | New rule state. |
DELETE
https://lirpay.org/api/v2/integration/withdrawal-rules/{id}Delete an automatic withdrawal rule.
API key requiredwithdrawals:write
| Parameter | Type | In | Required | Description |
|---|---|---|---|---|
| id | uuid | path | yes | Resource identifier returned by a list or create operation. |