Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Registering a WebHook to receive consent event updates

...

Code Block
curl --location --request POST 'https://onboard.smartkeys.celcoin8429y94d.dev.fsapps.ioapp/api/portal/onboard/v1/token' \ --header 'Content- Type: application/json' \ --data-raw '{	"client_id":"64b51075-45bf-46cc-aed4-29b69b51816d", "client_secret": "9257b897-01ca- 4ebd-9fd4-************"}'

...

Info

Once the access_token is generated, let's register your webhook using the request below.

 

Request Webhook

...

- ⚠️ APIDeprecated

Code Block
curl --location 'https://onboard.smartkeys.celcoin8429y94d.dev.fsapps.ioapp/api/smart-keys/interceptors' \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer {{your_generated_access_token_here}}' \
--data '{
    "endpoint": "https://www.my-domain.com/webhook",
    "isAuthenticated": false,
    "authenticationType": "",
    "user": "",
    "password": "",
    "type": "PAYMENT"
}'

 

Note

The request will return the following Http status codesThis API does not support isAuthenticated with a value of “true”.

 

HTTP Status Code

 

201

Webhook succesfully registered.

400

Bad Request - error at request field validations.

401

The used token is not allowed to access the resource.

 

Info

That is all! Now, on any consent status update, the POST https://www.my-domain.com/webhook API will get a request with the body field as below:

...

Info

The data field provides details about the consent event. The field event brings the new consent status, which can be one of the possibilities below.

 

Event

Details

before : consent : create

We received a request for a consent build.

after : consent : create

All consent fields have been validated, it is following all necessary standards and has been created.

consent : approved

Consent has been approved by the user.

consent : rejected

Consent was rejected by the user.

consent : consumed

The consent was consumed by the Financial Institution.

consent : polling

Survey to verify the payment situation at the Financial Institution.

consent : finish

The money was transferred successfully or there was an error reported by one of the Financial Institutions involved in the transaction. More information is provided within the data field.

consent : expired

The consent has expired. Was not approved or rejected after 5 minutes of creation OR after approval/rejection was not consumed within 70 minutes.

consent : revoke

User revoked consent (usually after approval)

 

Info

Testing the webhook

 

...