This page will help you understand how Configurations work in Recurpay. Collect the right data from merchants and get your app set up effortlessly!
Welcome to Configurations in Recurpay. This feature allows app partners to collect the information they need from merchants to set up and run their apps effectively. By defining custom fields, partners can guide merchants through essential setup steps, ensuring smooth onboarding, accurate integration, and personalized app behavior.
Getting Started
With configurations, you can:
- Collect merchant-specific credentials as API keys for third-party platforms (e.g., marketing tools, CRMs, loyalty programs).
- Request dynamic input values such as custom discount codes, domain names, or webhook URLs that your app needs to function.
- Display a tailored setup form immediately after installation so merchants can provide everything your app requires upfront.
- Retrieve saved configuration data via API to personalize how your app behaves for each store.
- Modify or extend configuration fields anytime to support new features or updated requirements in your app.
How it works:
- App Partner Defines Fields: During app creation, partners can specify what data they need from merchants by defining a configuration schema using the fields object.
- Merchant Views Configuration Page:
Once an app is installed, the merchant is redirected to the configuration page. The page will render form fields based on the schema provided. - Merchant Inputs Values:
The merchant fills in the required fields (e.g., API keys, credentials, custom URLs). - App Can Retrieve Saved Configurations:
After submission, the app can retrieve the saved configuration data via the configuration API.
Available Endpoints:
- Retrieve a configuration: Fetch the current configuration fields defined for a specific app.
- Create a new configuration: Define and register the configuration fields that should be shown to merchants after app installation (e.g., API key inputs, URLs).
- Update the configuration: Make changes to an existing configuration, such as updating field labels, making fields required, or modifying input types.
- Delete the configuration: Remove the configuration fields associated with an app, typically used when deprecating the fields.
The configuration fields object:
{
"name": "unique_name_of_the_field", // (string) A unique identifier for the field, used internally
"label": "Label of the field", // (string) The display label shown to the merchant
"placeholder": "Placeholder of the field", // (string) Optional hint text shown inside the input field
"type": "Type of the field", // (string) Type of input. Supported types:
// text, textarea, select, password, email, number,
// range, date, url, tel, color, checkbox, radio, file
"value": "Default value of the field", // (string or null) Pre-filled value for the field
"maxlength": "Max length of the field", // (number or null) Maximum number of characters allowed (for text inputs)
"size": "Size of the field", // (number or null) Visual size of the input field (optional)
"pattern": "Regex pattern for validation", // (string or null) A regular expression to validate user input
"required": true, // (boolean) Whether the field is mandatory or not
"min": "Minimum number on the field", // (number or null) Minimum value (applicable for number, range, date, etc.)
"max": "Maximum number on the field", // (number or null) Maximum value (applicable for number, range, date, etc.)
"step": 1, // (number or null) Step interval for numeric or range inputs
"multiple": false, // (boolean or null) Allows multiple selections (used with file, checkbox, or select)
"options": [ // (array or null) Required for 'select', 'radio', or 'checkbox' types
{
"label": "Option 1",
"value": "option_1"
},
{
"label": "Option 2",
"value": "option_2"
}
]
}
The configuration fields resource
Field | Type | Description |
---|---|---|
name | string | Unique identifier for the field (used internally). |
label | string | The display name shown to the merchant. |
placeholder | string (optional) | Placeholder text shown inside the input box. |
type | string | Type of input field (e.g., text, number, email, password, select). |
value | string (optional) | Default or pre-filled value (optional). |
maxlength | number (optional) | Maximum number of characters allowed (for text inputs). |
size | number (optional) | Visual size of the input field (optional). |
pattern | string (optional) | Regex pattern that the input must match (useful for validation). |
required | boolean (optional) | If true, the merchant must fill in this field. |
min | number (nullable) | Minimum value (for number inputs). |
max | number (optional) | Maximum value (for number inputs). |
step | number (optional) | Step interval (useful for sliders or numeric inputs). |
multiple | boolean (optional) | Allows multiple selections (for applicable types like file or select). |
options | array (optional) | Required for select, radio, or checkbox types. Defines available choices. |