POST /v1/authorizations/prepare
Prepares the contract information for agreement-based payment scenarios. Returns an authUrl to pass to my.call("signContract") in the Mini Program.
Request Parameters
Merchant identifier used to distinguish different businesses.Max length: 16 characters
Permission scope. Value:
AGREEMENT_PAYMax length: 16 charactersJSON object containing contract details.Max length: 4096 characters
Response Parameters
Standard result object with
resultCode, resultStatus, resultMessageAuthorization URL to pass to
my.call("signContract") in the Mini Program.Max length: 256 charactersResult Codes
| resultStatus | resultCode | Description |
|---|---|---|
S | SUCCESS | Contract prepared successfully |
F | PARAM_ILLEGAL | Invalid parameters |
F | INVALID_AUTH_CLIENT | Invalid client ID |
F | INVALID_SCOPE | Invalid scope value |
U | UNKNOWN_EXCEPTION | API failure |