Chile Transactions
Pay-In Transactions
The following example simulates a pay-in transaction where your customer is charged in CLP, sends the funds to an Attrus bank account in Chile, and the amount is later converted to USD and wired to a foreign USD bank account.
This step is optional — you can simply share the bank details of the Attrus bank account in Chile that we opened for your exclusive use with your customers. Once they complete any bank transfer, we'll automatically notify you with a transaction ID generated by our API. Note: The customer must be registered in advance so we can properly identify the incoming funds.
If you prefer to create the transaction before the customer sends the funds, you can do so by making this request. The payload format is the same for payments in Mexico, Colombia, and other countries using local currencies, with the exception of the currency and from_bank_account_id fields — these must match the respective country and currency.
Important: For transactions in Chile, the value field must not contain decimal places. Example: use 15000 instead of 15000.00.
To correctly set the from_bank_account_id, go to the 'Bank Accounts' page in the portal and look under Attrus cash_in accounts. Select the account that matches the currency you intend to use. This account will be used for all pay-in transactions in this field.
curl -X POST "https://api.facilitapay.com/api/v1/transactions" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer eyJhbGciOiJIUzUxMiIsInR5cCI6IkpXVCJ9...." \
-d '{
"transaction": {
"currency": "CLP",
"exchange_currency": "USD",
"value": "15000",
"from_bank_account_id": "your CLP cash-in account id",
"to_bank_account_id": "your USD bank account id",
"subject_id": "your customer id"
}
}'
HTTP Request
POST /transactions
Body Parameters
| Parameter | Description | Type | Required |
|---|---|---|---|
transaction | Transaction data containing at least the following required values: | object | true |
currency | Currency of the amount to be sent to Attrus or deducted from an internal bank account balance (ISO 4217 format) | string | true |
value | Amount to be sent to Attrus (PIX / TED / WIRE) or deducted from an internal bank account balance | string | true |
exchange_currency | The "destination" currency also in (ISO 4217 format). It must match the currency of the bank account set in the to_bank_account_id field | string | true |
from_bank_account_id | In this example is the ID of a Bank Account from Attrus in Chile. This is NOT your customer's account | string | true |
to_bank_account_id | In this example is the ID of a foreign bank account of the partner (for this case, a USD bank account) | string | true |
subject_id | ID of your customer that will make the payment | string | true |
Common Mistakes
Account currency does not match transaction currency
Solution: Provide accounts with matching currencies as in the request.
Payout (CLP)
After registering your customer bank account with us, you will be able to pay them locally using the following endpoint. If you registered only the PIX key, we will be using it, if you registered the Bank details and PIX Key we will prioritize to pay via TED.
The payout transactions are initiated within your foreign currency cash-out account.
curl -X POST "https://api.facilitapay.com/api/v1/transactions" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer eyJhbGciOiJIUzUxMiIsInR5cCI6IkpXVCJ9...." \
-d '{
"transaction": {
"currency": "USD",
"exchange_currency": "CLP",
"value": "500.00",
"from_bank_account_id": "your USD/EUR cash-out internal account id",
"to_bank_account_id": "the id of your customer bank account",
"subject_id": "your customer id"
}
}'
HTTP Request
POST /transactions
Body Parameters
| Parameter | Description | Type | Required |
|---|---|---|---|
transaction | Transaction data containing at least the following required values: | object | true |
transaction.currency | Currency of the amount to be sent to Attrus or deducted from an internal bank account balance (ISO 4217 format) | string | true |
transaction.value | Amount to be sent to Attrus (PIX / TED / WIRE) or deducted from an internal bank account balance | string | true |
transaction.exchange_currency | The "destination" currency also in (ISO 4217 format). It must match the currency of the bank account set in the to_bank_account_id field | string | true |
transaction.from_bank_account_id | In this example is the ID of a foreign currency cash-out internal account | string | true |
transaction.to_bank_account_id | The ID of your customer bank account | string | true |
transaction.subject_id | ID of your customer that will make the payment | string | true |