customer

Eventos relacionados con clientes.

EventoDescripción
customer.createdOcurre cada vez que se crea un nuevo cliente
customer.updatedOcurre cada vez que cambia cualquier propiedad de un cliente
customer.deletedOcurre cada vez que se elimina un cliente
customer.payment_source.card.blockedOcurre cada vez que una tarjeta de pago del cliente es bloqueada

Cliente Creado - customer.created

{
	"data": {
	"object": {
		"livemode": true,
		"name": "Fulano Perez",
		"email": "[email protected]",
		"phone": "55-5555-5555",
		"id": "cus_2s8K1B3PBKDontpi8",
		"object": "customer",
		"created_at": 1657412019,
		"corporate": false,
		"custom_reference": "",
		"default_payment_source_id": "src_2s8K1B3PBKDontpi9",
		"payment_sources": {
			"object": "list",
			"has_more": false,
			"total": 1,
			"data": [
				{
					"id": "src_2s8K1B3PBKDontpi9",
					"object": "payment_source",
					"type": "card",
					"created_at": 1657412019,
					"last4": "6410",
					"bin": "40276657",
					"card_type": "debit",
					"exp_month": "10",
					"exp_year": "25",
					"brand": "visa",
					"name": "Fulano Perez",
					"parent_id": "cus_2s8K1B3PBKDontpi8",
					"default": true,
					"visible_on_checkout": false
				}
			]
		}
	},
	"previous_attributes": {
	}
},
	"livemode": true,
	"webhook_status": "successful",
	"webhook_logs": [
		{
			"id": "webhl_2sr6P2oyFqNTSLghJ",
			"url": "http://requestb.in/1467d141",
			"failed_attempts": 12,
			"last_http_response_status": 200,
			"response_data": {},
			"object": "webhook_log",
			"last_attempted_at": 1668480248
		}
	],
	"id": "6372983ddfd6a70001e5eca4",
	"object": "event",
	"type": "customer.created",
	"created_at": 1668454461
}

Cliente Creado - customer.updated

{
	"data": {
	"object": {
		"livemode": true,
		"name": "Fulano Perez",
		"email": "[email protected]",
		"phone": "55-5555-5555",
		"id": "cus_2rpsUKqn8hUndxinN",
		"object": "customer",
		"created_at": 1652802838,
		"corporate": false,
		"custom_reference": "33-1664-oxxo_recurrent",
		"payment_sources": {
			"object": "list",
			"has_more": false,
			"total": 1,
			"data": [
				{
					"id": "off_ref_2rpsUKqn8hUndxinP",
					"object": "payment_source",
					"provider": "Oxxo",
					"type": "oxxo_recurrent",
					"reference": "93002699981704",
					"barcode": "93002699981704",
					"barcode_url": "https://s3.amazonaws.com/cash_payment_barcodes/93002699981704.png",
					"expires_at": 0,
					"created_at": 1652802838,
					"parent_id": "cus_2rpsUKqn8hUndxinN"
				}
			]
		}
	},
	"previous_attributes": {
	}
},
	"livemode": true,
	"webhook_status": "successful",
	"webhook_logs": [
		{
			"id": "webhl_2sr6P2oyFqNTSLghJ",
			"url": "http://requestb.in/1467d141",
			"failed_attempts": 12,
			"last_http_response_status": 200,
			"response_data": {},
			"object": "webhook_log",
			"last_attempted_at": 1668480248
		}
	],
	"id": "6372983ddfd6a70001e5eca4",
	"object": "event",
	"type": "customer.updated",
	"created_at": 1668454461
}

Cliente Eliminado - customer.deleted

{
	"data": {
	"object": {
		"livemode": true,
		"name": "Fulano Perez",
		"email": "[email protected]",
		"phone": "55-5555-5555",
		"id": "cus_2qwdFvPQVQRfBKSbw",
		"object": "customer",
		"created_at": 1639259546,
		"corporate": false,
		"custom_reference": "40471",
		"payment_sources": {
			"object": "list",
			"has_more": false,
			"total": 1,
			"data": [
				{
					"id": "off_ref_2qwdFvPQVQRfBKSbx",
					"object": "payment_source",
					"provider": "Cash",
					"type": "cash_recurrent",
					"reference": "93002178634691",
					"barcode": "93002178634691",
					"barcode_url": "https://s3.amazonaws.com/cash_payment_barcodes/93002178634691.png",
					"expires_at": 0,
					"created_at": 1639259546,
					"parent_id": "cus_2qwdFvPQVQRfBKSbw"
				}
			]
		}
	},
	"previous_attributes": {
	}
},
	"livemode": true,
	"webhook_status": "successful",
	"webhook_logs": [
		{
			"id": "webhl_2sr6P2oyFqNTSLghJ",
			"url": "http://requestb.in/1467d141",
			"failed_attempts": 12,
			"last_http_response_status": 200,
			"response_data": {},
			"object": "webhook_log",
			"last_attempted_at": 1668480248
		}
	],
	"id": "6372983ddfd6a70001e5eca4",
	"object": "event",
	"type": "customer.deleted",
	"created_at": 1668454461
}

Tarjeta cliente bloqueada - customer.payment_source.card.blocked

{
	"data": {
	"object": {
		"id": "src_2poAHTCUDoQnW6f3V",
		"object": "payment_source",
		"type": "card",
		"created_at": 1621693840,
		"last4": "9475",
		"bin": "402766",
		"card_type": "debit",
		"exp_month": "11",
		"exp_year": "23",
		"brand": "visa",
		"name": "Fulano Perez",
		"parent_id": "cus_2poAHTCUDoQnW6f3U",
		"default": true,
		"payment_source_status": "blocked",
		"visible_on_checkout": false
	},
	"previous_attributes": {
	}
},
	"livemode": true,
	"webhook_status": "successful",
	"webhook_logs": [
		{
			"id": "webhl_2sr6P2oyFqNTSLghJ",
			"url": "http://requestb.in/1467d141",
			"failed_attempts": 12,
			"last_http_response_status": 200,
			"response_data": {},
			"object": "webhook_log",
			"last_attempted_at": 1668480248
		}
	],
	"id": "6372983ddfd6a70001e5eca4",
	"object": "event",
	"type": "customer.payment_source.card.blocked",
	"created_at": 1668454461
}