API de Descuentos

Para consultas contactate a pay@increase.app

Recurso para obtener los descuentos dados de alta en Increase Pay.

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 descuento#

POST https://gateway.increase.app/pay/public/v1/discounts

Headers#

Content-Type: application/json
Authorization: Bearer <access_token>
ParámetroTipoDescripción
name*StringNombre del Descuento
descriptionStringDescripcion del Descuento (ej: "Descuento campa√Īa retencion 2020")
external_idStringId para tu aplicación.
type*Stringtipo de descuento ("flat" o "percentage")
currency*Stringmoneda
amount*Stringmonto o porcentaje del descuento "1500.0" (\$1500) o "0.4" (40%)
duration*StringTiempo de vigencia del descuento ("periodic")
cycle_amountIntcantidad de ciclos
cycle_unit*Stringunidad de la cantidad de ciclos ("monthly")

Los par√°metros con * son obligatorios

Body#

{
"name": "30% Descuento Prueba",
"type": "percentage",
"amount": "0.3",
"currency": "ARG",
"duration": "periodic",
"cycle_unit": "monthly",
"cycle_amount": 6,
"description": "",
"external_id": ""
}

Response#

{
"id": "b5d36020-25e2-4a35-baac-c0a27567fae7",
"external_id": null,
"name": "30% Descuento Prueba",
"type": "percentage",
"amount": "0.3",
"currency": "ARS",
"duration": "periodic",
"cycle_unit": "monthly",
"cycle_amount": 6,
"created_at": "2020-01-17T17:35:49-03:00",
}

Obtener todos los descuentos#

GET https://gateway.increase.app/pay/public/v1/discounts

Headers#

Content-Type: application/json
Authorization: Bearer <access_token>
curl --include \
--header "Content-Type: application/json" \
--header "X-Auth-Token: <tu_access_token>" \
'https://gateway.increase.app/pay/public/v1/discounts'

Par√°metros optativos#

ParámetroTipoDescripción
PageIntegerIndica la p√°gina a obtener resultados.
per_pageIntegerCantidad de resultados por p√°gina (M√°ximo 40).

Success response

{
"data": [
{
"id": "00000000-0000-0000-0000-000000000001",
"external_id": null,
"name": "ea expedita",
"type": "flat",
"amount": "58065.72",
"currency": "ARS",
"duration": "periodic",
"cycle_unit": "monthly",
"cycle_amount": 1,
"created_at": "2020-01-17T17:35:49-03:00",
}
],
"current_page": 1,
"per_page": 20,
"total_pages": 1,
"total_elements": 1
}

Obtener un descuento específico#

GET https://gateway.increase.app/pay/public/v1/discounts/<id>

Headers#

Content-Type: application/json
Authorization: Bearer <access_token>

Actualizar un descuento específico#

PUT https://gateway.increase.app/pay/public/v1/discounts/<id>

Headers#

Content-Type: application/json
Authorization: Bearer <access_token>
ParámetroTipoDescripción
name*Stringnombre del descuento
amountStringmonto del descuento
external_idStringId para tu aplicación.

Body#

{
"name": "40% Descuento Prueba",
"amount": "0.4"
}

Response#

{
"id": "b5d36020-25e2-4a35-baac-c0a27567fae7",
"external_id": null,
"name": "40% Descuento Prueba",
"type": "percentage",
"amount": "0.4",
"currency": "ARS",
"duration": "periodic",
"cycle_unit": "monthly",
"cycle_amount": 6,
"created_at": "2020-01-17T17:35:49-03:00",
"updated_at": "2020-01-17T17:40:49-03:00"
}