Credit lines

The Credit Lines service allows you to create and manage both credit products and credit lines.

Do you want to know more about credit lines? Check our documentation.

Create product

The endpoint lending/v1/products allows you to create a product.

At this moment you will be able to define the closing and due dates, the limits and available, the rates and fees, how the minimum payment is composed and more.

Available parameters
Body Parameters
namestringrequired
Product name
Example: Gold Credit Card
typerequired
Type of product
Example: CREDIT_CARD
Enum: CREDIT_CARD
statusrequired
Product status
Example: PAUSED
Enum: ACTIVEPAUSEDINACTIVE
countryrequired
Country of the product
Example: BRA
Enum: BRA
start_datestring(format: date)required
Effective date of the product
Example: 2022-04-20
end_datestring(format: date)
Expiration date of the product
Example: 2027-04-20
grace_period_daysobjectrequired
Period of time after the due date in which a payment can be made without any penalty
credit_cardobjectrequired
Credit card configuration
pricingobjectrequired
Centrally define the interest rates as well as the fees that will apply to the product.
available_balance_settingsstring
Balance restitution strategy. In CHILE AND MEXICO its only possible value is EXTENDED. In COLOMBIA its only possible value is RESTRICTED
Example: RESTRICTED
Enum: RESTRICTEDEXTENDED
statementobjectrequired
Statement configuration
refinancingobject
Refinancing configuration including mandatory and manual options
cancellationobject
Configuration for credit line cancellation due to default. Only available for Brazil.
Response details
dataobject

Was this section helpful to you?

POST/lending/v1/products
{
"name":
"Gold Credit Card"
"type":
"CREDIT_CARD"
"status":
"PAUSED"
"country":
"BRA"
"start_date":
"2022-04-20"
"end_date":
"2027-04-20"
"grace_period_days":{
"pausing":
10
"interest_accrual":
10
}
"credit_card":{
"max_allowed_installments":
1
"limits":{
...
}
"billing_cycle_config":{
...
}
"minimum_payment":
100
"minimum_payment_composition":{
...
}
"affinity_group_id":
"afg-20MpN8vmIPj77ujhb9cSeXAmPLe"
}
"pricing":{
"rates":{
...
}
"fees":[
...
]
}
"available_balance_settings":
"RESTRICTED"
"statement":{
"generate_pdf":
"true"
"include_annual_legend":
"true"
}
"refinancing":{
"mandatory":{
...
}
"manual":{
...
}
}
"cancellation":{
"enabled":
"true"
"delinquency_days_amount":
6
}
}
Response examples
{
"data":{
"id":
"lpr-2HMvSzWjc5La6WDTlgFweXAmPle"
"type":
"CREDIT_CARD"
"name":
"Gold Credit Card"
"status":
"PAUSED"
"country":
"BRA"
"start_date":
"2022-04-20"
"end_date":
"2024-05-17"
"credit_card":{
...
}
"grace_period_days":{
...
}
"pricing":{
...
}
"available_balance_settings":
"RESTRICTED"
"statement":{
...
}
"refinancing":{
...
}
"cancellation":{
...
}
}
}

Get products

The endpoint lending/v1/products allows you to obtain data on all created products.

Available parameters
Response details
dataarray

Was this section helpful to you?

GET/lending/v1/products
Response examples
{
"data":[
0:{
...
}
]
}

Get a product

The endpoint lending/v1/products/{id} allows you to obtain data from a specific product.

Available parameters
Path Parameters
product_idstringrequired
Unique product identifier
Example: lpr-2HMwKzetERdOEhbT86UweXamPle
Response details
dataobject

Was this section helpful to you?

GET/lending/v1/products/{product_id}
Response examples
{
"data":{
"id":
"lpr-2HMvSzWjc5La6WDTlgFweXAmPle"
"type":
"CREDIT_CARD"
"name":
"Gold Credit Card"
"status":
"PAUSED"
"country":
"BRA"
"start_date":
"2022-04-20"
"end_date":
"2024-05-17"
"credit_card":{
...
}
"grace_period_days":{
...
}
"pricing":{
...
}
"available_balance_settings":
"RESTRICTED"
"statement":{
...
}
"refinancing":{
...
}
"cancellation":{
...
}
}
}

Update a product

The endpoint lending/v1/products/{id} allows you to update the data of a specific product.

Available parameters
Body Parameters
namestring
Product name
statusstring
Product status
Enum: ACTIVEPAUSED
start_datestring
Effective date of the product
Example: 2022-01-01
end_datestring
Expiration date of the product
Example: 2027-04-20
grace_period_daysobject
Period of time after the due date in which a payment can be made without any penalty
credit_cardobject
Credit card configuration
statementobject
Statement configuration
cancellationobject
Configuration for credit line cancellation due to default. Only available for Brazil.
Path Parameters
product_idstringrequired
Unique product identifier
Example: lpr-2HMwKzetERdOEhbT86UweXamPle
Response details
dataobject

Was this section helpful to you?

PATCH/lending/v1/products/{product_id}
{
"name":
"string"
"status":
"ACTIVE"
"start_date":
"2022-01-01"
"end_date":
"2027-04-20"
"grace_period_days":{
"pausing":
5
"interest_accrual":
10
}
"credit_card":{
"max_allowed_installments":
1
"billing_cycle_config":{
...
}
"minimum_payment":
100
"minimum_payment_composition":{
...
}
"affinity_group_id":
"string"
}
"statement":{
"generate_pdf":
"true"
"include_annual_legend":
"true"
}
"cancellation":{
"enabled":
"true"
"delinquency_days_amount":
6
}
}
Response examples
{
"data":{
"id":
"lpr-2HMvSzWjc5La6WDTlgFweXAmPle"
"type":
"CREDIT_CARD"
"name":
"Gold Credit Card"
"status":
"PAUSED"
"country":
"BRA"
"start_date":
"2022-04-20"
"end_date":
"2024-05-17"
"credit_card":{
...
}
"grace_period_days":{
...
}
"pricing":{
...
}
"available_balance_settings":
"RESTRICTED"
"statement":{
...
}
"refinancing":{
...
}
"cancellation":{
...
}
}
}

Deactivate a product

The endpoint lending/v1/products/{id} allows you to deactivate a specific product.

Available parameters
Path Parameters
product_idstringrequired
Unique product identifier
Example: lpr-2HMwKzetERdOEhbT86UweXamPle
Response details
dataobject

Was this section helpful to you?

DELETE/lending/v1/products/{product_id}
Response examples
{
"data":{
"id":
"lpr-2HMvSzWjc5La6WDTlgFweXAmPle"
"type":
"CREDIT_CARD"
"name":
"Gold Credit Card"
"status":
"PAUSED"
"country":
"BRA"
"start_date":
"2022-04-20"
"end_date":
"2024-05-17"
"credit_card":{
...
}
"grace_period_days":{
...
}
"pricing":{
...
}
"available_balance_settings":
"RESTRICTED"
"statement":{
...
}
"refinancing":{
...
}
"cancellation":{
...
}
}
}

Get credit lines

The endpoint lending/v1/credit-lines allows you to obtain data on credit lines given a search criterion.

Filters

You can find more information on how to apply the filters in the section of Filters and pagination.

Available parameters
Query Parameters
filter[id]string
Allows obtaining the credit line associated with the specified ID
Example: lcr-2HMvRUOZ9C3fbsrkdeyOexAmpLe
filter[user_id]string
Allows obtaining the credit lines associated with the specified user ID
Example: usr-2HMvSDccc5PZzCvZ98lfeXamPle
filter[status]string
Allows obtaining the credit lines associated with the specified status
Example: ACTIVE
Enum: OFFEREDACTIVEPAUSEDCANCELEDEXPIRED
filter[offer_start_date][from]string(format: date)
Allows obtaining the credit lines from the specified offer date
Example: 2022-03-10
filter[offer_start_date][to]string(format: date)
Allows obtaining credit lines until the specified offer date
Example: 2022-03-20
filter[activation_date][from]string(format: date)
Allows obtaining the credit lines from the specified activation date
Example: 2022-04-12
filter[activation_date][to]string(format: date)
Allows obtaining the credit lines until the specified activation date
Example: 2022-04-22
filter[user_scoring]string
Allows obtaining the credit lines associated with the specified user scoring
Example: A
Response details
dataarray
metaobject

Was this section helpful to you?

GET/lending/v1/credit-lines
Response examples
{
"data":[
0:{
...
}
]
"meta":{
"pagination":{
...
}
}
}

Create credit line

The endpoint lending/v1/credit-lines allows you to create a credit line.

Available parameters
Body Parameters
user_idstringrequired
Identifier of the beneficiary user
Example: usr-2HMwJZo114goVi7xdSseYfujP79
product_idstringrequired
Product identifier
Example: lpr-2HMvSzWjc5La6WDTlgFweXAmPle
limitsoneOf
offer_start_datestringrequired
Start date of the offer
Example: 2022-04-20
offer_end_datestring
Completion date of the offer
Example: 2023-05-20
due_dateintegerrequired
Due date
Example: 28
user_scoringstringrequired
User scoring identifier
Example: A
person_typestring
Type of person
Example: NATURAL
Enum: LEGALNATURAL
Response details
dataobject

Was this section helpful to you?

POST/lending/v1/credit-lines
{
"user_id":
"usr-2HMwJZo114goVi7xdSseYfujP79"
"product_id":
"lpr-2HMvSzWjc5La6WDTlgFweXAmPle"
"offer_start_date":
"2022-04-20"
"offer_end_date":
"2023-05-20"
"due_date":
28
"user_scoring":
"A"
"person_type":
"NATURAL"
}
Response examples
{
"data":{
"id":
"lcr-2HMvRUOZ9C3fbsrkdeyOexAmpLe"
"user_id":
"usr-2HMvSDccc5PZzCvZ98lfeXamPle"
"country":
"MEX"
"person_type":
"NATURAL"
"product_id":
"lpr-2HMvSzWjc5La6WDTlgFweXAmPle"
"status":
"ACTIVE"
"status_detail":{
...
}
"offer_start_date":
"2022-04-12"
"offer_end_date":
"2022-04-12"
"activation_date":
"2022-04-12"
"balances":{
...
}
"due_date":
28
"due_date_last_update":
"2022-04-12"
"user_scoring":
"A"
"delinquency":{
...
}
"clearance_date_at":
"2024-07-01T20:37:33.180085009Z"
"pricing":{
...
}
}
}

Get a credit line

The endpoint lending/v1/credit-lines/{id} allows you to obtain data from a specific credit line.

In this instance, you will be able to define the specific limit and closing date for this credit line, always within the parameters you have defined for the product.

Do you want to know more about credit lines? Check our documentation.

Available parameters
Path Parameters
credit_line_idstringrequired
Unique credit line identifier
Example: lcr-2HMwKzetERdOEhbT86UweXamPle
Response details
dataobject

Was this section helpful to you?

GET/lending/v1/credit-lines/{credit_line_id}
Response examples
{
"data":{
"id":
"lcr-2HMvRUOZ9C3fbsrkdeyOexAmpLe"
"user_id":
"usr-2HMvSDccc5PZzCvZ98lfeXamPle"
"country":
"MEX"
"person_type":
"NATURAL"
"product_id":
"lpr-2HMvSzWjc5La6WDTlgFweXAmPle"
"status":
"ACTIVE"
"status_detail":{
...
}
"offer_start_date":
"2022-04-12"
"offer_end_date":
"2022-04-12"
"activation_date":
"2022-04-12"
"balances":{
...
}
"due_date":
28
"due_date_last_update":
"2022-04-12"
"user_scoring":
"A"
"delinquency":{
...
}
"clearance_date_at":
"2024-07-01T20:37:33.180085009Z"
"pricing":{
...
}
}
}

Update credit lines

The endpoint lending/v1/credit-lines/{id} allows you to update the data of a specific credit line.

Available parameters
Body Parameters
limitsoneOf
statusstring
Credit line status
Example: PAUSED
Enum: ACTIVEPAUSED
status_detailobject
Information about the status change
offer_start_datestring
Start date of the offer
Example: 2022-04-20
offer_end_datestring
Completion date of the offer
Example: 2023-05-20
due_dateinteger
Due date
Example: 28
user_scoringstring
User scoring identifier
Example: A
person_typestring
Type of person
Example: NATURAL
Enum: LEGALNATURAL
Path Parameters
credit_line_idstringrequired
Unique credit line identifier
Example: lcr-2HMwKzetERdOEhbT86UweXamPle
Response details
dataobject

Was this section helpful to you?

PATCH/lending/v1/credit-lines/{credit_line_id}
{
"status":
"PAUSED"
"status_detail":{
"reason":
"FRAUD"
"text":
"Additrional information"
}
"offer_start_date":
"2022-04-20"
"offer_end_date":
"2023-05-20"
"due_date":
28
"user_scoring":
"A"
"person_type":
"NATURAL"
}
Response examples
{
"data":{
"id":
"lcr-2HMvRUOZ9C3fbsrkdeyOexAmpLe"
"user_id":
"usr-2HMvSDccc5PZzCvZ98lfeXamPle"
"country":
"MEX"
"person_type":
"NATURAL"
"product_id":
"lpr-2HMvSzWjc5La6WDTlgFweXAmPle"
"status":
"ACTIVE"
"status_detail":{
...
}
"offer_start_date":
"2022-04-12"
"offer_end_date":
"2022-04-12"
"activation_date":
"2022-04-12"
"balances":{
...
}
"due_date":
28
"due_date_last_update":
"2022-04-12"
"user_scoring":
"A"
"delinquency":{
...
}
"clearance_date_at":
"2024-07-01T20:37:33.180085009Z"
"pricing":{
...
}
}
}

Cancel credit lines

The endpoint lending/v1/credit-lines/{id} allows you to cancel a credit line.

Available parameters
Body Parameters
reasonstring
Reason for cancellation of the credit line
Enum: BY_USER_WITHOUT_DEBT_ACCELERATIONBY_USER_WITH_DEBT_ACCELERATION_REQUESTBY_CLIENT_WITHOUT_DEBT_ACCELERATION
Path Parameters
credit_line_idstringrequired
Unique credit line identifier
Example: lcr-2HMwKzetERdOEhbT86UweXamPle
Response details
dataobject

Was this section helpful to you?

DELETE/lending/v1/credit-lines/{credit_line_id}
{
"reason":
"BY_USER_WITHOUT_DEBT_ACCELERATION"
}
Response examples
{
"data":{
"id":
"lcr-2HMwKzetERdOEhbT86UweXamPle"
}
}

Update expiration date

The endpoint lending/v1/credit-lines/{id}/config/due-date allows you to change the due date of a credit line by selecting from the options you defined in the Product. If needed, you can perform simulations by interacting with the endpoint: lending/v1/credit-lines/{id}/config/due-date/simulation.

Review all the conditions that apply to the expiration date update in our documentation.

Available parameters
Body Parameters
due_dateint(minimum: 1, maximum: 28)
New expiration date of the credit line
Example: 28
Path Parameters
credit_line_idstringrequired
Unique credit line identifier
Example: lcr-2HMwKzetERdOEhbT86UweXamPle
Response details
dataobject

Was this section helpful to you?

POST/lending/v1/credit-lines/{credit_line_id}/config/due-date
{
"due_date":
28
}
Response examples
{
"data":{
"id":
"lcr-2HMvRUOZ9C3fbsrkdeyOexAmpLe"
"user_id":
"usr-2HMvSDccc5PZzCvZ98lfeXamPle"
"country":
"MEX"
"person_type":
"NATURAL"
"product_id":
"lpr-2HMvSzWjc5La6WDTlgFweXAmPle"
"status":
"ACTIVE"
"status_detail":{
...
}
"offer_start_date":
"2022-04-12"
"offer_end_date":
"2022-04-12"
"activation_date":
"2022-04-12"
"balances":{
...
}
"due_date":
28
"due_date_last_update":
"2022-04-12"
"user_scoring":
"A"
"delinquency":{
...
}
"clearance_date_at":
"2024-07-01T20:37:33.180085009Z"
"pricing":{
...
}
}
}

Simulate expiration date update

The endpoint lending/v1/credit-lines/{id}/config/due-date/simulation allows you to simulate a change in the due date of a credit line and see what the closing dates and due dates of the next billing cycle would be.

Available parameters
Body Parameters
due_dateint(minimum: 1, maximum: 28)
New expiration date of the credit line
Example: 28
Path Parameters
credit_line_idstringrequired
Unique credit line identifier
Example: lcr-2HMwKzetERdOEhbT86UweXamPle
Response details
dataobject

Was this section helpful to you?

POST/lending/v1/credit-lines/{credit_line_id}/config/due-date/simulation
{
"due_date":
28
}
Response examples
{
"data":{
"old":{
...
}
"new":{
...
}
}
}

Create price update

The endpoint /products/{product_id}/pricing allows you to create new price updates for products with ACTIVE or PAUSED status

Available parameters
Body Parameters
start_datestring(format: date)required
Effective date of the price update
Example: 2022-04-30
ratesobjectrequired
Rate configuration
feesarrayrequired
Fee configuration
Path Parameters
product_idstringrequired
Unique product identifier
Example: lpr-2HMwKzetERdOEhbT86UweXamPle
Response details
dataobject

Was this section helpful to you?

POST/lending/v1/products/{product_id}/pricing
{
"start_date":
"2022-04-30"
"rates":{
"financing":
"15.00"
"late_fee":
"25.00"
"cash_advance":
"50.00"
"revolving":
"100.00"
}
"fees":[
0:{
...
}
]
}
Response examples
{
"data":{
"start_date":
"2022-04-30"
"rates":{
...
}
"fees":[
...
]
"issuer_installment_rates":[
...
]
}
}

Get price update history

The endpoint /products/{product_id}/pricing allows you to obtain the price update history of a product

Available parameters
Path Parameters
product_idstringrequired
Unique product identifier
Example: lpr-2HMwKzetERdOEhbT86UweXamPle
Response details
dataarray

Was this section helpful to you?

GET/lending/v1/products/{product_id}/pricing
Response examples
{
"data":[
0:{
...
}
]
}

Modify pending price update

The endpoint /products/{product_id}/pricing/{start_date} allows you to modify a pending price update

Available parameters
Body Parameters
ratesobject
Rate configuration
feesarray
Fee configuration
Path Parameters
product_idstringrequired
Unique product identifier
Example: lpr-2HMwKzetERdOEhbT86UweXamPle
start_datestringrequired
Effective date of the price update
Example: 2022-04-30
Response details
dataobject

Was this section helpful to you?

PATCH/lending/v1/products/{product_id}/pricing/{start_date}
{
"rates":{
"financing":
"15.00"
"late_fee":
"25.00"
"cash_advance":
"50.00"
"revolving":
"100.00"
}
"fees":[
0:{
...
}
]
}
Response examples
{
"data":{
"start_date":
"2022-04-30"
"rates":{
...
}
"fees":[
...
]
"issuer_installment_rates":[
...
]
}
}

Status change notifications

Please provide us this endpoint to receive notifications for changes in the status of the credit lines.

If you have questions about how to set up a webhook, visit our documentation.

You must respond with an HTTP 2xx code so that we do not resend the notification. Otherwise, we will resend it infinitely.

Available parameters
Header Parameters
X-Api-Keystringrequired
This header will allow you to identify which api-secret you need to use in case multiple pairs of api-key and api-secret have been configured.
Example: X-Api-Key: h3Ws4Cv09JcCdw7732ig+1Eq3I2b+IWOI1anUu1A4dE=
X-Signaturestringrequired
This header contains the digital signature (body + timestamp + endpoint) that you must verify to ensure the integrity of the request. If the signature does not match, you must reject the order.
Example: X-Signature: hmac-sha256 N70BkBKch1gwQDPj0jF0ooB9QQVXBEp5VQE+SGe6Z0k=
X-Timestampstringrequired
This header contains the moment when the order was signed in unix-epoch format so you can verify that the signature has not expired.
Example: X-Timestamp: 1637117179
X-Endpointstringrequired
The endpoint to which the request is made and you used to generate the signature. Use this header to regenerate the signature to validate, compare it with your service endpoint, and verify that they match.
Example: X-Endpoint: /<client-url>/credit-lines
Body Parameters
event_idstringrequired
Event identifier.
Example: credit_line_paused
Enum: credit_line_pausedcredit_line_unpausedcredit_line_canceled
idempotency_keystringrequired
Idempotent identifier for event creation.
Example: lcr-27KxRhP9YB4ouoyt6a5vVJlY9fR
dataobject
Information of the affected credit line

Was this section helpful to you?

POST/lending/v1/<client-url>/credit-lines
{
"event_id":
"credit_line_paused"
"idempotency_key":
"lcr-27KxRhP9YB4ouoyt6a5vVJlY9fR"
"data":{
"credit_line_id":
"lcr-27KxRhP9YB4ouoyt6a5vVJlY9fR"
"status":
"PAUSED"
"reason":
"IN_ARREARS"
}
}
Response examples

Notifications of entry, exit, or remaining in default of a user

You must provide us this endpoint to receive notifications of entry, exit, or remaining in default of a user.

If you have questions about how to set up a webhook, visit our documentation.

You must respond with an HTTP 2xx code so that we do not resend the notification. Otherwise, we will resend it infinitely.

Available parameters
Header Parameters
X-Api-Keystringrequired
This header will allow you to identify which api-secret you need to use in case multiple pairs of api-key and api-secret have been configured.
Example: X-Api-Key: h3Ws4Cv09JcCdw7732ig+1Eq3I2b+IWOI1anUu1A4dE=
X-Signaturestringrequired
This header contains the digital signature (body + timestamp + endpoint) that you must verify to ensure the integrity of the request. If the signature does not match, you must reject the order.
Example: X-Signature: hmac-sha256 N70BkBKch1gwQDPj0jF0ooB9QQVXBEp5VQE+SGe6Z0k=
X-Timestampstringrequired
This header contains the moment when the order was signed in unix-epoch format so you can verify that the signature has not expired.
Example: X-Timestamp: 1637117179
X-Endpointstringrequired
The endpoint to which the request is made and you used to generate the signature. Use this header to regenerate the signature to validate, compare it with your service endpoint, and verify that they match.
Example: X-Endpoint: /<client-url>/credit-lines
Body Parameters
event_idstringrequired
Event identifier.
Example: user_in_arrears
Enum: user_in_arrearsuser_out_of_arrearsuser_remains_in_arrears
idempotency_keystringrequired
Idempotent identifier for event creation.
Example: 27KxRhP9YB4ouoyt6a5vVJlY9fR
dataobject
Information of the affected user

Was this section helpful to you?

POST/lending/v1/<client-url>/debt
{
"event_id":
"user_in_arrears"
"idempotency_key":
"27KxRhP9YB4ouoyt6a5vVJlY9fR"
"data":{
"user_id":
"usr-27KxRhP9YB4ouoyt6a5vVJlY9fR"
"credit_line_id":
"lcr-27KxRhP9YB4ouoyt6a5vVJlY9fR"
"effective_at":
"2022-12-15T13:55:00"
}
}
Response examples

Debt simulation

The endpoint /lending/v1/credit-lines/{credit_line_id}/debt/simulation allows you to simulate the debt of a credit line by advancing some or all of the current installment plans. This simulation does NOT execute the acceleration.

Available parameters
Query Parameters
transaction_idsstring
Identifiers of the transactions, separated by commas
Example: ctx-2utzQVe7X7RfXrVUOPIJgCzRtx1,ctx-2utzQZBjBp3v2nzg1XsKgYGo9JL
Path Parameters
credit_line_idstringrequired
Unique credit line identifier
Example: lcr-2HMwKzetERdOEhbT86UweXamPle
Response details
dataobject

Was this section helpful to you?

GET/lending/v1/credit-lines/{credit_line_id}/debt/simulation
Response examples
{
"data":{
"total":{
...
}
"current":{
...
}
"acceleration":{
...
}
"has_pending_operations":
true
}
}

Debt acceleration

The endpoint /lending/v1/credit-lines/{credit_line_id}/debt/acceleration allows you to confirm the acceleration of the debt of a credit line, advancing some or all of the current installment plans, depending on what you indicate.

Available parameters
Body Parameters
transaction_idsarray
Path Parameters
credit_line_idstringrequired
Unique credit line identifier
Example: lcr-2HMwKzetERdOEhbT86UweXamPle
Response details
dataobject

Was this section helpful to you?

POST/lending/v1/credit-lines/{credit_line_id}/debt/acceleration
{
"transaction_ids":[
0
:
"ctx-2utzQVe7X7RfXrVUOPIJgCzRtx1"
1
:
"ctx-2utzQVe7X7RfXrVUOPIJgCzRtx2"
]
}
Response examples
{
"data":{
"message":
"string"
}
}