API de Costos iniciales
Ver en POSTMAN
Recurso para obtener los costos iniciales en Increase Pay o crear nuevos costos iniciales
Cómo probar
Recuerda usar la Base URL de Sandbox para hacer pruebas:
https://gateway.increase.app/pay-sandbox/public/v1/
URL Producción: https://gateway.increase.app/pay/public/v1/
Recordar siempre enviar en los headers Content-Type: application/json
Crear un costo inicial
POST
https://gateway.increase.app/pay/public/v1/one_time_costs
Parámetro | Tipo | Descripción | Requerido | Permite update |
---|---|---|---|---|
name | String | Nombre del costo inicial | si | si |
amount | String | Monto o porcentaje del costo inicial "1500.0" (\$1500) o "0.4" (40%) | si | si |
type | String | Tipo de descuento ("flat" o "percentage") | si | no |
currency | String | Moneda en formato ISO 4217. Ej: ARS | no | no |
external_id | String | Identificador del cliente en tu sistema. | no | si |
description | String | Descripcion del costo inicial | no | si |
country | String | País en ISO 3166-1 alpha-3. Ej: ARG | no | no |
El campo currecy es obligatorio si el type es "flat"
Ejemplo
- Request body
- Response
{
"external_id": "123",
"name": "Alta",
"description": "description",
"amount": "100.5",
"country": "ARG",
"type": "flat",
"currency": "ARS"
}
{
"id": "2909e32d-d28b-44a8-85c9-b4595076fa88",
"external_id": "123",
"type": "flat",
"name": "Alta",
"description": "description",
"amount": "100.5",
"country": "ARG",
"currency": "ARS"
}
Obtener todos los costos iniciales
GET
https://gateway.increase.app/pay/public/v1/one_time_costs
Parámetros optativos
Parámetro | Tipo | Descripción |
---|---|---|
page | Integer | Indica la página a obtener resultados. |
per_page | Integer | Cantidad de resultados por página (Máximo 40). |
country | String | País en ISO 3166-1 alpha-3. Ej: ARG |
currency | String | Moneda en formato ISO 4217. Ej: ARS. |
Response
{
"data": [
{
"id": "2909e32d-d28b-44a8-85c9-b4595076fa88",
"external_id": "123",
"type": "flat",
"name": "Alta",
"description": "description",
"amount": "100.5",
"country": "ARG",
"currency": "ARS"
}
],
"current_page": 1,
"per_page": 20,
"total_pages": 1,
"total_elements": 1
}
Obtener un costo inicial específico
GET
https://gateway.increase.app/pay/public/v1/one_time_costs/<id>
Response
{
"id": "2909e32d-d28b-44a8-85c9-b4595076fa88",
"external_id": "123",
"type": "flat",
"name": "Alta",
"description": "description",
"amount": "100.5",
"country": "ARG",
"currency": "ARS"
}
Actualizar un costo inicial
PUT https://gateway.increase.app/pay/public/v1/one_time_costs/<id>
Ejemplo
- Request body
- Response
{
"external_id": "123456",
"name": "Alta new",
"description": "description new",
"amount": "110.5"
}
{
"id": "2909e32d-d28b-44a8-85c9-b4595076fa88",
"external_id": "123456",
"type": "flat",
"name": "Alta new",
"description": "description new",
"amount": "110.5",
"country": "ARG",
"currency": "ARS"
}