Skip to main content
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

referenceClientId
string
required
Merchant identifier used to distinguish different businesses.Max length: 16 characters
scopes
string
required
Permission scope. Value: AGREEMENT_PAYMax length: 16 characters
extendInfo
string
JSON object containing contract details.Max length: 4096 characters

Response Parameters

result
object
required
Standard result object with resultCode, resultStatus, resultMessage
authUrl
string
Authorization URL to pass to my.call("signContract") in the Mini Program.Max length: 256 characters

Result Codes

resultStatusresultCodeDescription
SSUCCESSContract prepared successfully
FPARAM_ILLEGALInvalid parameters
FINVALID_AUTH_CLIENTInvalid client ID
FINVALID_SCOPEInvalid scope value
UUNKNOWN_EXCEPTIONAPI failure