A list of all app scripts. Partner apps can use scripts to run custom code on the end customer's account or checkout pages.
🔒 Requires read-script-tags or write-script-tags access scope.
What are scripts ?
Scripts allow you to extend or customize the customer's experience on a merchant’s customer end, such as the customer account page, by injecting JavaScript.
This can be used to:
- Display widgets or banners.
- Track events and analytics.
- Enhance UI with real-time Recurpay data.
- Customize the cancellation flow or modify customer interactions
How it works ?
Once the app is installed and script injection is configured, Recurpay automatically injects the script into the specified page(s) of the merchant's store. This ensures your script runs in the correct context without requiring manual setup by the merchant.
The script object
{
"script": {
"inline_src": "console.log('Hello from Recurpay Partner');",
"display_scope": "customer_account",
"cache": true
}
}
The script resource
Attribute | Type | Description |
---|---|---|
inline_src | string | Inline JavaScript code that will be injected and executed directly on the specified page of the merchant's store (e.g., console.log(...)). |
display_scope | enum | Defines where the script will be injected and executed. Supported values may include customer_account, storefront, etc. |
cache | boolean | Determines whether the script should be cached by the storefront for better performance. Setting this to true enables caching. |