Skip to main content

Documentation Index

Fetch the complete documentation index at: https://docs.rebellapp.com/llms.txt

Use this file to discover all available pages before exploring further.

Invoke the contract signing UI for recurring payments or agreements.

Parameters

PropertyTypeRequiredDescription
signStrStringYesSigned contract string from backend
successFunctionNoCallback with sign result
failFunctionNoCallback on failure
completeFunctionNoCallback that always executes

Success Callback

PropertyTypeDescription
authStateStringAuthorization state generated by the Mini Program server (max 256 characters)
authCodeStringAuthorization code for obtaining the agreement payment access token (max 32 characters)

Fail Callback

PropertyTypeDescription
errorStringError code
errMessageStringHuman-readable error description

Error Codes

CodeMeaning
6001User cancelled the signing process
6002Network error during signing
7001Outcome unknown — signing may have succeeded
7002Signing failed

Code Example

my.signContract({
  signStr: signStrFromBackend,
  success: (res) => {
    console.log('Auth code:', res.authCode);
    // Exchange authCode server-side via applyToken
  },
  fail: (err) => {
    if (err.error === '6001') {
      console.log('User cancelled');
    } else {
      console.error('Signing failed:', err.errMessage);
    }
  }
});