Genome Documentation
Webhooks
Webhooks
Setting up incoming payment notification service via Webhooks
- Opening business account with Genome
- Contacting accounts@genome.eu with the request and provide us with the following information:
| Item | Format | Description |
|---|---|---|
| url | varchar | URL to receive data |
| attemptMax | uint16 | Number of retries to deliver data |
| direction | enum(incoming_only) | Incoming_only - transactions that increase balance, credit transactions |
| outcome | enum(success_only) | Success_only - information about the successful transactions |
1. Create payload
Callback content consists of the following parts:
- Headers
- Callback data
Callback headers
There are four mandatory headers sent by Genome in every callback:
| Header | Description |
|---|---|
| User-Agent | Custom user agent data |
| Content-Type | application/json |
| X-Version | Callback version. Current value is 1. |
| X-Signature | HMAC signature for callback. Hexadecimal digit |
Example
Headers:USER-AGENT: Genome Callback SystemX-SIGNATURE: b8576caa04cc74984fe1ef69aa4cf086b26a69300ddf5285347623f9d10d3442X-VERSION: 1Callback signature sent in header is produced by HmacSHA256 algorithm using configured (for customer) secret and full callback HTTP request body.
Callback shared data Shared data is ax chunk of the callback body that contains transactional information all transactions possess.
| Body (JSON array) | Required | Format and rules | DESCRIPTION |
|---|---|---|---|
| reference | no | *transaction (if transaction data being sent in callback references another transaction, all the data about that transaction is placed into callback) | |
| bulk_id | no | *uint64 | Bulk ID in Genome system, if transaction is included to the mass transfer batch |
| payment_id | no | *uint64 | Payment ID in Genome system, if transaction is included to the mass transfer batch or created on my.Genome application. |
| transaction_id | yes | *uint64 | Transaction ID in Genome system |
| transaction_type | yes | enum (direct/sepa_incoming/sepa_instant_incoming, etc) | sepa_incoming/sepa_instant_incoming/swift_incoming, etc) |
| transaction_status | yes | enum (processing/success/error/decline, etc) | success |
| created_at | yes | string RFC3339 | Timestamp of transaction creation in Genome system |
| booked_at | no | string RFC3339 | Timestamp of transaction related fees or CEX rates booking in Genome system |
| processed_at | no | string RFC3339 | Timestamp of transaction finalization in Genome system |
| amount | no | object:
| May be absent in case of error, decline, etc. |
| description | no | string | Description of transaction |
| error | no | object:
| May be absent in case incoming_only/success_only settings |
| sender | no | participant:
| May be absent in case of error, decline, etc. and for some transaction types |
| receiver | no | participant:
| May be absent in case of error, decline, etc. and for some transaction types |
Example
Body:{ "transaction_id": 12214, "transaction_type": "SEPA_INSTANT_INCOMING", "transaction_status": "SUCCESS", "created_at": "2024-11-07T11:47:31Z", "booked_at": "2024-11-07T11:47:31Z", "processed_at": "2024-11-07T11:47:33Z", "amount": { "currency": "EUR", "amount": 1.0 }, "description": "Some description 1234567890", "sender": { "iban": "LT583003000000012345", "bic": "RECEIVERXXX", "name": "Sender Name 1" }, "receiver": { "wallet_id": 1050000000029590, "account_id": 1051097800000021139, "iban": "LT411010058291544307", "bic": "RECEIVER002", "name": "Receiver Name 1" }}2. Retry strategy
In cases where notifications cannot be successfully delivered to the customer, we will retry delivery with an exponential backoff with every failed delivery. A number of attempts are provided as attemptMax value.
Your endpoint must respond with 200 status code to indicate successful receipt of the notification. After the last unsuccessful retry, we will stop sending notifications.
| Retry | Time after last retry |
|---|---|
| 1st retry | 00:00:01 |
| 2nd retry | 00:00:03 |
| 3rd retry | 00:00:09 |
| 4th retry | 00:00:27 |
| 5th retry | 00:01:21 |
| 6th retry | 00:04:03 |
| 7th retry | 00:12:09 |
| 8th retry | 00:36:27 |
| 9th retry | 01:49:21 |
| 10th retry | 05:28:03 |
| 11th retry | 16:24:09 |
| 12th retry | 49:12:27 |
We guarantee the delivery of every webhook configured under the client's settings. However, there can be potential delays due to 3rd party network providers that are used in the process by the sender or recipient. In such cases, we reserve the right to resend the same event. The receiving party should be aware that for a single transaction, the same event can be resent multiple times.