Pre-fill payment fields
The Console allows you to pre-fill fields in payment and payout requests directly through URL parameters. It offers a pragmatic solution for optimizing the Request To Pay & Request For Payout creation workflow.
Whether you are focused on saving time, reducing errors, or seamlessly integrating with external systems, this feature provides a versatile and efficient solution.
Benefits
- Time-Saving: the ability to pre-fill all the RTP and RFP fields directly through URL parameters significantly expedites the payment request creation process within the Console. Users experience a notable time reduction as manual data entry becomes unnecessary.
- Efficient User Experience: the pre-filled fields allow for a seamless user experience, reducing the number of steps required to create a payment request to only one.
- Error Reduction: using pre-fill forms minimize the risk of errors in payment requests by ensuring accurate and consistent data. It enhances the reliability of payment information, reducing the chance of discrepancies.
Usage in Integrations
The pre-filled RTP / RFP feature is particularly useful for integrations with custom applications and platforms, or for testing the RTP / RFP in sandbox. It is a lot easier to integrate than using the REST API, and allows creating payments in seconds.
Building the URL
Technical Details
To pre-fill the RTP and RFP forms within the Console, you need to construct a URL with query parameters providing the values for the fields you want to pre-fill. The URL must be constructed as follows:
- First comes the base URL:
- RTP:
https://console.fintecture.com/create-payment
- RFP:
https://console.fintecture.com/request-for-payout
- RTP:
- Then, for each field you want to pre-fill:
- Add a?
if it is the first field, or a&
if it is not the first field
- Add the field name, followed by=
, followed by the value you want to pre-fill
- Ensure proper encoding of the value usingencodeURIComponent
to handle special characters and spaces.
Example in JavaScript
// Define payment details like amount
const amount = encodeURIComponent('42.00');
// Ensure proper encoding using `encodeURIComponent` to handle special characters and spaces.
const reference = encodeURIComponent(reference);
// Construct the URL with encoded parameters
const baseUrl = "https://console.fintecture.com/create-payment";
const url = `${baseUrl}?amount=${amount}&reference=${reference}`;
// Redirect or use the generated URL as needed
window.location.href = url;
Fields
All fields are optional. If a field is not provided, the user will be required to fill it manually and won't be able to submit the form until it is filled.
Note: once the payment request or payout is created, when requesting to create a new one the query parameters won't be reused and the form will be blank.
Request to pay fields
The following fields of the RTP form can be pre-filled.
Note that if a field is provided for a payment method that does not support it, the parameter will be simply ignored.
Field Name | Type | Example | Details |
---|---|---|---|
app_id | string | b2595847-cb37-3c7e-af68-6e38451c52b8 | You can find the app_id in your Shop or Application settings in the Console |
payment_method | email link sms | email | The payment method may support different set of fields |
amount | string | 42.00 | All payment methods |
reference | string | My%20Reference | All payment methods |
template | order invoice quote | order | All payment methods |
due_date | string | 2021-12-31 | All payment methods |
expiration_date | string | 2021-12-31 | All payment methods |
client_type | individual company | individual | Payment methods email and link only |
first_name | string | Julien | Payment methods email and link only |
last_name | string | Lefebre | Payment methods email and link only |
email_address | string | julien.lefebre%40gmail.com | Payment methods email and link only |
company_name | string | Fintecture | Payment methods email and link onlyclient_type must be set to company |
siren | string | 123456789 | Payment methods email and link onlyclient_type must be set to company |
phone_number | string | %2B33612345678 | Payment method sms only |
message | string | My%20SMS%20Message | Payment method sms only |
Request for payout fields
The following fields of the RFP form can be pre-filled.
Field Name | Type | Example | Details |
---|---|---|---|
app_id | string | b2595847-cb37-3c7e-af68-6e38451c52b8 | You can find the app_id in your Shop or Application settings in the Console |
first_name | string | Julien | |
last_name | string | Lefebre | |
email_address | string | julien.lefebre%40gmail.com | |
phone_number | string | %2B33612345678 | |
expiration_date | string | 2021-12-31 | |
amount | string | 42.00 | |
reference | string | My%20Reference | |
language | fr en | en | Language of the email/tab |
Updated 11 months ago