Create a Payin
Collect funds from a third party (end-user) to be tokenized into stablecoin tokens.
The payment link is valid for 15 minutes after the Payin is created.
Request
Endpoint
POST /v1/payins
Scope
payins:create
Structure
| Name | Type | Description |
|---|---|---|
token | string | The stablecoin token to be used for the payin. Valid values are: • COPM for Colombian Pesos. |
amount | string | The amount of funds to be collected and tokenized. For COPM the max amount is 5,000,000 per transaction. |
payment | payment | Payment object (method, details, etc.) |
destination_wallet_id | uuid | The ID of the Customer's wallet to send the stablecoin tokens to. |
purpose | string | A description of why the payin is being made. |
final_url | string | URL to redirect the end-user to, after the Payin's payment is completed. ID of the Payin will be appended as a query parameter to this URL as a ?payin_id=... parameter. |
third_party | third_party | The end-user or ultimate beneficiary who's completing the payment for the payin. See below for more details. |
IMPORTANT:
• The final_url is not the URL that you need to redirect the end-user (third_party) to. That is your site's URL, where Minteo will redirect the end-user after the payment is completed.
• The token must be the same as the customer's wallet token.
The payment object
This object is filled depending on the payment method chosen by the Customer.
Required attributes for PSE
| Name | Type | Description |
|---|---|---|
method | string | Payment method for the Payin. Valid values are: • PSE (Pagos Seguros En línea) |
bank | PSE Banks | The bank to be used for the payin. |
List of Available PSE Banks
The payment.bank property must be filled with one of the banks in the following list.
Using any other bank will return an error.
IMPORTANT: The list of available banks is different for production and sandbox environments. Please use one of the options listed below.
Click here to view the Available PSE Banks list
- Production
- Sandbox
ALIANZA_FIDUCIARIABANCIENBANCAMIABANCO_AGRARIOBANCO_AV_VILLASBANCO_BBVABANCO_CAJA_SOCIALBANCO_COOPERATIVO_COOPCENTRALBANCO_DAVIVIENDABANCO_DE_BOGOTABANCO_DE_OCCIDENTEBANCO_FALABELLABANCO_FINANDINABANCO_GNB_SUDAMERISBANCO_ITAUBANCO_J_P_MORGANBANCO_MUNDO_MUJERBANCO_PICHINCHABANCO_POPULARBANCO_SANTANDERBANCO_SERFINANZABANCO_UNIONBANCOLOMBIABANCOOMEVABOLDCFA_COOPERATIVA_FINANCIERACITIBANKCOINKCOLTEFINANCIERACONFIAR_COOPERATIVA_FINANCIERACOTRAFACREZCAMOSDALEDAVIPLATADINGFINANCIERA_JURISCOOP_SA_COMPANIA_DE_FINANCIAMIENTOGLOBAL66IRISJFK_COOPERATIVA_FINANCIERALULO_BANKMOVIINEQUINUPOWWIRAPPIPAYSCOTIABANK_COLPATRIAUALA
OUTBANK
The third_party object
| Name | Type | Description |
|---|---|---|
full_name | string | The full name of the third party. |
legal_identifier_type | string | The type of legal ID of the third party. Valid values are: • CC for Colombian Cedula de Ciudadanía.• CE for Colombian Cedula de Extranjería.• NIT for Colombian NIT.• PP for Passport. |
legal_identifier | string | The legal ID of the third party. |
country_iso | string | The ISO 3166-1 alpha-2 country code of the third party. Valid values are: • CO for Colombia. |
email | string | The email address of the third party. |
Example JSON Request Body
{
"token": "COPM",
"amount": "127000",
"destination_wallet_id": "2af83836-43ea-407b-ab4e-9c64ee817b28", // Customer's Wallet
"purpose": "Top-up on behalf of John Doe",
"final_url": "https://yoursite.com/payin-completed", // callback url for customer / end user
"payment": {
"method": "PSE",
"bank": "BANCO_FALABELLA"
},
"third_party": {
"full_name": "John Doe",
"legal_identifier_type": "CC",
"legal_identifier": "1099075610",
"country_iso": "CO",
"email": "john@example.com"
}
}
Response
The important thing to note in the received response, is the action field, which states the next action to be taken by the end-user completing the Payin.
Currently, the only possible action is to redirect the end-user (third_party) to a URL where they will complete the payment for the Payin. For this, you will need to use the action.redirect_url field, so that the end-user is redirected to such URL.
Structure
| Name | Type | Description |
|---|---|---|
output | Payin | The Payin object. |
code | string | The response status code text. |
The action object
Below are the attributes of the action object when the action type is REDIRECT:
| Name | Type | Description |
|---|---|---|
type | string | The type of action to be taken. Currently, the only possible value is REDIRECT. |
redirect_url | string | This URL is the one that you need to redirect the end-user (third_party) to, in order for them to complete the payment. |
Once the end-user (third_party) has completed the payment, they will be redirected to the final_url that you provided when creating the Payin. The ID of the Payin will be appended as a query parameter to this URL as a ?payin_id=... parameter.
Example Response
{
"output": {
"id": "ffb50d6c-09f1-4f08-9b91-cbce466bed52",
"action": {
"type": "REDIRECT",
"redirect_url": "https://api.minteo.finance/v1/payins/redirect/ffb50d6c-09f1-4f08-9b91-cbce466bed52"
},
"status": "PENDING",
// ^ Newly returned attributes -----
"destination_wallet_id": "2af83836-43ea-407b-ab4e-9c64ee817b28", // Customer's Wallet
"amount": "127000",
"token": "COPM",
"purpose": "Top-up on behalf of John Doe",
"final_url": "https://yoursite.com/payin-completed?payin_id=ffb50d6c-09f1-4f08-9b91-cbce466bed52", // callback url for customer / end user
"payment": {
"method": "PSE",
"bank": "BANCO_FALABELLA"
},
"third_party": {
"full_name": "John Doe",
"legal_identifier_type": "CC",
"legal_identifier": "1099075610",
"country_iso": "CO",
"email": "john@example.com"
}
},
"code": "CREATED"
}