Use our webhooks
Webhooks notify you in real-time of anything happening in your project. Instead of having to rely on the next batch to detect new events, we let you know as soon as they happen.
If you want to know how to configure a webhook, read the documentation. In this guide we will focus on different use cases and which event to use.
To detect that a user has opened an account you should primarily use the onboarding
redirectUrl
. We will redirect the user with the state you specified when creating the onboarding so that you can easily reconciliate which user ha finished their onboarding. If you use generic onboarding URLs, you can subscribe to the Account.Created
webhook and you will be notified when a user completes onboarding. In order to determine which user it was, you can use this query. It allows you to get the personal user information and compare it to what you have in your database.Request
Response
query MyQuery {
account(accountId: "{{YOUR_ACCOUNT_ID}}") {
holder {
info {
... on AccountHolderIndividualInfo {
__typename
user {
id
}
}
}
}
memberships {
edges {
node {
legalRepresentative
user {
id
lastName
}
}
}
}
}
}
{
"data": {
"account": {
"holder": {
"info": {}
},
"memberships": {
"edges": [
{
"node": {
"legalRepresentative": true,
"user": {
"id": "{{YOUR_LEGAL_REPRESENTATIVE_USER_ID}}",
"lastName": "Doe"
}
}
]
}
}
Receiving a payment will trigger a
Transaction.Booked
event. You will then have to do a query to check if the transaction was a payment received. This information is available in transaction.type
, where it will be equal to SepaCreditTransferIn
. Here is an example of the query you can execute to verify it's a received payment.This works the same way as SEPA payment received, but with
SepaCreditTransferOut
Every time a user adds a card a
Card.Created
event will be triggered. Using the card query you can then fetch the accountMembership
or the account linked to it.To be informed every time a card payment was accepted you have to use the
Transaction.Pending
event and the Transaction.Booked
event. The first one covers 99% of cases where a user makes a payment and the merchant asks for authorization of the full amount. In this case, a query like this will allow you to determine that it is a card authorization. If the type is CardOut
and the status is Pending
, then the authorization went through. The other 1% we will only receive a debit for the payment. The Transaction type will be CardOut
but the status will be Booked
.This works the same way as accepted card payments, but the status will be
Rejected
.Last modified 1yr ago