webhooks documentation
Collection link payment events
When a person initiates a payment using a collection link, a webhook request is generated based on the state of the payment intent. This documentation outlines the event types related to payment intents for collection links.
Event types
-
collection_intent_credited
: This event is triggered when an intent of payment has been successfully credited to the recipient's bank account. It signifies a successful transaction where the funds have been successfully transferred. -
collection_intent_failed
: This event is triggered when an intent of payment could not be processed by the payment provider and, as a result, the payment was declined.
An example of how the webhook event payload will be structured:
{
"event": {
"data": {
"account_id": "acc_223RxfTSugBz8KfLSWoEnT",
"amount": {
"amount": 10000000,
"currency": "COP"
},
"collection_link_id": "clink_3QVH4A9L4QQzAajaK4VMrB",
"external_id": "b3852866-33b2-452c-b269-33591a38c4d0",
"id": "cint_5dHsMj4uwhhujcVUTuw1OP",
"inserted_at": "2023-01-04T17:16:32.812292Z",
"note": "a Note",
"payer": {
"document_number": "1033711400",
"document_type": "CC",
"name": "peter rosas"
},
"payment": {
"provider": "pse",
"transaction_id": "3052043"
},
"reference": "REF #132ABC",
"state": "account_credited",
"updated_at": "2023-01-04T17:16:58.071790Z"
},
"type": "collection_intent_credited"
},
"timestamp": "2023-01-04T17:17:01.101130Z"
}
Note that the external_id
field can be useful to associate with some identifier in your system. For more information about this, see create collection links.