Partner Integration
Last updated
Was this helpful?
Last updated
Was this helpful?
Version v1
Release date 30/04/2023
GalaxyJoy Webhook provides webhook events that send to your endpoint with gj-signature
in the header. You can receive webhook events in which an object changes and secured with an e-signature between sender and receiver.
Before you can verify signatures, you need to register the endpoint by contact to GalaxyJoy () and receive an endpoint's SecretKey. If you use multiple endpoints, you must obtain a SecretKey for each one you want to verify signatures on.
All events always contain event type as an attribute event_type
. Event types are represented by actions in which objects occur.
Each event_type
contains two parts including object name (user
) and action (created
)
List available event types:
Event Type
Description
Available
Payload
user.created
User created
Yes
user.updated-profile
User profile updated
Yes
user.updated-ekyc
User ekyc updated
Yes
user.updated-balance
User balance updated
Yes
user.updated-tier
User tier updated
Yes
user.activated
User activated
Yes
user.deleted
User deleted
Yes
v1
version is the first algorithms which GalaxyJoy Webhook support by default
Version
Description
Available
v1
algorithm using the SHA-256 hashing function.
Yes
Method: POST
Receive headers
Receive body
the Header Content-Type
the content type that sender has been sent
Header gj-signature
the header signature that provided by GalaxyJoy Webhook. It's value contains:
Body event_id
The event unique id
Body timestamp
The timestamp in second
Body body
The object payload data
Normally, client http will receive a raw body when headers
Content-Type: application/json
, but some applications can use a middleware that parse body to Json format. So, if your application has been implement body parse json, you need to change your endpoint which register on GalaxyJoy Webhook to receive raw body.
Run: node app.js
t=1681309224070
The timestamps sender has been sent. The receiver side can use it to
v1=6f85d9fc3bb10758ab35d84c05387c18bde44d8f446dc4af2ad6a2b335da79d0
The webhook version and . The receiver side must use it to verify the body before handling it
Body event_type
The that can determine an object's change event
Example with .