Gracias a nuestro webhook podras recibir en tu sistema el status de una transacción realizada desde un formulario de cobra plus y recibir la información asi como el estado aprobado, rechazado...
Este webhook se envia al endpoint colocado en las opciones avanzadas en los urls de resultados.
{info} Recuerda que esta ruta debe ser de tipo post.
Ademas te enviaremos un header Signature que contendrá una firma que podras usar para verificar que la carga útil no haya sido manipulada. Para realizar la firma usamos el token como secreto para el webhook que generamos en tu comercio, lo puedes encontrar aquí, adicional generamos el hash "HMAC" con el algoritmo sha256
La data enviada sera enviada en formato JSON.
Si la aplicacion no responde con un estado 2xx se reintentara el llamado 10s despues, si tambien falla se reitentara despues de 100s, despues de este ultimo no habran mas intentos.
El objeto retornado de webhook transacción esta compuesto por dos partes:
"transaction": {
"transaction_id": 143,
"amount": 100000,
"currency_type": "COP",
"value_cop": 100000,
"payment_method": "credit",
"payment_method_source": "Mastercard",
"trazability_id": 143,
"transaction_details": {
"name": "PRUEBA TARJETA",
"identification_type": "CC",
"identification_number": "100646164564",
"email": "email@gmail.com",
"country": "+57",
"phone": "3007691450",
"number_card": "524931******0339",
"installments": 1,
"franchise": "Mastercard",
"status_message": "Runing Mock"
},
"status": "Aprobada",
"url_response": "https://sag.efipay.co/Checkout/Transaction/9b902174-7189-4f5a-a035-6b68f97b695a/Response",
"approved_at": "2024-03-14T16:23:08.790973Z",
"production": true,
"created_at": "2024-03-14 11:23:08",
"customer_payer": {
"id": "9b8fd2c5-b813-4fdd-8881-a4d0c5db3e89",
"name": "Nombre Apellido",
"email": "email@gmail.com",
"created_at": "2024-03-14 07:43:08",
"updated_at": "2024-03-14 07:43:08"
},
"currency_rate_conversion": {
"id": 1,
"usd_to_cop": 0.000256,
"eur_to_cop": 0.000233,
"active": 1,
"created_at": "2023-12-22T21:10:45.000000Z",
"updated_at": "2023-12-22T21:10:45.000000Z",
"deleted_at": null
},
"description": "Runing Mock"
},
"checkout": {
"id": "9b902174-5ce8-4ad9-aba4-66776ec37f87",
"payment_referenceable_type": "App\Models\CollectionTools\CobraPlus\CobraPlusPaymentReference",
"payment_referenceable_id": "6",
"payment_gateway_id": "9b57ffaf-5524-4184-ac61-3b04087a39cf",
"delivery_address_id": null,
"commerce_id": 1,
"office_id": 1,
"comments": null,
"total_advance": 100000,
"paid_at": "2024-03-14 11:23:08",
"ongoing_transaction": 0,
"customer_payer_id": "9b8fd2c5-b813-4fdd-8881-a4d0c5db3e89",
"created_at": "2024-03-14 11:23:08",
"updated_at": "2024-03-14 11:23:08",
"total_pending": 0,
"payment_gateway": {
"id": "9b57ffaf-5524-4184-ac61-3b04087a39cf",
"gatewayable_type": "App\Models\CollectionTools\CobraPlus\CobraPlus",
"gatewayable_id": "9b57ffaf-126c-42d7-b99a-5436c6c7a469",
"advanced_option_id": null,
"created_user_id": 11,
"updated_user_id": 11,
"office_id": 1,
"commerce_id": 1,
"massive_upload_id": null,
"url": "https://sag.efipay.co/Checkout/PaymentGateway/9b57ffaf-5524-4184-ac61-3b04087a39cf?signature=36e7f02f58c57167fec158375a866e99e0216f253e494d37cb7947c738369fb8",
"full_payment_at": null,
"active": 1,
"production": 1,
"created_at": "2024-02-15 13:42:21",
"updated_at": "2024-02-15 14:58:04",
"deleted_at": null,
"sub_total": null,
"amount_without_tax": null,
"tax_amount": null,
"total": null,
"total_cop": null,
"tool_name": "CobraPlus",
"gatewayable": {
"id": "9b57ffaf-126c-42d7-b99a-5436c6c7a469",
"description": "Prueba Multipago",
"charge_type": "Multipago",
"amount": null,
"tax": null,
"currency_type": null,
"payments_maked": 6,
"created_at": "2024-02-15 13:42:21",
"updated_at": "2024-03-14 11:23:08",
"deleted_at": null,
"total": null,
"include_tax": false,
"tax_amount": 0
},
"advanced_option": null
},
"payment_referenceable": {
"id": 6,
"cobra_plus_id": "9b57ffaf-126c-42d7-b99a-5436c6c7a469",
"description": "Hola",
"amount": 100000,
"tax": 0,
"currency_type": {
"name": "Peso Colombiano",
"symbol": "$",
"abbreviation": "COP"
},
"advanced_option_id": "9b9013af-c101-4b61-bb20-5151d14e3e30",
"created_at": "2024-02-15 13:42:21",
"updated_at": "2024-03-14 10:44:38",
"deleted_at": null,
"sub_total": 100000,
"amount_without_tax": 100000,
"tax_amount": null,
"total": 100000,
"total_cop": 100000,
"include_tax": false,
"purchase_detail": {
"amount": 100000,
"discount": null,
"tax": null,
"sub_total": 100000,
"delivery": null,
"total": 100000
},
"advanced_option": {
"id": "9b9013af-c101-4b61-bb20-5151d14e3e30",
"limit_date": null,
"references": [],
"result_urls": {
"webhook": "http://yourdoamin.com/api/webhook"
},
"delivery_service_type": null,
"delivery_service_value": null,
"request_address_delivery": false,
"payment_methods": [],
"discount_before_on": null,
"discount_type": null,
"discount_value": null,
"has_comments": false,
"comments_label": null,
"limit_payments": null,
"created_at": "2024-03-14 10:44:38",
"updated_at": "2024-03-14 10:44:38",
"deleted_at": null,
"url_picture": null,
"has_delivery_service": false,
"has_all_payment_methods": true,
"has_discount_early_payment": false,
"has_limit_payments": false,
}
},
"paid_advance": {
"id": "9b902174-77e4-4887-bba9-82a546e45d86",
"description": "Prueba Multipago",
"amount_paid": 100000,
"amount_currency": {
"name": "Peso Colombiano",
"symbol": "$",
"abbreviation": "COP"
},
"exchange_paid": 100000,
"exchange_currency": "COP",
"tool_paid": true,
"checkout_gateway_id": "9b902174-5ce8-4ad9-aba4-66776ec37f87",
"transaction_id": "9b902174-7189-4f5a-a035-6b68f97b695a",
"created_at": "2024-03-14T16:23:08.000000Z",
"updated_at": "2024-03-14T16:23:08.000000Z",
"deleted_at": null
},
"answer_form": {
"id": 24,
"form_maker_id": 6,
"checkout_gateway_id": "9b902174-5ce8-4ad9-aba4-66776ec37f87",
"created_at": "2024-03-14T16:23:08.000000Z",
"updated_at": "2024-03-14T16:23:08.000000Z",
"deleted_at": null,
"answer_fields": [
{
"id": 33,
"answer_form_id": 24,
"form_field_id": 6,
"answer": "La Respuesta",
"created_at": "2024-03-14T16:23:08.000000Z",
"updated_at": "2024-03-14T16:23:08.000000Z",
"deleted_at": null,
"form_field": {
"id": 6,
"form_maker_id": 6,
"label": "Pregunta",
"type": "text",
"additional_configuration": [],
"required": 0,
"reference": null,
"order": 1,
"created_at": "2024-02-16 19:42:21",
"updated_at": "2024-02-16 19:42:21",
"deleted_at": null
}
}
]
}
}