Skip to main content

bn.requestPayment

requestPayment(options): Promise<PaymentResult>

Initiates a request for payment via Binance Pay.

example

bn.requestPayment({  certSn: '',  merchantId: '',  timeStamp: '',  nonceStr: '',  package: '',  paySign: '', // signature of the parameters}).then(res => {  if (res.status === '0') {    // success  }})

Parameters

NameType
optionsPaymentOptions

Returns

Promise<PaymentResult>

Payment result

Interface: PaymentOptions#

NameTypeDescription
certSnstringAPI identity key issued by Binance payment system
nonceStr?stringnonceStr for the sign
merchantIdstringThe merchant account id, issued when merchant been created at Binance
package?stringThe value of the prepay_id parameter returned by the unified order placement API
paySignstringSignature. For specific signature schemes, see Binance Pay API Documentation
timeStampstringtimestamp of the sign
signType?"MD5" | "HMAC-SHA256" | "RSA"sign algorithm

Interface: PaymentResult#

NameTypeDescription
statusnumber0: pay success; others: pay failed