Skip to main content
POST /v2/authorizations/contractStatusNotify This is a webhook endpoint that Rebell calls to notify merchants of contract status changes. The contractStatusNotifyUrl is provided by the merchant during the contract signing process.

Overview

When a user’s agreement payment contract status changes (e.g., becomes invalid), Rebell sends a notification to your registered webhook URL.
This is an inbound webhook - Rebell calls your server, not the other way around.

Request Parameters

accessToken
string
required
Access token associated with the contract. Used to access user information.Max length: 128 characters
contractStatus
string
required
Current status of the contract.Possible values:
  • VALID - Contract is active and valid
  • INVALID - Contract has been terminated or invalidated
modifyTime
string
Unix timestamp (10 digits) when the status changed.Example: 1749634508

Response Parameters

result
object
required
Standard result object

Example Request

{
  "accessToken": "305XST2CSG0N4P0xxxxxxxxxx",
  "contractStatus": "INVALID",
  "modifyTime": "1749634508"
}

Example Response

Return this response to acknowledge receipt:
{
  "result": {
    "resultCode": "SUCCESS",
    "resultStatus": "S",
    "resultMessage": "success"
  }
}

Webhook Handler Example

app.post('/webhooks/contract-status', express.json(), (req, res) => {
  // 1. Verify the signature (see Authentication docs)
  if (!verifySignature(req)) {
    return res.status(401).json({
      result: { resultStatus: 'F', resultCode: 'UNAUTHORIZED' }
    });
  }

  const { accessToken, contractStatus, modifyTime } = req.body;

  // 2. Process the status change
  if (contractStatus === 'INVALID') {
    // Contract terminated - disable agreement payments for this user
    deactivateUserContract(accessToken);
    notifyUser('Your payment agreement has been cancelled');
  }

  // 3. Acknowledge receipt
  res.json({
    result: {
      resultCode: 'SUCCESS',
      resultStatus: 'S',
      resultMessage: 'success'
    }
  });
});

Best Practices

If your webhook repeatedly fails to respond with a success status, Rebell may stop sending notifications. Ensure your endpoint is reliable and returns resultStatus: "S" for successful processing.