Skip to main content
WEBHOOK
/
powercard
/
callbackExample
{
  "eventType": "card_create",
  "data": "<string>",
  "key": "<string>"
}
"<string>"
The callback API is used to notify the merchant’s system when specific events occur. This mechanism allows PowerCard to asynchronously inform merchants of operation results or status changes. Merchants need to provide a callback API URL to PowerCard and implement the callback API functionality according to the rules. When merchants receive a Webhook from PowerCard, they should use the RSA private key to decrypt the key in the request body, then decode the decrypted data with Base64 to obtain the AES key. Use the decoded AES key to decrypt the data in the request body, then decode the decrypted data with Base64 to get the final data. Process the corresponding business type based on the eventType.
{
  "eventType": "CARD_CREATE",
  "key": "xxxxxxxxxx",
  "data": "xxxxxxxxxxx"
}
Event TypeDescription
CARD_CREATECallback notification for successful card creation. Merchants will receive this callback only after successful card creation.
CARD_RECHARGECallback notification for card recharge. PowerCard will send this callback after successfully processing a recharge order.
CARD_CANCELCallback notification for card cancellation. PowerCard will send this callback after successfully processing a card cancellation order.
CARD_TRANSACTIONCallback notification for user consumption orders. PowerCard will send this callback after receiving merchant’s consumption information.
CARD_STATUSCallback notification for card status changes. PowerCard will send this callback when the card is frozen or unfrozen.
Merchants should return “success” as plain text response without any encryption when receiving Webhook notifications. After receiving the Webhook, merchants should return a response indicating success or failure. When PowerCard receives a response of “success”, it will consider the Webhook successfully processed by the merchant and will not send further notifications; otherwise, PowerCard will repeat the notification at intervals of 5 minutes, 10 minutes, 30 minutes, and 60 minutes. The response returned by the merchant should not be encrypted, as shown in the example below: Response Example
    "success"

Body

application/json
eventType
enum<string>
required
Available options:
card_create,
card_recharge,
card_cancel,
card_transaction,
card_status
data
string
required
key
string
required

Response

200 - application/json
string | null

success

Allowed value: "success"