Skip to main content

API de Suscripciones

Si ya estás gestionando tus suscripciones con Increase Pay contactate con soporte.pay@increase.app. Si queres sumarte, comunicate con pay@increase.app.

Ver en POSTMAN

Recurso para obtener las suscripciones dadas de alta en Increase Pay o dar de Alta nuevas suscripciones

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 una suscripción

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

Headers

Content-Type: application/json
Authorization: Bearer <access_token>
ParámetroTipoDescripción
customer_id*StringId del cliente asociado.
plan_id*StringId del plan de la suscripción
external_idStringIdentificador del cliente en tu sistema.
payment_method_idStringId del metodo de pago del cliente
amountStringMonto de la suscripción (solo necesaria en variable
quantityNumberCantidad
trial_period_daysStringDías de prueba gratuitos
discountsArrayDescuentos asociados
one_time_costsArrayPagos únicos asociados.
taxesArrayImpuestos asociados
start_dateStringFecha de inicio de la suscripción
end_dateStringFecha de fin de la suscripción

Los parámetros con * son obligatorios. En caso de enviar el payment_method_id en vacio la suscripción otorgará luego de crearse un "checkout_link" desde donde el usuario final podrá cargar el medio de pago.

Body

{
"customer_id": "00000000-0000-0000-0000-000000000001",
"plan_id": "00000000-0000-0000-0000-000000000002",
"payment_method_id": "00000000-0000-0000-0000-000000000002",
"start_date": "2020-04-17",
"end_date": "2020-04-30",
"quantity": 1,
"trial_period_days": 7,
"discounts": [
{
"id": "00000000-0000-0000-0000-000000000001"
}
],
"one_time_costs": [
{
"id": "00000000-0000-0000-0000-000000000001"
}
],
"taxes": [
{
"id": "00000000-0000-0000-0000-000000000001"
}
]
}

Response

{
"id": "16d419da-ef8f-4238-9daf-708f15c0064b",
"plan": {
"id": "00000000-0000-0000-0000-000000000002",
"name": "officia quia",
"amount": "90.68",
"start_date": "2020-04-17",
"end_date": "2020-04-30",
"currency": "ARS",
"cycle_unit": "monthly",
"cycle_amount": 1,
"type": "usage",
"country": "ARG",
"external_id": null,
"trial_period_days": 7,
"tiers": [],
"charge_after_period": false,
"product_id": "00000000-0000-0000-0000-000000000001",
"automatic_subscription_request_approval": false,
"payment_method": {
"id": "78c37806-6aab-486e-b068-da958c72c8af",
"external_id": null,
"data": {
"type": "cbu",
"country": "ARG",
"number": "07200359**9854"
},
"created_at": "2020-03-03T16:20:03-03:00"
}
},
"customer": {
"id": "00000000-0000-0000-0000-000000000001",
"external_id": null,
"email": "13edwardo.klocko@gutmanngusikowski.net",
"language": "ES",
"timezone": "Buenos Aires",
"first_name": null,
"last_name": null,
"billing_info": {},
"created_at": "2020-03-27T17:23:11-03:00"
},
"quantity": 1,
"amount": "90.68",
"currency": "ARS",
"status": "active",
"canceled_at": null,
"paused_at": null,
"trial_period_end": "2020-04-03T17:23:11-03:00",
"next_billing_date": "2020-04-03T17:23:11-03:00",
"created_at": "2020-03-27T17:23:11-03:00",
"product": {
"id": "00000000-0000-0000-0000-000000000001",
"name": "ratione earum",
"external_id": null,
"created_at": "2020-03-27T17:23:11-03:00",
"checkout_link": "http://localhost:3000/checkout/00000000-0000-0000-0000-000000000001?product_id=00000000-0000-0000-0000-000000000001&hash_value=R21LdnZzaGw0Q1FicUpLUnplRk5kcndKUFRNUUJZelEwcCt0YkZUZ0JNU3UzUnBKbEE3bFRsREg1RnNIbDdqN0V3Skl5ZDVRQnBZOS0tRkpjVUtBM0lMTXNhY0xjLy0tclRvVHhIdjVTRVZYUUpONTNNSHRyZz09"
},
"discounts": [
{
"id": "00000000-0000-0000-0000-000000000001",
"external_id": null,
"name": "laboriosam fuga",
"type": "flat",
"amount": "97494.46",
"currency": "ARS",
"duration": "periodic",
"cycle_unit": "monthly",
"cycle_amount": 1,
"created_at": "2020-03-27T17:23:11-03:00",
"description": null
}
],
"invoices": [],
"one_time_costs": [
{
"id": "00000000-0000-0000-0000-000000000001",
"external_id": null,
"name": "consequatur cumque",
"amount": "18.61",
"currency": "ARS"
}
],
"taxes": [
{
"id": "00000000-0000-0000-0000-000000000001",
"type": "flat",
"name": "blanditiis fugit",
"amount": "15090.15",
"region": null,
"created_at": "2020-03-27T17:23:11-03:00",
"country": null,
"description": null,
"external_id": null
}
]
}

Cobrar en el momento.

Reglas de facturacion en el momento de la creacion:

  1. El plan de la susbripcion debe tener el parametro automatic_request_for_approval = true

  2. La suscripción debe ser creada con un payment_method vinculado.

  3. El payment_method debe ser una tarjeta de crédito / débito

  4. La suscripción no debe tener periodo de prueba.

  5. La suscripción no debe programarse para cobrar un día mayor a hoy.

  6. La suscripción debe empezar el mismo dia que es creada ("cobro al inicio del período").


Reglas de activación de una suscripción creadas desde esta nueva funcionalidad:

  • Si el payment_method especificado es del tipo CBU la suscripción se creara en estado active.
  • Si la suscripción tiene periodo de prueba se creara en estado active y se cobrará cuando corresponda al finalizar el período de prueba.
  • Si el payment_method es una tarjeta de credito, y se intenta facturar la suscripcion entonces el estado dependera del resultado del payment.
    • Si el payment falla entonces la suscripcion quedará en estado pending.
    • Si el payment es exitoso entonces la suscripcion quedará en estado active.

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

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

Headers

Content-Type: application/json
Authorization: Bearer <access_token>
ParámetroTipoDescripción
customer_id*StringId del cliente asociado.
plan_id*StringId del plan de la suscripción
external_idStringIdentificador del cliente en tu sistema.
payment_method_idStringId del metodo de pago del cliente
amountStringMonto de la suscripción (solo necesaria en variable
quantityNumberCantidad
trial_period_daysStringDías de prueba gratuitos
discountsArrayDescuentos asociados
one_time_costsArrayPagos únicos asociados.
taxesArrayImpuestos asociados
start_dateStringFecha de inicio de la suscripción
end_dateStringFecha de fin de la suscripción
process_syncStringOpcion de pagar en el momento

Los parámetros con * son obligatorios. En caso de enviar el payment_method_id en vacio la suscripción otorgará luego de crearse un "checkout_link" desde donde el usuario final podrá cargar el medio de pago.

⚠️ El parametro process_sync es opcional y si se lo setea en true se utilizara el flujo de pago en el momento y se aplicaran las reglas antes descritas.

Body

{
"process_sync": true,
"quantity": 1,
"trial_period_days": 0,
"amount": 100,
"end_date": null,
"external_id": "AA11110000",
"plan_id": "b1eda8d4-e0ce-4411-bf33-8e4ad55c16b6",
"customer_id": "f58fabcd-7635-4cc0-adf1-19f1f3ea5abd",
"payment_method_id": "855784a6-bd1b-4f4f-9fbe-f78fdc30a56b"
}

On Error (Procesando el pago)

{
"id": "e7888616-2c31-4ddf-8d72-bff2ba32bb00",
"plan": {
"id": "b1eda8d4-e0ce-4411-bf33-8e4ad55c16b6",
"name": "Test"
},
"customer": {
"id": "f58fabcd-7635-4cc0-adf1-19f1f3ea5abd",
"email": "a@a.com",
"first_name": "a",
"last_name": "test"
},
"quantity": 1,
"amount": "100.0",
"net_amount": "100.0",
"currency": "ARS",
"status": "pending",
"canceled_at": null,
"paused_at": null,
"trial_period_end": "2021-04-14T00:00:00-03:00",
"next_billing_date": "2021-05-14T00:00:00-03:00",
"created_at": "2021-04-14T17:26:36-03:00",
"payment_method": {
"id": "74374b60-2077-4635-a40f-531cc744b2e7",
"external_id": "1618430639737",
"data": {
"country": "ARG",
"number": "450995**3704",
"type": "card",
"cardholder_identification_type": "DNI",
"cardholder_identification_number": "39244184",
"expiration_month": 11,
"expiration_year": 2025,
"first_six_digits": "450995",
"last_four_digits": "3704",
"issuer_name": "Banco Santander",
"cardholder_name": "FUND",
"card_brand_name": "visa",
"card_brand_payment_type_id": "credit_card"
},
"created_at": "2021-04-14T17:03:59-03:00"
},
"product": {
"id": "b80d67e2-f5a4-4ee2-a4f9-992058d77e2d",
"name": "TestPublic API"
},
"external_id": "AA11110000",
"activate_at": null,
"cancel_at": null,
"checkout_link": "https://gateway.increase.app/pay/checkout/v1/short_urls/N4fCIl",
"invoice": {
"id": "92d72cc6-90fa-4d67-b73c-0899ec20b229",
"status": "open",
"amount": "100.0",
"external_id": null,
"customer": {
"id": "f58fabcd-7635-4cc0-adf1-19f1f3ea5abd",
"email": "a@a.com",
"first_name": "a",
"last_name": "test"
},
"subscriptions": [
{
"id": "e7888616-2c31-4ddf-8d72-bff2ba32bb00",
"plan": {
"id": "b1eda8d4-e0ce-4411-bf33-8e4ad55c16b6",
"name": "Test"
},
"customer": {
"id": "f58fabcd-7635-4cc0-adf1-19f1f3ea5abd",
"email": "a@a.com",
"first_name": "a",
"last_name": "test"
},
"quantity": 1,
"amount": "100.0",
"net_amount": "100.0",
"currency": "ARS",
"status": "pending",
"canceled_at": null,
"paused_at": null,
"trial_period_end": "2021-04-14T00:00:00-03:00",
"next_billing_date": "2021-05-14T00:00:00-03:00",
"created_at": "2021-04-14T17:26:36-03:00",
"product": {
"id": "b80d67e2-f5a4-4ee2-a4f9-992058d77e2d",
"name": "TestPublic API"
},
"activate_at": null,
"cancel_at": null
}
],
"currency": "ARS",
"created_at": "2021-04-14T17:26:36-03:00",
"paid_at": null,
"checkout_link": "https://gateway.increase.app/pay/checkout/v1/short_urls/asXf13",
"success_url": "?invoice_id=92d72cc6-90fa-4d67-b73c-0899ec20b229&customer_id=f58fabcd-7635-4cc0-adf1-19f1f3ea5abd&subscription_id=e7888616-2c31-4ddf-8d72-bff2ba32bb00&payment_method_id=74374b60-2077-4635-a40f-531cc744b2e7",
"invoice_items": [
{
"id": "2034b115-d349-4157-8bbd-bad319a2a4d6",
"invoice_id": "92d72cc6-90fa-4d67-b73c-0899ec20b229",
"description": "Test",
"quantity": 1,
"unit_price": "100.0",
"amount": "100.0",
"currency": "ARS",
"item_number": 0,
"invoiceable_id": "e7888616-2c31-4ddf-8d72-bff2ba32bb00",
"invoiceable_type": "Subscription",
"created_at": "2021-04-14T17:26:36.222-03:00",
"updated_at": "2021-04-14T17:26:36.222-03:00",
"product_id": "b80d67e2-f5a4-4ee2-a4f9-992058d77e2d",
"denormalized_product_name": "TestPublic API",
"applicable_type": null,
"applicable_id": null
}
],
"payments": [
{
"id": "32614e5a-0c00-4d57-9c6d-09206d75665a",
"invoice_id": "92d72cc6-90fa-4d67-b73c-0899ec20b229",
"payment_method_id": "74374b60-2077-4635-a40f-531cc744b2e7",
"status": "failed",
"amount": "100.0",
"currency": "ARS",
"id_for_collect_provider": 6895,
"created_at": "2021-04-14T17:26:36.257-03:00",
"updated_at": "2021-04-14T17:26:38.185-03:00",
"denormalized_customer_email": "a@a.com",
"retry_count": 0,
"metadata": {
"mercadopago_id": null,
"authorization_code": "229549003"
},
"rejection_code": "cc_rejected_insufficient_amount",
"rejection_type": "retryable",
"account_id": "4eaf67ba-10ef-4ecb-9288-f8adcb48815f",
"rejection_description": "Monto insuficiente",
"paid_at": null,
"processor_reference_id": null,
"denormalized_customer_first_name": "a",
"denormalized_customer_last_name": "test",
"refund_status": "unrequested"
}
]
},
"errors": {
"status_key": "process_payment_failed",
"status_detail": "Unable to process payment",
"internal_reference": "R31",
"error_message": null
}
}

On success

{
"id": "e7888616-2c31-4ddf-8d72-bff2ba32bb00",
"plan": {
"id": "b1eda8d4-e0ce-4411-bf33-8e4ad55c16b6",
"name": "Test"
},
"customer": {
"id": "f58fabcd-7635-4cc0-adf1-19f1f3ea5abd",
"email": "a@a.com",
"first_name": "a",
"last_name": "test"
},
"quantity": 1,
"amount": "100.0",
"net_amount": "100.0",
"currency": "ARS",
"status": "active",
"canceled_at": null,
"paused_at": null,
"trial_period_end": "2021-04-14T00:00:00-03:00",
"next_billing_date": "2021-05-14T00:00:00-03:00",
"created_at": "2021-04-14T17:26:36-03:00",
"payment_method": {
"id": "74374b60-2077-4635-a40f-531cc744b2e7",
"external_id": "1618430639737",
"data": {
"country": "ARG",
"number": "450995**3704",
"type": "card",
"cardholder_identification_type": "DNI",
"cardholder_identification_number": "39244184",
"expiration_month": 11,
"expiration_year": 2025,
"first_six_digits": "450995",
"last_four_digits": "3704",
"issuer_name": "Banco Santander",
"cardholder_name": "FUND",
"card_brand_name": "visa",
"card_brand_payment_type_id": "credit_card"
},
"created_at": "2021-04-14T17:03:59-03:00"
},
"product": {
"id": "b80d67e2-f5a4-4ee2-a4f9-992058d77e2d",
"name": "TestPublic API"
},
"external_id": "AA11110000",
"activate_at": null,
"cancel_at": null,
"checkout_link": "https://gateway.increase.app/pay/checkout/v1/short_urls/N4fCIl",
"invoice": {
"id": "92d72cc6-90fa-4d67-b73c-0899ec20b229",
"status": "open",
"amount": "100.0",
"external_id": null,
"customer": {
"id": "f58fabcd-7635-4cc0-adf1-19f1f3ea5abd",
"email": "a@a.com",
"first_name": "a",
"last_name": "test"
},
"subscriptions": [
{
"id": "e7888616-2c31-4ddf-8d72-bff2ba32bb00",
"plan": {
"id": "b1eda8d4-e0ce-4411-bf33-8e4ad55c16b6",
"name": "Test"
},
"customer": {
"id": "f58fabcd-7635-4cc0-adf1-19f1f3ea5abd",
"email": "a@a.com",
"first_name": "a",
"last_name": "test"
},
"quantity": 1,
"amount": "100.0",
"net_amount": "100.0",
"currency": "ARS",
"status": "active",
"canceled_at": null,
"paused_at": null,
"trial_period_end": "2021-04-14T00:00:00-03:00",
"next_billing_date": "2021-05-14T00:00:00-03:00",
"created_at": "2021-04-14T17:26:36-03:00",
"product": {
"id": "b80d67e2-f5a4-4ee2-a4f9-992058d77e2d",
"name": "TestPublic API"
},
"activate_at": null,
"cancel_at": null
}
],
"currency": "ARS",
"created_at": "2021-04-14T17:26:36-03:00",
"paid_at": null,
"checkout_link": "https://gateway.increase.app/pay/checkout/v1/short_urls/asXf13",
"success_url": "?invoice_id=92d72cc6-90fa-4d67-b73c-0899ec20b229&customer_id=f58fabcd-7635-4cc0-adf1-19f1f3ea5abd&subscription_id=e7888616-2c31-4ddf-8d72-bff2ba32bb00&payment_method_id=74374b60-2077-4635-a40f-531cc744b2e7",
"invoice_items": [
{
"id": "2034b115-d349-4157-8bbd-bad319a2a4d6",
"invoice_id": "92d72cc6-90fa-4d67-b73c-0899ec20b229",
"description": "Test",
"quantity": 1,
"unit_price": "100.0",
"amount": "100.0",
"currency": "ARS",
"item_number": 0,
"invoiceable_id": "e7888616-2c31-4ddf-8d72-bff2ba32bb00",
"invoiceable_type": "Subscription",
"created_at": "2021-04-14T17:26:36.222-03:00",
"updated_at": "2021-04-14T17:26:36.222-03:00",
"product_id": "b80d67e2-f5a4-4ee2-a4f9-992058d77e2d",
"denormalized_product_name": "TestPublic API",
"applicable_type": null,
"applicable_id": null
}
],
"payments": [
{
"id": "1f834766-1c45-424a-bb9b-0bd3dc4b7a2c",
"invoice_id": "92d72cc6-90fa-4d67-b73c-0899ec20b229",
"payment_method_id": "855784a6-bd1b-4f4f-9fbe-f78fdc30a56b",
"status": "approved",
"amount": "100.0",
"currency": "ARS",
"id_for_collect_provider": 6896,
"created_at": "2021-04-14T17:29:05.694-03:00",
"updated_at": "2021-04-14T17:29:07.568-03:00",
"denormalized_customer_email": "a@a.com",
"retry_count": 1,
"metadata": {
"mercadopago_id": null,
"authorization_code": "229549003"
},
"rejection_code": null,
"rejection_type": null,
"account_id": "4eaf67ba-10ef-4ecb-9288-f8adcb48815f",
"rejection_description": null,
"paid_at": "2021-04-14T17:29:07.552-03:00",
"processor_reference_id": "1235785751",
"denormalized_customer_first_name": "a",
"denormalized_customer_last_name": "test",
"refund_status": "unrequested"
},
{
"id": "32614e5a-0c00-4d57-9c6d-09206d75665a",
"invoice_id": "92d72cc6-90fa-4d67-b73c-0899ec20b229",
"payment_method_id": "74374b60-2077-4635-a40f-531cc744b2e7",
"status": "failed",
"amount": "100.0",
"currency": "ARS",
"id_for_collect_provider": 6895,
"created_at": "2021-04-14T17:26:36.257-03:00",
"updated_at": "2021-04-14T17:26:38.185-03:00",
"denormalized_customer_email": "a@a.com",
"retry_count": 0,
"metadata": {
"mercadopago_id": null,
"authorization_code": "229549003"
},
"rejection_code": "cc_rejected_insufficient_amount",
"rejection_type": "retryable",
"account_id": "4eaf67ba-10ef-4ecb-9288-f8adcb48815f",
"rejection_description": "Monto insuficiente",
"paid_at": null,
"processor_reference_id": null,
"denormalized_customer_first_name": "a",
"denormalized_customer_last_name": "test",
"refund_status": "unrequested"
}
]
},
"errors": null
}

Obtener todas las suscripciones

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

Headers

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

Parámetros optativos

ParámetroTipoDescripción
PageIntegerIndica la página a obtener resultados.
per_pageIntegerCantidad de resultados por página (Máximo 40).
customer_idStringId del cliente asociado.
plan_idStringId del plan de la suscripción
product_idStringId del producto.
external_idString
created_at_fromStringFecha + Hora en formato ISO 8601. Ej: 2020-10-10T00:00:00
created_at_toStringFecha + Hora en formato ISO 8601. Ej: 2020-10-10T00:00:00
paused_at_fromStringFecha + Hora en formato ISO 8601. Ej: 2020-10-10T00:00:00
paused_at_toStringFecha + Hora en formato ISO 8601. Ej: 2020-10-10T00:00:00
canceled_at_fromStringFecha + Hora en formato ISO 8601. Ej: 2020-10-10T00:00:00
canceled_at_toStringFecha + Hora en formato ISO 8601. Ej: 2020-10-10T00:00:00
statusStringValores posibles: active pending scheduled paused canceled

Success response

{
"data": [
{
"id": "00000000-0000-0000-0000-000000000002",
"plan": {
"id": "5e7ed1f9-2740-4404-ab54-27e6930a7858",
"name": "odit quam"
},
"customer": {
"id": "00000000-0000-0000-0000-000000000001",
"email": "12sheryl_douglas@macgyver.info",
"first_name": null,
"last_name": null
},
"quantity": null,
"amount": "0.0",
"currency": "ARS",
"status": "active",
"canceled_at": null,
"paused_at": null,
"trial_period_end": null,
"next_billing_date": null,
"created_at": "2020-03-27T17:23:11-03:00",
"payment_method": null,
"product": {
"id": "00000000-0000-0000-0000-000000000001",
"name": "ipsam quibusdam"
}
},
{
"id": "00000000-0000-0000-0000-000000000001",
"plan": {
"id": "70f1b245-75f8-4ca7-a5b9-0a9733e15d9e",
"name": "quasi odio"
},
"customer": {
"id": "00000000-0000-0000-0000-000000000001",
"email": "12sheryl_douglas@macgyver.info",
"first_name": null,
"last_name": null
},
"quantity": null,
"amount": "27.51",
"currency": "ARS",
"status": "active",
"canceled_at": null,
"paused_at": null,
"trial_period_end": null,
"next_billing_date": null,
"created_at": "2020-03-27T17:23:11-03:00",
"payment_method": null,
"product": {
"id": "00000000-0000-0000-0000-000000000001",
"name": "ipsam quibusdam"
}
}
],
"current_page": 1,
"per_page": 20,
"total_pages": 1,
"total_elements": 2
}

Obtener una suscripción específica

GET https://gateway.increase.app/pay/public/v1/subscriptions/<id>?customer_id=<customer_id>?product_id=<product_id>?status=<status>&plan_id=<plan_id>

Headers

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

Pausar una suscripción específica

POST https://gateway.increase.app/pay/public/v1/subscriptions/<id>/pause

Headers

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

Parámetros optativos

ParámetroTipoDescripción
periodsIntegerCantidad de periodos a pausar la suscripción. Si no se envía, se pausa indefinidamente

Cancelar una suscripción específica

PATCH https://gateway.increase.app/pay/public/v1/subscriptions/<id>/cancel

Headers

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

Reactivar una suscripción específica

POST https://gateway.increase.app/pay/public/v1/subscriptions/<id>/activate

Headers

Content-Type: application/json
Authorization: Bearer <access_token>
ParámetroTipoDescripción
start_dateStringFecha de inicio de la suscripción

Actualizar una suscripción específica

PATCH https://gateway.increase.app/pay/public/v1/subscriptions/<id>

Headers

Content-Type: application/json
Authorization: Bearer <access_token>
ParámetroTipoDescripción
quantityNumberCantidad
trial_period_endDateFecha de finalización del período de prueba
amountnumbermonto
payment_method_idStringId del metodo de pago del cliente
next_billing_dateDateFecha del siguiente cobro

Validaciones del next_billing_date

El next_billing_date se puede cambiar si la suscripción se encuentra en alguno de los siguientes estados:

  • active
  • scheduled
  • trial
  • grace_period

El next billing date tiene un rango valido segun el tipo de subscripcion, la nueva fecha de cobro debe estar dentro del rango permitido:

  • Para suscripciones anuales: +/- 30 días.
  • Para suscripciones mensuales: +/- 5 días.
  • Para suscripciones semanales: +/- 3 días.
  • Para suscripciones personalizadas (diario): ilimitado.

Los dias de limites se pueden interpretar como minimo y maximo es decir

// Para una subscripcion semanal
// siendo 10 de abril del 2022 la fecha de subscription.next_billing_date
// el minimo va a ser 7 de abril del 2022
// el maximo va a ser 13 de abril del 2022

[Thu, 07 Apr 2022, Fri, 08 Apr 2022, Sat, 09 Apr 2022, Sun, 10 Apr 2022, Mon, 11 Apr 2022, Tue, 12 Apr 2022, Wed, 13 Apr 2022]

Body

{
"amount": 200
}

Response

{
"id": "e7888616-2c31-4ddf-8d72-bff2ba32bb00",
"plan": {
"id": "b1eda8d4-e0ce-4411-bf33-8e4ad55c16b6",
"name": "Test"
},
"customer": {
"id": "f58fabcd-7635-4cc0-adf1-19f1f3ea5abd",
"email": "a@a.com",
"first_name": "a",
"last_name": "test"
},
"quantity": 1,
"amount": "200.0",
"net_amount": "200.0",
"currency": "ARS",
"status": "active",
"canceled_at": null,
"paused_at": null,
"trial_period_end": "2021-04-14T00:00:00-03:00",
"next_billing_date": "2021-05-14T00:00:00-03:00",
"created_at": "2021-04-14T17:26:36-03:00",
"payment_method": {
"id": "74374b60-2077-4635-a40f-531cc744b2e7",
"external_id": "1618430639737",
"data": {
"country": "ARG",
"number": "450995**3704",
"type": "card",
"cardholder_identification_type": "DNI",
"cardholder_identification_number": "39244184",
"expiration_month": 11,
"expiration_year": 2025,
"first_six_digits": "450995",
"last_four_digits": "3704",
"issuer_name": "Banco Santander",
"cardholder_name": "FUND",
"card_brand_name": "visa",
"card_brand_payment_type_id": "credit_card"
},
"created_at": "2021-04-14T17:03:59-03:00"
},
"product": {
"id": "b80d67e2-f5a4-4ee2-a4f9-992058d77e2d",
"name": "TestPublic API"
},
"external_id": "AA11110000",
"activate_at": null,
"cancel_at": null,
"checkout_link": "https://gateway.increase.app/pay/checkout/v1/short_urls/N4fCIl",
"invoice": {
"id": "92d72cc6-90fa-4d67-b73c-0899ec20b229",
"status": "open",
"amount": "100.0",
"external_id": null,
"customer": {
"id": "f58fabcd-7635-4cc0-adf1-19f1f3ea5abd",
"email": "a@a.com",
"first_name": "a",
"last_name": "test"
},
"subscriptions": [
{
"id": "e7888616-2c31-4ddf-8d72-bff2ba32bb00",
"plan": {
"id": "b1eda8d4-e0ce-4411-bf33-8e4ad55c16b6",
"name": "Test"
},
"customer": {
"id": "f58fabcd-7635-4cc0-adf1-19f1f3ea5abd",
"email": "a@a.com",
"first_name": "a",
"last_name": "test"
},
"quantity": 1,
"amount": "100.0",
"net_amount": "100.0",
"currency": "ARS",
"status": "active",
"canceled_at": null,
"paused_at": null,
"trial_period_end": "2021-04-14T00:00:00-03:00",
"next_billing_date": "2021-05-14T00:00:00-03:00",
"created_at": "2021-04-14T17:26:36-03:00",
"product": {
"id": "b80d67e2-f5a4-4ee2-a4f9-992058d77e2d",
"name": "TestPublic API"
},
"activate_at": null,
"cancel_at": null
}
],
"currency": "ARS",
"created_at": "2021-04-14T17:26:36-03:00",
"paid_at": null,
"checkout_link": "https://gateway.increase.app/pay/checkout/v1/short_urls/asXf13",
"success_url": "?invoice_id=92d72cc6-90fa-4d67-b73c-0899ec20b229&customer_id=f58fabcd-7635-4cc0-adf1-19f1f3ea5abd&subscription_id=e7888616-2c31-4ddf-8d72-bff2ba32bb00&payment_method_id=74374b60-2077-4635-a40f-531cc744b2e7",
"invoice_items": [
{
"id": "2034b115-d349-4157-8bbd-bad319a2a4d6",
"invoice_id": "92d72cc6-90fa-4d67-b73c-0899ec20b229",
"description": "Test",
"quantity": 1,
"unit_price": "100.0",
"amount": "100.0",
"currency": "ARS",
"item_number": 0,
"invoiceable_id": "e7888616-2c31-4ddf-8d72-bff2ba32bb00",
"invoiceable_type": "Subscription",
"created_at": "2021-04-14T17:26:36.222-03:00",
"updated_at": "2021-04-14T17:26:36.222-03:00",
"product_id": "b80d67e2-f5a4-4ee2-a4f9-992058d77e2d",
"denormalized_product_name": "TestPublic API",
"applicable_type": null,
"applicable_id": null
}
],
"payments": [
{
"id": "1f834766-1c45-424a-bb9b-0bd3dc4b7a2c",
"invoice_id": "92d72cc6-90fa-4d67-b73c-0899ec20b229",
"payment_method_id": "855784a6-bd1b-4f4f-9fbe-f78fdc30a56b",
"status": "approved",
"amount": "100.0",
"currency": "ARS",
"id_for_collect_provider": 6896,
"created_at": "2021-04-14T17:29:05.694-03:00",
"updated_at": "2021-04-14T17:29:07.568-03:00",
"denormalized_customer_email": "a@a.com",
"retry_count": 1,
"metadata": {
"mercadopago_id": null,
"authorization_code": "229549003"
},
"rejection_code": null,
"rejection_type": null,
"account_id": "4eaf67ba-10ef-4ecb-9288-f8adcb48815f",
"rejection_description": null,
"paid_at": "2021-04-14T17:29:07.552-03:00",
"processor_reference_id": "1235785751",
"denormalized_customer_first_name": "a",
"denormalized_customer_last_name": "test",
"refund_status": "unrequested"
},
{
"id": "32614e5a-0c00-4d57-9c6d-09206d75665a",
"invoice_id": "92d72cc6-90fa-4d67-b73c-0899ec20b229",
"payment_method_id": "74374b60-2077-4635-a40f-531cc744b2e7",
"status": "failed",
"amount": "100.0",
"currency": "ARS",
"id_for_collect_provider": 6895,
"created_at": "2021-04-14T17:26:36.257-03:00",
"updated_at": "2021-04-14T17:26:38.185-03:00",
"denormalized_customer_email": "a@a.com",
"retry_count": 0,
"metadata": {
"mercadopago_id": null,
"authorization_code": "229549003"
},
"rejection_code": "cc_rejected_insufficient_amount",
"rejection_type": "retryable",
"account_id": "4eaf67ba-10ef-4ecb-9288-f8adcb48815f",
"rejection_description": "Monto insuficiente",
"paid_at": null,
"processor_reference_id": null,
"denormalized_customer_first_name": "a",
"denormalized_customer_last_name": "test",
"refund_status": "unrequested"
}
]
},
"errors": null
}

Actualizar los descuentos de una suscripción específica

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

Headers

Content-Type: application/json
Authorization: Bearer <access_token>
ParámetroTipoDescripción
discountsArraydescuentos a actualizar

Actualizar los pagos únicos de una suscripción específica

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

Headers

Content-Type: application/json
Authorization: Bearer <access_token>
ParámetroTipoDescripción
one_time_costsArraydescuentos a actualizar

Actualizar los impuestos de una suscripción específica

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

Headers

Content-Type: application/json
Authorization: Bearer <access_token>
ParámetroTipoDescripción
taxesArraydescuentos a actualizar