API de Suscripciones

Para consultas contactate a pay@increase.app

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

馃殌 Nuevo: Desde el 03/05/2021 es posible crear una suscripci贸n y facturarla 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 credito

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

  5. La suscripci贸n debe empezar el mismo dia que es creada. Es decir, no se facturaran en el momento suscripciones programadas.


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>

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

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