Skip to main content

bn.authCapture

authCapture(options?): Promise<AuthCaptureResponse>

description AuthCapture is the entrance to initiate auth capture for merchants. Pre-authorization is a function launched by Binance Pay for merchants in consumption scenarios (such as taxis, hotel reservations, etc.) that require users to make guarantees in advance. The user needs to make a fund authorization when the service is started. When the service is settled, the consumption amount will be deducted from the authorized fund, and the rest will be returned to the user.

example

const { status } = await bn.authCapture({
certSn: string,
merchantId: string,
noncestr: string,
cashierId: string,
timeStamp: string,
paySign: string,
})

Parameters

NameType
options?AuthCaptureOptions

Returns

Promise<AuthCaptureResponse>

Interface: AuthCaptureOptions

NameTypeDescription
certSnstringAPI identity key issued by Binance payment system
merchantIdstringThe merchant account id, issued when merchant been created at Binance.
noncestrstringA random string with 32 bytes, e.g. random ascii decimal within a-z and A-Z and loop 32 times to form a random string
cashierIdstringThe cashierId got from generateCashierUrl API
timeStampstringUnixTimestamp in millisecond that the requests send, guarantee the machine time is sync with the network
paySignstringA signature generated according to a certain logic.

Interface: AuthCaptureResponse

NameTypeDescription
statusstring"SUCCESS" or "FAIL". "0" for success