Pre-validating Payments
Pre-validating a payment intent helps reduce the chance of payments failing due to transfer limits. When creating a payment intent, you can include a sender_account
object in your request. This object allows you to specify the sender's account details, enabling our system to perform more accurate validations based on general transfer limits and previous transactions through Fintoc. This feature is only available in Chile.
Including a sender_account object
When making a POST request to create a payment intent, include the sender_account
object in your JSON payload. Here's an example:
{
"amount": 1000,
"currency": "clp",
"metadata": {
"order": "#987654321"
},
"customer_email": "[email protected]",
"sender_account": {
"holder_id": "195669317",
"institution_id": "cl_banco_estado"
}
}
The sender_account
object contains two fields:
holder_id
: The RUT (Rol Γnico Tributario) of the account holderinstitution_id
: The ID of the bank institution
Mixing these fields will help you validate certain limits:
- If you only send the
holder_id
and noinstitution_id
, Fintoc will use general limits for new contacts allowing more payments to go through without incorrectly canceling any. - If you only send the
institution_id
and noholder_id
, Fintoc will only validate bank-specific limits for maximum and minimum transfer amounts. - If you send both, Fintoc will perform all validations for the payment intent.
Use the Same Holder ID
When setting up the widget to pre-fill a username, use the same holder_id as for pre-validating payments. This ensures consistency and helps prevent payment failures.
Validation Process
When you include the sender_account
information, our system performs several checks to validate the payment intent:
- Institution-specific limits: We check if the payment amount is within the allowed limits for the specified institution.
- New contact limits: For first-time transfers or transfers within 24 hours of the first transfer, institutions apply stricter limits.
- Maximum transfer amounts: We ensure the payment doesn't exceed the maximum allowed transfer amount for the specified bank.
Error Responses
If a validation fails, you'll receive one of the following error responses:
- New contact maximum amount limit error: Fintoc first checks if the
holder_id
has made a transfer. If not, it then checks if the amount exceeds the institution's limit.
{
"error": {
"type": "new_contact_error",
"message": "The amount exceeds the maximum amount permitted for new contacts. For this institution, the maximum permissible amount is $[amount]. This restriction ends at [timestamp]",
"code": "new_contact_maximum_amount_limit_error"
}
}
- New contact payment number limit error: Fintoc first checks if the
holder_id
has made their first transfer during the same day. If they have, it then checks if the institution allows for more than one transfer to a new contact.
{
"error": {
"type": "new_contact_error",
"message": "The maximum number of transfers for new contacts was reached. This restriction ends at [timestamp]",
"code": "new_contact_payment_number_limit_error"
}
}
- Minimum amount limit error: Fintoc checks if the amount is lower thant the minimum allowed by the institution.
{
"error": {
"type": "amount_limit_error",
"message": "The amount is lower than the minimum amount permitted for payments by the institution. Please enter an amount greater than $[amount].",
"code": "minimum_amount_limit_error"
}
}
- Maximum amount limit error: Fintoc checks if the amount is lower thant the minimum allowed by the institution.
{
"error": {
"type": "amount_limit_error",
"message": "The amount is lower than the minimum amount permitted for payments by the institution. Please enter an amount greater than $[amount].",
"code": "maximum_amount_limit_error"
}
}
Best Practices
- Always include the
sender_account
information when creating a payment intent to ensure the most accurate validations. - Handle error responses gracefully in your application, providing clear feedback to your users about why a payment couldn't be processed.
- Make adjustments to your order so users are able to pay. These could be changing the payment amount if possible or setting up reminders for future payments.
Updated about 1 month ago