Skip to content

OAuth2 Authorization Code Notification
Webhook

Request

This webhook is sent by Keeta to notify the vendor's system when a merchant completes the merchant self-authorization process. Upon receiving this notification, the developer should use the provided authorization code to obtain an access token.

Event ID: 1

Important Notes:

  • The authorization code is single-use and must be exchanged for an access token within 10 minutes of receipt.
  • Unix timestamp in milliseconds allows the developer's system to verify that the notification was received within a reasonable time window (e.g., within 10 minutes of the timestamp), helping to prevent replay attacks.
  • The signature must be verified to ensure the webhook message was sent from Keeta.
Bodyapplication/jsonrequired
codestringrequired

Authorization code, single-use. Used to obtain an access token. Must be exchanged for an access token within 10 minutes of receipt.

Example:"99bf245fb49d4c319d31f64ac983c654"
statestring

An opaque value passed by the developer when initiating the authorization flow, returned unchanged.

Example:""
appIdinteger, (int64)required

Unique application ID assigned by Keeta.

Example:1933049627
timestampinteger, (int64)required

Unix timestamp in milliseconds. Keeta includes this field to allow the developer system to verify that the notification was received within a reasonable time window (e.g., within 10 minutes of the timestamp), helping to prevent replay attacks.

Example:1747294159789
sigstringrequired

The signature is the identifier which indicates the webhook message was sent from Keeta, mainly for security check purposes.

Example:"831b9c1741991f747042c75e3864b52c13ffbef68ea5f82a591643f57d24d610"
POST
oauth2AuthorizationCodeNotification
Payload
{ "code": "99bf245fb49d4c319d31f64ac983c654", "state": "", "appId": 1933049627, "timestamp": 1747294159789, "sig": "831b9c1741991f747042c75e3864b52c13ffbef68ea5f82a591643f57d24d610" }

Responses

Request executed successfully

Bodyapplication/json
codeintegerrequired

A numeric status identifier indicating the result of the interface call, used to determine whether the operation executed successfully.

Enum ValueDescription
0

The request was executed successfully.

Non-zero value

The request execution failed. Specific error details can be viewed in the message field.

Example:0
messagestringrequired

Text description corresponding to the status code, explaining the operation result or error cause to users.

Example:"Success"
Response
{ "code": 0, "message": "Success" }