Listado de todos los eventos disponibles en Toku.

Pagos manuales

payment.succeeded

Pago realizado exitosamente de un Invoice. Esto aplica solo para pagos ejecutados manualmente a través de Toku. Si quieres escuchar los pagos procesados a través de Toku, debes utilizar payment_intent.succeeded.

{
  "id": "whe_hXPK3YBs4EUfw2KFZlB6R44MiFa07vFU",
  "event_type": "payment.succeeded",
  "payment": {
    "id": "pay_1YPKc-NZPwxBYf6hnLsstaqG9JAZKxX9",
    "invoice": "in_1YPKc-NZPwxBYf6hnLsstaqG9JAZKxX9",
    "customer": "cus_l8ojrji3k8SC7iLbVBxxgwVeOLRRbkEc",
    "product_id": "pid-12345",
    "due_date": "2022-01-01",
    "payment_amount": "1000",
    "payment_date": "2022-01-01",
    "gateway": "patpass",
    "payment_intent": "pi_1YPKc-NZPwxBYf6hnLsstaqG9JAZKxX9",
    "buy_order": "bo-23456",
    "receipt": "rpt_1YPKc-NZPwxBYf6hnLsstaqG9JAZKxX9"
  }
}

Pagos por Toku

payment_intent.succeeded

Intento de pago exitoso de un Invoice.

{
  "id": "whe_hXPK3YBs4EUfw2KFZlB6R44MiFa07vFU",
  "event_type": "payment_intent.succeeded",
  "payment_intent": {
	  "id": "pi_dsQ5-sNZPwxBYf6hnLsstaqG9JAZK432",
    "invoice": "in_1YPKc-NZPwxBYf6hnLsstaqG9JAZKxX9",
    "customer": "cus_l8ojrji3k8SC7iLbVBxxgwVeOLRRbkEc",
    "gateway": "toku_pac",
    "amount": "1000",
    "payment_method": "pm_1YPKc-NZPwxBYf6hnLsstaqG9JAZKxX9",
    "transaction_date": "2021-04-22T14:03:39.410000",
    "card_detail": "1234",
    "buy_order": "bo-2-609bf894",
    "child_buy_order": "cbo-2-609bf894",
    "authorization_code": "1213",
    "payment_type_code": "VN",
    "toku_response_code": "SU0000",
    "installments_number": 0,
    "mc_order_id": "1234567",
    "response_code": 0,
    "status": "AUTHORIZED"
  }
}

Ejemplos específicos

payment_intent.succeeded Transferencia

{
	"id": "eve_zwr5c8Ddcu0sW2zl57aTTeTFmovcysl-",
	"event_type": "payment_intent.succeeded",
	"payment_intent": {
		"id": "pi_cGuAf-JSoTrg7QhQlabJTsuhQaGborN4",
		"invoice": "in_poaFZEY8fgpxXhwhOYj4KBk1tjLQA-wa",
		"customer": "cus_HpnoeQFzNB-pOiAobqFrccfk7Kpwin_b",
 		"id_account": "acc_l8ojrji3k8SC7iLbVBxxgwVeOLRRbkEc",
		"gateway": "khipu_transfer",
		"amount": "10000.0000",
		"status": "AUTHORIZED",
		"payment_method": "pm_AM4LvUGcqfxzgiUgxMocVuR-MD3xjb4N",
		"transaction_date": "2022-04-07 21:39:28.344703",
		"card_detail": null,
		"buy_order": "156967510939",
		"child_buy_order": null,
		"authorization_code": null,
		"payment_type_code": null,
		"response_code": null,
		"toku_response_code": null,
		"installments_number": null,
		"mc_order_id": null
	}
}

payment_intent.succeeded Cards PSP

{
		"id": "wheve_EmGFwPP-hdS_2gRzt-NLlfimMEFLFvcp",
		"event_type": "payment_intent.succeeded",
		"payment_intent": {
			"id": "pi_db3_j8jlempd9Of2JVc65Vupqt_KurLb",
			"invoice": "in_ilEtjHa-IpBP1HsAPEDcgVmHGAgizFnC",
			"customer": "cus_8CHZ-w3GdJ_1AtDxhMzT_MgT_cxYBwQb",
			"gateway": "internal_psp",
			"amount": "1500.0000",
			"status": "AUTHORIZED",
			"payment_method": "pm_OjTv9N9lYsHlm_qOjS9ZX_iMEFpcejzv",
			"transaction_date": "2023-06-29 15:37:51.769414",
			"card_detail": null,
			"buy_order": null,
			"child_buy_order": null,
			"authorization_code": null,
			"payment_type_code": null,
			"response_code": null,
			"toku_response_code": "SUPSP0000",
			"installments_number": null,
			"mc_order_id": null,
			"id_account": "acc_5pe6OvW_pWp8qEB16cMs96J-lS95E1sC"
		}
}

payment_intent.payment_failed

Intento de pago fallido de un Invoice.

{
  "id": "whe_hXPK3YBs4EUfw2KFZlB6R44MiFa07vFU",
  "event_type": "payment_intent.payment_failed",
  "payment_intent": {
    "id": "pi_dsQ5-sNZPwxBYf6hnLsstaqG9JAZK432",
    "invoice": "in_1YPKc-NZPwxBYf6hnLsstaqG9JAZKxX9",
    "customer": "cus_l8ojrji3k8SC7iLbVBxxgwVeOLRRbkEc",
    "gateway": "toku_pac",
    "amount": 1000,
    "status": "FAILED",
    "payment_method": "pm_1YPKc-NZPwxBYf6hnLsstaqG9JAZKxX9",
    "transaction_date": "2021-04-22T14:03:39.410000",
    "card_detail": "1234",
    "buy_order": "bo-2-609bf894",
    "child_buy_order": "cbo-2-609bf894",
    "authorization_code": "1213",
    "payment_type_code": "VN",
    "toku_response_code": "SU0000",
    "installments_number": 0,
    "mc_order_id": "1234567",
    "response_code": -4
  }
}

payment_intent.succeeded_batch

Resumen de pagos exitosos para una lista de Invoices. Se utiliza en procesos de cobro automático masivos.

{
  "id": "whe_hXPK3YBs4EUfw2KFZlB6R44MiFa07vFU",
  "event_type": "payment_intent.succeeded_batch",
  "payment_intent": {
    "payment_intents": [
      {
        "id": "pi_dsQ5-sNZPwxBYf6hnLsstaqG9JAZK432",
        "invoice": "in_1YPKc-NZPwxBYf6hnLsstaqG9JAZKxX9",
        "customer": "cus_l8ojrji3k8SC7iLbVBxxgwVeOLRRbkEc",
        "gateway": "klap_oneclick",
        "amount": 1000,
        "status": "AUTHORIZED",
        "payment_method": "pm_1YPKc-NZPwxBYf6hnLsstaqG9JAZKxX9",
        "transaction_date": "2021-04-22T14:03:39.410000",
        "toku_response_code": "SU0000"
      }
    ]
  }
}

payment_intent.payment_failed_batch

Resumen de intentos de pagos fallidos para una lista de Invoices. Se utiliza en procesos de cobro automático masivos.

{
  "id": "whe_hXPK3YBs4EUfw2KFZlB6R44MiFa07vFU",
  "event_type": "payment_intent.payment_failed_batch",
  "payment_intent": {
    "payment_intents": [
      {
        "id": "pi_dsQ5-sNZPwxBYf6hnLsstaqG9JAZK432",
        "invoice": "in_1YPKc-NZPwxBYf6hnLsstaqG9JAZKxX9",
        "customer": "cus_l8ojrji3k8SC7iLbVBxxgwVeOLRRbkEc",
        "gateway": "klap_oneclick",
        "amount": 1000,
        "status": "FAILED",
        "payment_method": "pm_1YPKc-NZPwxBYf6hnLsstaqG9JAZKxX9",
        "transaction_date": "2021-04-22T14:03:39.410000",
        "toku_response_code": "SU0000"
      }
    ]
  }
}

payment_intent.payment_pending_batch

Resumen de intentos de pagos que se encuentran pendientes para una lista de Invoices. Se utiliza en procesos de cobro automático masivos.

{
  "id": "whe_hXPK3YBs4EUfw2KFZlB6R44MiFa07vFU",
  "event_type": "payment_intent.payment_pending_batch",
  "payment_intent": {
    "payment_intents": [
      {
        "id": "pi_dsQ5-sNZPwxBYf6hnLsstaqG9JAZK432",
        "invoice": "in_1YPKc-NZPwxBYf6hnLsstaqG9JAZKxX9",
        "customer": "cus_l8ojrji3k8SC7iLbVBxxgwVeOLRRbkEc",
        "gateway": "klap_oneclick",
        "amount": 1000,
        "status": "PAC_PENDING",
        "payment_method": "pm_1YPKc-NZPwxBYf6hnLsstaqG9JAZKxX9",
        "transaction_date": "2021-04-22T14:03:39.410000",
        "toku_response_code": "SU0000"
      }
    ]
  }
}

Medios de pago

Los campos institution_name e institution_id pueden tomar los siguientes valores:

institution_nameinstitution_id
Banco BCIcl_banco_bci
Banco de Chilecl_banco_de_chile
Banco Estadocl_banco_estado
Banco Falabellacl_banco_falabella
Banco Itaúcl_banco_itau
Banco Santandercl_banco_santander
Banco Scotiabank`cl_banco_scotiabank

payment_method.attached_products

Customer ha inscrito un medio de pago en la plataforma y envía una lista de los productos asociados.

{
  "id": "whe_hXPK3YBs4EUfw2KFZlB6R44MiFa07vFU",
  "event_type": "payment_method.attached_products",
  "payment_method": {
    "id": "pm_dfs54g5sr4dv5sf",
    "customer": "cus_dfs54g5sr4dv5sf",
    "gateway": "transbank_oneclick",
    "card_type": "Visa",
    "card_number": "XXXXXXXXX1234",
    "status": "chargeable",
    "additional": {
      "holder_id": "161108284",
      "account_type": "checking_account",
      "account_number": "0087321370",
      "institution_id": "cl_banco_bci",
      "institution_name": "Banco BCI",
      "institution_country": "cl",
      "limit_uf": 10,
      "mandate_id": "19042794K",
      "voucher": "voucher",
      "voucher_url": "https://storage.googleapis.com/pac-vouchers-prod/1a8e3c6ae7d49e/dummy/pm_dummy12313.png"
    },
    "product_ids": ["product-id-1", "product-id-2"]
    }
}

Ejemplos específicos

payment_method.attached_productsTransbank

{  
  "id": "eve_NFMjlWEFasu7MTBm_bAFUz9ZmD5Cm1Pw",  
  "event_type": "payment_method.attached_products",  
  "payment_method": {  
    "id": "pm_dfs54g5sr4dv5sf",  
    "customer": "cus_dfs54g5sr4dv5sf",  
    "gateway": "transbank_oneclick",  
    "card_type": "Visa",  
    "card_number": "XXXXXXXXX1234",  
    "status": "chargeable",  
    "additional": {},  
    "product_ids": ["product-id-1"]  
  }  
}

payment_method.attached_products Cards PSP

{
		"id": "wheve_MkPZQrwEAVF0E1UdB-8IkdzRQS7IKO-W",
		"event_type": "payment_method.attached_products",
		"payment_method": {
			"id": "pm_rSXZ3Vp1urLI8Ta-_gXF0urdJlt44LK_",
			"customer": "cus_8CHZ-w3GdJ_1AtDxhMzT_MgT_cxYBwQb",
			"gateway": "internal_psp",
			"card_type": null,
			"card_number": "XXXXXXXXXXXX8477",
			"status": "chargeable",
			"additional": {
				"holder_id": null,
				"account_type": null,
				"account_number": null,
				"institution_id": null,
				"institution_name": null,
				"institution_country": null,
				"limit_uf": null,
				"mandate_id": null,
				"voucher_url": null,
				"voucher": null
			},
			"product_ids": [
				"123"
			],
			"id_account": "acc_5pe6OvW_pWp8qEB16cMs96J-lS95E1sC"
		}
}

payment_method.attached_productsPAC

{
  "id": "wheve_BIo3CxB5mtKuTpx-pG0EJprjQYYjUjFm",
  "event_type": "payment_method.attached_products",
  "payment_method": {
  	"id": "pm_OZJz903dBIZOvCa7Mt7pnNAVyBUEQPwY",
    "customer": "cus_aEB980lWMwLSq4Sevbx19A4TWWPM5SMX",
    "gateway": "toku_pac",
    "card_type": null,
    "card_number": null,
    "status": "chargeable",
    "additional": {
    	"holder_id": "136026933",
      "account_type": "checking_account",
      "account_number": "000064657380",
      "institution_id": "cl_banco_santander",
      "institution_name": "Banco Santander",
      "institution_country": "cl",
      "limit_uf": 1000,
      "mandate_id": "2480269",
      "voucher_url": "https://storage.googleapis.com/pac-vouchers-prod/ce19b959b238/c0713e7b987b6/1682708492124_2480269.pdf?X-Goog-Algorithm=GOOG4-RSA-SHA256&X-Goog-Credential=350256473195-compute%40developer.gserviceaccount.com%2F20230428%2Fauto%2Fstorage%2Fgoog4_request&X-Goog-Date=20230428T190133Z&X-Goog-Expires=604800&X-Goog-SignedHeaders=host&X-Goog-Signature=942a15f8206af470c01027c93d3c066e47853169933ef6fa0a0bd9c4ed6b506cacda5fbfc7e4852834ef3343ad97ed4fe20fe7ac4e0310f03cd01985320fc74c2950f3ea57ee6139a98662651c27960c81aa1b8fcc2f96b4a5c6d4fd4c7d467feb86b45a5505197b9f8b96b8f16ed0150ecfeb5922f798a9b8ead54e5af0c1e25f55a11f3ac0e9411471eff213a9dd9315616275d846ab311416f624dc176d4f56cc87b374f853e80cbcc9fcbecc7a1924f0163c67f290413cf4f45a401f39eb8c7c561f076107f73c4b8d4eae70bdee3a7e40a8f0f6b596c1782d63b4a31454af9d1536b0732c8a8a20802f988f3ebbc67497ed6feea404f1663aad4e4da58d"
    	},
      "product_ids": [
            "2480269"
        ],
      "id_account": "acc_t7s74wKbR59koKc7J5mapDvcuPISgZJc"
		}
},

payment_method_inscription_intent.failed

Intento de inscripción de un medio de pago fallido.

{
  "id": "whe_hXPK3YBs4EUfw2KFZlB6R44MiFa07vFU",
  "event_type": "payment_method_inscription_intent.failed",
  "payment_method_inscription_intent": {
    "id_payment_method_inscription_intent": "pmii_dfs54g5sr4dv5sf",
    "id_payment_method": "pm_dfs54g5sr4dv5sf",
    "external_id": "pm_dfs54g5sr4dv5sf",
    "customer": "cus_dfs54g5sr4dv5sf",
    "gateway": "dummy_gateway",
    "status": "failed",
    "toku_response_code": "123",
    "additional": {
      "holder_id": "161108284",
      "account_type": "checking_account",
      "account_number": "0087321370",
      "institution_id": "cl_banco_bci",
      "institution_name": "Banco BCI",
      "institution_country": "cl",
      "limit_uf": 10,
      "mandate_id": "19042794K",
      "voucher_url": "https://storage.googleapis.com/pac-vouchers-prod/1a8e3c6ae7d49e/dummy/pm_dummy12313.png"
    }
  }
}

Ejemplos específicos

payment_method_inscription_intent.failed Cards PSP, Transbank, Payment Orchestration

{
  "id": "wheve_cPl1OgwiqhA6oKMPMhnSHAWzGPuiJ7LA",
  "event_type": "payment_method_inscription_intent.failed",
  "payment_method_inscription_intent": {
    "id_payment_method_inscription_intent":"pmii_AM4LvUGcqfxzgiUgxMocVuR-MD3xjb4N",
    "id_payment_method":"pm_AM4LvUGcqfxzgiUgxMocVuR-MD3xjb4N",
    "external_id": null,
    "customer": "cus_KrXCkhN-hLWLrpljz_9uieZYnN_uS3iG",
    "gateway": "internal_psp",
    "status": "inscription_failed",
    "toku_response_code": "PEPSP2106",
    "additional": {},
    "id_account": "acc_bMMbOmVpAlsgRxl5H461TtHv929Xn2_T"
  }
}

Liquidaciones

payout.done

📘

Este webhook aplica solo para organizaciones en Chile

Actualización de las liquidaciones efectuadas por parte de Toku hacia la organización. Entrega información sobre los pagos, la conciliación de estos y sus Invoices.

{
  "id": "whe_hXPK3YBs4EUfw2KFZlB6R44MiFa07vFU",
  "event_type": "payout_mx.done",
  "payout": {
    "id": "pyt_dsQ5-sNZPwxBYf6hnLsstaqG9JAZK432",
    "event_type": "payout.done",
    "account": "acc_1YPKc-NZPwxBYf6hnLsstaqG9JAZKxX9",
    "payout_amount": 990.0,
    "transaction_amount": 1000.0,
    "fee": 10.0,
    "paid_invoices": ["in_1YPKc-NZPwxBYf6hnLsstaqG9JAZKxX9", "in_1YPKc-NZPwxBYf6hnLsstaqG9JAZKxX9"],
    "refunded_invoices": ["in_8MAPE-SSrWaLap9kkLlatwqq9JAZKx11"]
  }
}

payout_mx.success

📘

Este webhook aplica solo para organizaciones en México

Actualización de las liquidaciones de México efectuadas por parte de Toku hacia la organización. Entrega información sobre la cuenta, la liquidación y las Transactions involucradas.

{
    "id": "pyt_ZY3MEoRd4Q4KIDqoYnW981YKTBOPO0fm",
    "id_account": "acc_LO53Ak2oa4qNTGrfv0vqJYbMzSVjdsEd",
    "account_number": "638180010185142505",
    "deposit_date": "2024-04-22T14:03:39.410000",
    "status": "success",
    "payout_amount": "1950.0000",
    "transactions_amount": "2000.0000",
    "fees_amount": "50.0000",
    "transactions": {
        "PAYMENT": [
            {
                "id": "trs_GcpTamnd7FBmnQ62u_tG8PJ08fasOeyI",
                "transaction_amount": "5000.0000",
                "transaction_amount_in_payout": "3000.0000",
                "transaction_fee_in_payout": "75.0000",
            },
            {
                "id": "trs_DVI9F0_PdANT0baaxOykTlxb9dwCwsJl",
                "transaction_amount": "2000.0000",
                "transaction_amount_in_payout": "2000.0000",
                "transaction_fee_in_payout": "50.0000",
            },
        ],
        "REVERSED": [
            {
                "id": "trs_oppTamnd7FBmnQ62u_tG8PJ08fasOeyI",
                "transaction_amount": "2000.0000",
                "transaction_amount_in_payout": "2000.0000",
                "transaction_fee_in_payout": "50.0000",
            },
            {
                "id": "trs_dfs9F0_PdANT0baaxOykTlxb9dwCwsJl",
                "transaction_amount": "2000.0000",
                "transaction_amount_in_payout": "1000.0000",
                "transaction_fee_in_payout": "25.0000",
            },
        ],
        "VOID": [],
        "CHARGEBACK": [],
    },
}

Descripción de los campos enviados:

CampoDescripción
idID interno del objeto Payout
id_accountID interno del objeto Account
account_numberClabe a la que se deposita la liquidación.
deposit_dateFecha en que se depositó la liquidación.
statusEstado de la liquidación.
payout_amountMonto de la liquidación. Es el monto de las Transactions menos la comisión descontada, es decir, transactions_amount - fees_amount.
transactions_amountMonto de las Transactions involucradas en la liquidación.
fees_amountMonto de las comisiones descontadas en la liquidación.
transactionsListado de las Transactions involucradas en la liquidación, desagregadas según tipo. Pueden ser del tipo PAYMENT, REVERSED, VOID o CHARGEBACK.
transaction_amountMonto total de una Transaction en particular.
transaction_amount_in_payoutMonto de una Transaction en particular que fue considerado en el monto de la liquidación. Puede ser distinto al monto total transaction_amount en caso de que la Transaction contenga dinero de distintas cuentas.
transaction_fee_in_payoutMonto de la comisión descontada de una Transaction en particular. Se calcula sobre el monto que aparece en el campo transaction_amount_in_payout.

Activaciones

activation.created

Creación y actualización de una activación de transferencia. Esto se realiza mediante el proceso de la transferencia de $1.000 CLP por parte de un customer y el webhook se gatilla tanto en el minuto que se realiza la transferencia, como también cuando el customer queda activo.

{
  "id": "whe_hXPK3YBs4EUfw2KFZlB6R44MiFa07vFU",
  "event_type": "activation.created",
  "activation": {
    "id_account": "acc_1YPKc-NZPwxBYf6hnLsstaqG9JAZKxX9",
    "id_customer": "cus_l8ojrji3k8SC7iLbVBxxgwVeOLRRbkEc",
    "government_id": "1-9",
    "payer_name": "John Payer",
    "payer_email": "[email protected]",
    "institution": "institution",
    "bank_account_number": "111111111",
    "status": "activated"
  }
}

Cuenta bancaria

bank_account_verification.result

Respuesta de la validación de una cuenta CLABE. Notifica la información que se obtuvo producto de una validación. Se puede utilizar un endpoint de prueba para simular una respuesta, la documentación se encuentra en este link.

{
  "id": "whe_hXPK3YBs4EUfw2KFZlB6R44MiFa07vFU",
  "event_type": "bank_account_verification.result",
  "bank_account_verification": {
    "status": "DONE",
    "validation": "failed",
    "reason": null,
    "voucher_url": {
      "pdf": "https://storage.googleapis.com/domiciliation-validation/bav_rNaGT3DOzVYgfU9TpFLZ9CNjEx9Jtest.B.pdf",
      "xml": "https://storage.googleapis.com/domiciliation-validation/bav_rNaGT3DOzVYgfU9TpFLZ9CNjEx9Jtest.B.xml"
    },
    "account_number": "111111111111111111",
    "customer_identifier": "111111111111",
    "voucher_information": {
      "account_number": "111111111111111111",
      "customer_identifier": "1111111111111",
      "receiver_institution": "BANORTE",
      "receiver_name": "TEST TEST",
      "receiver_account_type": "40",
      "operation_date": "2022-10-14",
      "operation_time": "14:41:31",
      "spei_id": "11111",
      "signature": "mYfEz2/nPaTmKjG1LsVcXsFg/QoDpWYb0qoB4dULelSYCfNzI8iU6RkH7JhATvx9+3aP5tKjG1LsVcXsFg/QoDpWYb0qoB4dULel\n    SYCfNzI8iU6RkH7JhATvx9+3aP5tFzLb9/eDUGhQorY6nTEbxyZwca8sGVKQ2aLqpEuRSsLsVcXsFg/QoDpWYb0qoB4dULelSYCfNzI8iU6RkH7JhATv\n    x9+3aP5tKjG1LsVcXsFg/QoDpWYb0qoB4dULelSYCfNzI8iU6RkH7JhATvx9+3aP5tFzLb9/eDUGhQorY6nTEbxyZvhitQ==",
      "certificate_number": "00001000000501111111",
      "cda_chain": "||1|14102022|14102022|144131|11111|STP|TESTING S DE RL DE CV|40|111111111111111111|TEST220304U60\n    |BANORTE|TEST TEST|40|111111111111111111|1111111111111|Validation transfer|0.00|0.01|NA|NA|0|0|NA|0\n    |0.00|00001000000501732145||mYfEz2/nPaTmKjG1LsVcXsFg/QoDpWYb0qoB4dULelSYCfNzI8iU6RkH7JhATvx9+3aP5tKjG1LsVcXsFg/QoDpWYb0qoB4dULel\n    SYCfNzI8iU6RkH7JhATvx9+3aP5tFzLb9/eDUGhQorY6nTEbxyZwca8sGVKQ2aLqpEuRSsLsVcXsFg/QoDpWYb0qoB4dULelSYCfNzI8iU6RkH7JhATv\n    x9+3aP5tKjG1LsVcXsFg/QoDpWYb0qoB4dULelSYCfNzI8iU6RkH7JhATvx9+3aP5tFzLb9/eDUGhQorY6nTEbxyZvhitQ==",
      "tracking_id": "2022101411111BNRT1939536CAMTT"
    }
  }
}

Invoices

invoice.created

Invoice creada en Toku.

{
  "id": "whe_hXPK3YBs4EUfw2KFZlB6R44MiFa07vFU",
  "event_type": "invoice.created",
  "invoice": {
    "id": "in_1YPKc-NZPwxBYf6hnLsstaqG9JAZKxX9",
    "customer": "cus_M2aYvh3QOfVylcre5gIMyIhYPrHBKfw2",
    "product_id": "92792",
    "subscription": "sub_AmT67cjfrpaNXOmhXGvdJiqHuYmM-kgE",
    "is_paid": false,
    "due_date": "2023-03-02",
    "is_void": false,
    "amount": 1000.0,
    "link_payment": "https://portal.pagos.com/tu-empresa",
    "metadata": {
      "car_brand": "Toyota",
      "car_model": "Yaris"
    },
    "receipt_type": null,
    "id_receipt": null,
    "source": null,
    "disable_automatic_payment": false,
    "currency_code": "CLP",
    "invoice_external_id": "92792-2023-03-02"
  }
}

invoice.updated

Invoice editada en Toku.

{
  "id": "whe_hXPK3YBs4EUfw2KFZlB6R44MiFa07vFU",
  "event_type": "invoice.updated",
  "invoice": {
    "id": "in_1YPKc-NZPwxBYf6hnLsstaqG9JAZKxX9",
    "customer": "cus_M2aYvh3QOfVylcre5gIMyIhYPrHBKfw2",
    "product_id": "92792",
    "subscription": "sub_AmT67cjfrpaNXOmhXGvdJiqHuYmM-kgE",
    "is_paid": false,
    "due_date": "2023-03-02",
    "is_void": false,
    "amount": 1000.0,
    "link_payment": "https://portal.pagos.com/tu-empresa",
    "metadata": {
      "car_brand": "Toyota",
      "car_model": "Yaris"
    },
    "receipt_type": null,
    "id_receipt": null,
    "source": null,
    "disable_automatic_payment": false,
    "currency_code": "CLP",
    "invoice_external_id": "92792-2023-03-02"
  }
}

invoice.voided

Invoice voideada en Toku.

{
  "id": "whe_hXPK3YBs4EUfw2KFZlB6R44MiFa07vFU",
  "event_type": "invoice.voided",
  "invoice": {
    "id": "in_1YPKc-NZPwxBYf6hnLsstaqG9JAZKxX9",
    "customer": "cus_M2aYvh3QOfVylcre5gIMyIhYPrHBKfw2",
    "product_id": "92792",
    "subscription": "sub_AmT67cjfrpaNXOmhXGvdJiqHuYmM-kgE",
    "is_paid": false,
    "due_date": "2023-03-02",
    "is_void": false,
    "amount": 1000.0,
    "link_payment": "https://portal.pagos.com/tu-empresa",
    "metadata": {
      "car_brand": "Toyota",
      "car_model": "Yaris"
    },
    "receipt_type": null,
    "id_receipt": null,
    "source": null,
    "disable_automatic_payment": false,
    "currency_code": "CLP",
    "invoice_external_id": "92792-2023-03-02"
  } 
}

Subscriptions

subscription.created

Subscription creada en Toku.

{
  "id": "whe_hXPK3YBs4EUfw2KFZlB6R44MiFa07vFU",
  "event_type": "subscription.created",
  "subscription": {
    "id": "sub_K3a1P1_p_t5UHJHJXmpkQYmqXCHvXrNi",
    "customer": "cus_M2aYvh3QOfVylcre5gIMyIhYPrHBKfw2",
    "product_id": "92792",
    "pac_mandate_id": "500196",
    "is_recurring": false,
    "amount": null,
    "due_day": null,
    "receipt_product_code": null,
    "metadata": {
      "color": "red",
      "shape": "square"
    }
  }
}

subscription.updated

Subscription editada en Toku.

{
  "id": "whe_hXPK3YBs4EUfw2KFZlB6R44MiFa07vFU",
  "event_type": "subscription.updated",
  "subscription": {
    "id": "sub_K3a1P1_p_t5UHJHJXmpkQYmqXCHvXrNi",
    "customer": "cus_M2aYvh3QOfVylcre5gIMyIhYPrHBKfw2",
    "product_id": "92792",
    "pac_mandate_id": "500196",
    "is_recurring": false,
    "amount": null,
    "due_day": null,
    "receipt_product_code": null,
    "metadata": {
      "color": "red",
      "shape": "square"
    }
  }
}

subscription.deleted

Subscription eliminada de Toku.

{  
  "id": "whe_hXPK3YBs4EUfw2KFZlB6R44MiFa07vFU",
  "event_type": "subscription.deleted",
  "subscription": {
    "id": "sub_K3a1P1_p_t5UHJHJXmpkQYmqXCHvXrNi",
  }
}

Customers

customer.created

Customer creado en Toku.

{
  "id": "whe_hXPK3YBs4EUfw2KFZlB6R44MiFa07vFU",
  "event_type": "customer.created",
  "customer": {
    "id": "cus_l8ojrji3k8SC7iLbVBxxgwVeOLRRbkEc",
    "external_id": "18579878K",
    "government_id": "18579878K",
    "name": "Jon Snow",
    "mail": "[email protected]",
    "phone_number": "+56987654321",
    "silenced_until": null,
    "default_agent": null,
    "agent_phone_number": null,
    "pac_mandate_id": null,
    "send_mail": false,
    "default_receipt_type": "bill",
    "rfc": null,
    "tax_zip_code": null,
    "fiscal_regime": null,
    "secondary_emails": [],
    "metadata": {}
  }

}

customer.updated

Customer editado en Toku.

{
  "id": "whe_hXPK3YBs4EUfw2KFZlB6R44MiFa07vFU",
  "event_type": "customer.updated",
  "customer": {
    "id": "cus_l8ojrji3k8SC7iLbVBxxgwVeOLRRbkEc",
    "external_id": "18579878K",
    "government_id": "18579878K",
    "name": "Jon Snow",
    "mail": "[email protected]",
    "phone_number": "+56987654321",
    "silenced_until": null,
    "default_agent": null,
    "agent_phone_number": null,
    "pac_mandate_id": null,
    "send_mail": false,
    "default_receipt_type": "bill",
    "rfc": null,
    "tax_zip_code": null,
    "fiscal_regime": null,
    "secondary_emails": [],
    "metadata": {}
  }

}

customer.deleted

Customer eliminado de Toku.

{
  "id": "whe_hXPK3YBs4EUfw2KFZlB6R44MiFa07vFU",
  "event_type": "customer.deleted",
  "customer": {
    "id": "cus_l8ojrji3k8SC7iLbVBxxgwVeOLRRbkEc",
  }
}