bni-api / bni-php
官方BNI API SDK for PHP
2.3.4
2024-09-18 07:09 UTC
Requires
- guzzlehttp/guzzle: 7.*
Requires (Dev)
- codeception/codeception: 4.2.x-dev
- codeception/module-asserts: ^1.0.0
- codeception/module-phpbrowser: ^1.0.0
- phpunit/phpunit: ^9.5
This package is auto-updated.
Last update: 2024-09-24 07:01:53 UTC
README
这是BNI API官方PHP客户端/库。请访问数字服务了解我们产品的更多信息,并访问我们的文档页面API文档了解更多技术细节。
1. 安装
1.1 使用Composer
下载 Composer并运行命令行
composer require bni-api/bni-php
1.2 手动安装
如果您不使用Composer,您可以克隆或下载此存储库。
2. 使用
2.1 选择API产品
我们有5个API产品可供使用
- One Gate Payment - 一家公司将其应用程序/系统集成到银行交易服务的解决方案。 文档
- Snap BI - 与SNAP BI集成 文档
- RDN - 是BNI为证券公司提供解决方案的创新,可以为投资者开设数字账户,并通过与API集成促进证券过户交易。 文档
- RDL - 是提供金融服务,将出借人和借款人聚集在一起,以便通过互联网网络直接使用电子系统以卢比对价货币达成借贷协议。 文档
- RDF - 是为在OJK注册的金融科技公司提供解决方案,通过利用API技术开设数字账户,以促进资金转账交易。 文档
- BNI Move 在这里查看我们的API。 文档
2.2 客户端初始化和配置
从菜单 - 应用程序获取您的客户端密钥和服务器密钥,创建API客户端对象
use BniApi\BniPhp\Bni; $bni = new Bni( $env = 'sandbox', // dev, sandbox, prod $clientId = '{your-client-id}', $clientSecret = '{your-client-secret}', $apiKey = '{your-api-key}', $apiSecret = '{your-api-secret}', $appName = '{your-app-name}' );
2.2.A One Gate Payment
创建 One Gate Payment
类对象
use BniApi\BniPhp\Bni; use BniApi\BniPhp\api\OneGatePayment; $bni = new Bni( $env = 'sandbox', // dev, sandbox, prod $clientId = '{your-client-id}', $clientSecret = '{your-client-secret}', $apiKey = '{your-api-key}', $apiSecret = '{your-api-secret}', $appName = '{your-app-name}' ); $ogp = new OneGatePayment($bni);
One Gate Payment
类的可用方法
获取余额
$getbalance = $ogp->getBalance( $accountNo = '115471119' );
获取内部查询
$getInHouseInquiry = $ogp->getInHouseInquiry( $accountNo = '115471119' );
执行支付
$doPayment = $ogp->doPayment( $customerReferenceNumber = '20170227000000000020', // max 20 char client defined reference number $paymentMethod = '0', // 0: In-house (intra BNI), 1: RTGS transfer, 2: Kliring transfer $debitAccountNo = '113183203', $creditAccountNo = '115471119', $valueDate = '20170227000000000', $valueCurrency = 'IDR', $valueAmount = '100500', $remark = '', // optional $beneficiaryEmailAddress = 'mail@example.com', // optional $beneficiaryName = 'Mr.X', // optional max 50 char (mandatory if paymentMethod 1 / 2) $beneficiaryAddress1 = 'Jakarta', // optional max 50 char (mandatory if paymentMethod 1 / 2) $beneficiaryAddress2 = '', // optional max 50 char $destinationBankCode = '', // optional (mandatory if paymentMethod 1 / 2) $chargingModelId = 'OUR' // OUR: fee will be paid by sender (default), BEN: fee will be paid by beneficary, SHA: fee divided );
获取支付状态
$getPaymentStatus $ogp->getPaymentStatus( $customerReferenceNumber = '20170227000000000020' // max 20 char client defined reference number );
获取银行间查询
$getInterBankInquiry = $ogp->getInterBankInquiry( $customerReferenceNumber = '20170227000000000021', // max 20 char client defined reference number $accountNum = '113183203', $destinationBankCode = '014', $destinationAccountNum = '3333333333' );
获取银行间支付
$getInterBankPayment = $ogp->getInterBankPayment( $customerReferenceNumber = '20170227000000000021', // max 20 char client defined reference number $amount = '100500', $destinationAccountNum = '3333333333', $destinationAccountName = 'BENEFICIARY NAME 1 UNTIL HERE1BENEFICIARY NAME 2(OPT) UNTIL HERE2', $destinationBankCode = '014', $destinationBankName = 'BCA', $accountNum = '115471119', $retrievalReffNum = '100000000024' // refference number for Interbank Transaction );
2.2.B Snap BI
创建 Snap BI
类对象
use BniApi\BniPhp\Bni; use BniApi\BniPhp\api\SnapBI; $bni = new Bni( $env = 'sandbox', // dev, sandbox, prod $clientId = '{your-client-id}', $clientSecret = '{your-client-secret}', $apiKey = '{your-api-key}', $apiSecret = '{your-api-secret}', $appName = '{your-app-name}' ); $snap = new SnapBI( $bni = '{instance-of-bni-class}', $privateKeyPath = '{your-path-private-key}', $channelId = '{your-channel}' );
Snap BI
类的可用方法
余额查询
$balanceInquiry = $snap->balanceInquiry( $partnerReferenceNo = '202010290000000000002', // optional $accountNo = '0115476117' );
内部账户查询
$internalAccountInquiry = $snap->internalAccountInquiry( $partnerReferenceNo = '2023062601000000000509', $beneficiaryAccountNo = '317125693' );
交易状态查询
$transactionStatusInquiry = $snap->transactionStatusInquiry( $originalPartnerReferenceNo = '2022051314142684054947620220513141426840549476', // optional $originalReferenceNo = '', // transaction reference number $originalExternalId = '', // optional $serviceCode = '22', // SNAP BI service code $transactionDate = '', $amountValue = '100000001.00', $amountCurrency = 'IDR', $addtionalInfoDeviceId = '09864ADCASA', // optinal $additionalInfoChannel = 'API', // optinal );
银行间转账
$transferIntraBank = $snap->transferIntraBank( $partnerReferenceNo = '20220426170737356898', // transaction reference number $amountValue = '55000.00', $amountCurrency = 'IDR', $beneficiaryAccountNo = '0115476151', $beneficiaryEmail = '', // optional $currency = 'IDR', // optional $customerReference = '20220426170737356898', // optional $feeType = 'OUR', // OUR: fee will be paid by sender (default), BEN: fee will be paid by beneficary, SHA: fee divided $remark = '20220426170737356898', // optional $sourceAccountNo = '0115476117', $transactionDate = '2022-04-26T17:07:36+07:00', $additionalInfoDeviceId = '', $additionalInfoChannel = '' );
RTGS转账
$transferRTGS = $snap->transferRTGS( $partnerReferenceNo = '20220513095840015788857', // transaction reference number $amountValue = '100000001.00', $amountCurrency = 'IDR', $beneficiaryAccountName = 'PTXYZIndonesia', $beneficiaryAccountNo = '3333333333', $beneficiaryAccountAddress = 'JlGatotSubrotoNoKav18RW1KuninganBarKecMampangPrptKotaJakartaSelatanDaerahKhususIbukotaJakarta12710' $beneficiaryBankCode = 'CENAIDJA', $beneficiaryBankName = 'PTBANKCENTRALASIATbk', // optional $beneficiaryCustomerResidence = '1', $beneficiaryCustomerType = '2', $beneficiaryEmail = '-', // optional $currency = 'IDR' $customerReference = '20220513095840015788857', $feeType = 'OUR', // OUR: fee will be paid by sender (default), BEN: fee will be paid by beneficary, SHA: fee divided $kodepos = '-', // optional $recieverPhone = '-', // optional $remark = 'DANA20220513095840015788857PTZomatoMediaIndonesia', // optional $senderCustomerResidence = '-', // optional $senderCustomerType = '-', // optional $senderPhone = '-', // optional $sourceAccountNo = '0115476151', $transactionDate = '2020-06-17T01:03:04+07:00', $additionalInfoDeviceId = '', // optional $additionalInfoChannel = '' // optional );
SKNBI转账
$transferSKNBI = $snap->transferSKNBI( $partnerReferenceNo = '2022101829912160579817066466', // transaction reference number $amountValue = '120000000.00', $amountCurrency = 'IDR', $beneficiaryAccountName = 'Trinawati Eka Putri', $beneficiaryAccountNo = '0115476117', $beneficiaryAccountAddress = 'Palembang', // optional $beneficiaryBankCode = 'CENAIDJAXXX', $beneficiaryBankName = 'PT. BANK CENTRAL ASIA Tbk.', // optional $beneficiaryCustomerResidence = '1', $beneficiaryCustomerType = '1', $beneficiaryEmail = 'xyz@xyz.co.id' // optional $currency = 'IDR', // optional $customerReference = '56756567567', $feeType = 'BEN', // OUR: fee will be paid by sender (default), BEN: fee will be paid by beneficary, SHA: fee divided $kodepos = '-', // optional $recieverPhone = '-', // optional $remark = 'remark test', // optional $senderCustomerResidence = '', // optional $senderCustomerType = '', // optional $senderPhone = '', // optional $sourceAccountNo = '0115476151', $transactionDate = '2022-10-18T09:44:44+07:00', $additionalInfoDeviceId = 'Biaya Hidup Pihak Asing', // optional $additionalInfoChannel = '01' // optional );
外部账户查询
$externalAccountInquiry = $snap->externalAccountInquiry( $beneficiaryAccountNo = '123456789', $partnerReferenceNo = '20240226163135663', // optional $beneficiaryBankCode = 'CENAIDJAXXX', $additionalInfoDeviceId = '09864ADCASA', // optional $additionalInfoChannel = 'API' // optional );
银行间转账
$transferInterBank = $snap->transferInterBank( $partnerReferenceNo = '20240226163731861', // transaction reference number $amountValue = '20000', $amountCurrency = 'IDR', $beneficiaryAccountName = 'SRI ANGGRAINI', $beneficiaryAccountNo = '0000000986', $beneficiaryAccountAddress = 'Palembang', // optional $beneficiaryBankCode = '014', $beneficiaryBankName = 'Bank BCA', // optional $beneficiaryEmail = 'customertes@outlook.com', // optional $currency = 'IDR', // optional $customerReference = '20231219085', // optional $sourceAccountNo = '1000161562', $transactionDate = '2024-01-04T08:37:08+07:00', $feeType = 'OUR', // OUR: fee will be paid by sender (default), BEN: fee will be paid by beneficary, SHA: fee divided $additionalInfoDeviceId = '09864ADCASA', // optional $additionalInfoChannel = 'API' // optional );
2.2.C 自动支付SNAP
创建 Autopay
类对象
use BniApi\BniPhp\api\Autopay; $autopay = new Autopay( $merchantID, $clientID, $clientSecret, $privateKey, 'alpha' );
Autopay
类的可用方法
账户绑定
$response = $autopay->accountBinding( $partnerReferenceNo = '123456789009876544002', $bankAccountNo = '92345678902787', $bankCardNo = '92345678902788', $limit = 250000.00, $email = 'burhanaji2@gmail.com', $custIdMerchant = '92345678902788' );
账户解绑
$response = $autopay->accountUnbinding( $partnerReferenceNo = '12345678900987654484', $bankCardToken = 'vvSWxFEu5p6ONXT3qEoZ2L5o7YJ4UjH7Mee3SDuxigMixnfVuOnQpbJxuboXijOAlna' . 'ow6XVqP7VCyQqSSzdv24OQjGl7IRuUAVcAgzKzJQoybSLPk0kKKCdqJqwrOXZ', $chargeToken = 'Xob2d8BlMxVyQRloodpujCIvuFortJ', $otp = '', $custIdMerchant = '12313213131' );
余额查询
$response = $autopay->balanceInquiry( $partnerReferenceNo = '2023102899999999999902', $accountNo = '9234567846', $amount = 1000.00, $bankCardToken = 'q3jcQJJTrBvYzUt2VyzY68Klw8mG400K5NWaAL5JdTbjAqjXBG9LZr' . '0F4khuVdrezjXFLEJRzvmF5xLZhT2fJj73FbQlf9FeqGCNW8HKSEOpzz83HYkUaQWBX2TPkaJM' );
借记/支付
$response = $autopay->debit( $partnerReferenceNo = '123456789009876477', $bankCardToken = 'YKYpg4xqTK1IuhlGQnrpiXHnxTcFx8ntjVfggWddVtTqsD8aUvi74oSijcVF0eV9' . '1zVbCganXNROsFUURUzPLWbSZp5yHKmMnijS4D2yrMeJ7yJHHTYtRHpCP2GcoXJ3', $chargeToken = 'ZDkLEQDZspP9FbahGkJoo3NmiSC6p0', $otp = '', $amount = [ 'value' => '1000.00', 'currency' => 'IDR' ], $remark = 'remark' );
借记退款
$response = $autopay->debitRefund( $originalPartnerReferenceNo = '123456789009876408', $partnerRefundNo = '223456789009876487', $refundAmount = [ 'value' => 1000.00, 'currency' => 'IDR' ], $reason = 'Complaint from customer', $refundType = 'full' );
借记状态
$response = $autopay->debitStatus( $originalPartnerReferenceNo = '123456789009876408', $transactionDate = '20220419', $serviceCode = '54', $amount = [ 'value' => 1000.00, 'currency' => 'IDR' ] );
额度查询
$response = $autopay->limitInquiry( $partnerReferenceNo = '2020102900000000000001', $bankCardToken = '6d7963617264746f6b656e', $accountNo = '7382382957893840', $amount = 200000.00 );
OTP
$response = $autopay->otp( $partnerReferenceNo = '12345678900987654484', $journeyID = '12345678900987654484', $bankCardToken = 'vvSWxFEu5p6ONXT3qEoZ2L5o7YJ4UjH7Mee3SDuxigMixnfVuOnQpbJxuboXijOAlna' . 'ow6XVqP7VCyQqSSzdv24OQjGl7IRuUAVcAgzKzJQoybSLPk0kKKCdqJqwrOXZ', $otpReasonCode = '54', $additionalInfo = [ 'expiredOtp' => "2023-07-26T18:56:11+07:00", ], $externalStoreId = '134928924949479' );
验证OTP
$response = $autopay->verifyOtp( $originalPartnerReferenceNo = '123456789009876533', $originalReferenceNo = '7979309099377000825262452054700150269920536175232508970766089901', $chargeToken = 'dI7aK7aEbdgeMDnG2ygcEHQpyJQINm', $otp = '359677' );
设置限制
$response = $autopay->setLimit( $partnerReferenceNo = '12345678900987654484', $bankCardToken = 'vvSWxFEu5p6ONXT3qEoZ2L5o7YJ4UjH7Mee3SDuxigMixnfVuOnQpbJxuboXijOAlna' . 'ow6XVqP7VCyQqSSzdv24OQjGl7IRuUAVcAgzKzJQoybSLPk0kKKCdqJqwrOXZ', $limit = 250000.00, $chargeToken = '931C5fuQgmB3FICZOag30G9p0X4Gtb', $otp = '898201' );
2.2.D 电子集合
创建 电子集合
类对象
use BniApi\BniPhp\Bni; use BniApi\BniPhp\api\SnapBI; $bni = new Bni( $env = 'sandbox', // dev, sandbox, prod $clientId = '{your-client-id}', // clientId consists prefix and client id separated with dash (-) character. Example: 8-000. 8 as prefix, 000 as client id $clientSecret = '{your-client-secret}', // client secret key $apiKey = '{your-api-key}', // can be emptied $apiSecret = '{your-api-secret}', // can be emptied $appName = '{your-app-name}' // can be emptied ); $ecoll = new Ecollection($bni);
电子集合
类的可用方法
创建账单
$createBilling = $ecoll->createBilling( $trxId = "trx-id899", // mandatory $trxAmount = "100000", // mandatory except billing type is "o" (open payment) $billingType = "c", // mandatory. Credit: o,c,i,m,n,x. Debit: p,j,d,z $customerName = "test name", // mandatory $customerEmail = "mail@example.com", // optional $customerPhone = "08123123", // optional $virtualAccount = "", // optional, if empty then autogenerated $datetimeExpired = "2023-09-31T17:00:00+07:00", // optional $description = "test description update", // optional );
更新账单
$updateBilling = $ecoll->updateBilling( $trxId = "trx-id6", // mandatory $trxAmount = "100000", // mandatory except billing type is "o" (open payment) $customerName = "test name updated", // mandatory $customerEmail = "", // optional $customerPhone = "", // optional $virtualAccount = "8325201106194912", // optional $datetimeExpired = "2023-09-31T17:00:00+07:00", // optional $description = "test description update", // optional );
查询账单
$inquiryBilling = $ecoll->inquiryBilling( $trxId = "trx-id6", );
停用账单
$inactiveBilling = $ecoll->inactiveBilling( $trxId = "trx-id6", // mandatory $virtualAccount = "8325201106194911" // mandatory ); ### 2.2.C Fintech Account Service (RDF) Create `RDF` Class Object ```php use BniApi\BniPhp\Bni; use BniApi\BniPhp\api\RDF; $bni = new Bni( $env = 'sandbox', // dev, sandbox, prod $clientId = '{your-client-id}', $clientSecret = '{your-client-secret}', $apiKey = '{your-api-key}', $apiSecret = '{your-api-secret}', $appName = '{your-app-name}' ); $rdf = new RDF( $bni = '{instance-of-bni-class}', $privateKeyPath = '{your-path-private-key}', $channelId = '{your-channel}' );
人脸识别
$faceRecognition = $rdf->faceRecognition( $companyId = 'SANDBOX', $parentCompanyId = 'STI_CHS', $firstName = 'MOHAMMAD', $middleName = 'BAQER', $lastName = 'ZALQAD', $idNumber = '0141111121260118', // Identity Number (KTP only) $birthDate = '29-09-2021', // format : DD-MM-YYYY $birthPlace = 'BANDUNG', $gender = 'M', // “M” or “F” $cityAddress = 'Bandung', $stateProvAddress = 'Jawa Barat', $addressCountry = 'ID', // e.g.: “ID” $streetAddress1 = 'bandung', $streetAddress2 = 'bandung', $postCodeAddress = '40914', $country = 'ID', // e.g.: “ID” $selfiePhoto = '29mdHdhcmUAd3d3Lmlua3NjYXBlLm9yZ5vuP', // Base64 encoded selfie photo );
注册投资者
$registerInvestor = $rdf->registerInvestor( $companyId = 'SANDBOX', $parentCompanyId = 'STI_CHS', $uuidFaceRecog = '492F33851D634CFB', // RequestUuid successed value from Face Recognition API (KYC valid) $title = '01', $firstName = 'Agus', $middleName = '', $lastName = 'Saputra', $optNPWP = '1', // “1” or “0” (Default “1”) $NPWPNum = '001058893408123', $nationality = 'ID', // e.g.: “ID” $domicileCountry = 'ID', // e.g.: “ID” $religion = '2', $birthPlace = 'Semarang', $birthDate = '14081982', // DDMMYYYY $gender = 'M', // “M” or “F” $isMarried = 'S', $motherMaidenName = 'Dina Maryati', $jobCode = '01', $education = '07', $idType = '01', $idNumber = '4147016201959998', // Identity Number (KTP only) $idIssuingCity = 'Jakarta Barat', $idExpiryDate = '26102099', // ddMMyyyy $addressStreet = 'Jalan Mawar Melati', $addressRtRwPerum = '003009Sentosa', $addressKel = 'Cengkareng Barat', $addressKec = 'Cengkareng/Jakarta Barat', $zipCode = '11730', $homePhone1 = '0214', // Area code, e.g. 021 (3 - 4 digit) If not exist, fill with “9999” $homePhone2 = '7459', // Number after area code (min 4 digit) If not exist, fill with “99999999” $officePhone1 = '', // Area code, e.g. 021 $officePhone2 = '', // Number after area code $mobilePhone1 = '0812', // Operator code, e.g. 0812 (4 digit) If not exist, fill with “0899” $mobilePhone2 = '12348331', // Number after operator code (min 6 digit) If not exist, fill with “999999” $faxNum1 = '', // Area code, e.g. 021 $faxNum2 = '', // Number after area code $email = 'agus.saputra@gmail.com', $monthlyIncome = '8000000', $branchOpening = '0259', $institutionName = 'PT. BNI SECURITIES', $sid = 'IDD280436215354', $employerName = 'Salman', // Employer Name / Company Name $employerAddDet = 'St Baker', // Employer street address / home street address $employerAddCity = 'Arrandelle', // Employer city address / home city address $jobDesc = 'Pedagang' // Current investor job, $ownedBankAccNo = '0337109074', // Investor’s owned bank account $idIssuingDate = '10122008' // Issue date, e.g.: “10122016” );
注册投资者的账户
$registerInvestorAccount = $rdf->registerInvestorAccount( $companyId = 'NI001', $parentCompanyId = 'KSEI', $cifNumber = '9100749959', $currency = 'IDR', $openAccountReason = '2', $sourceOfFund = '1', $branchId = '0259', $bnisId = '19050813401', $sre = 'NI001CX5U00109', )
查询账户信息
$inquiryAccountInfo = $rdf->inquiryAccountInfo( $companyId = 'NI001', $parentCompanyId = 'KSEI', $accountNumber = '0115476117' )
查询账户余额
$inquiryAccountBalance = $rdf->inquiryAccountBalance( $companyId = 'NI001', $parentCompanyId = 'KSEI', $accountNumber = '0115476117' )
查询账户历史
$inquiryAccountHistory = $rdf->inquiryAccountHistory( $companyId = 'NI001', $parentCompanyId = 'KSEI', $accountNumber = '0115476117' )
使用转账进行支付
$paymentUsingTransfer = $rdf->paymentUsingTransfer( $companyId = 'NI001', $parentCompanyId = 'KSEI', $accountNumber = '0115476117', $beneficiaryAccountNumber = '0115471119', $currency = 'IDR', // e.g., “IDR” $amount = '11500', $remark = 'Test RDN' // Recommended for the reconciliation purpose )
查询支付状态
$inquiryPaymentStatus = $rdf->inquiryPaymentStatus( $companyId = 'NI001', $parentCompanyId = 'KSEI', $requestedUuid = 'E8C6E0027F6E429F' // UUID that has been processed before )
使用清算进行支付
$paymentUsingClearing = $rdf->paymentUsingClearing( $companyId = 'NI001', $parentCompanyId = 'KSEI', $accountNumber = '0115476117', $beneficiaryAccountNumber = '3333333333', $beneficiaryAddress1 = 'Jakarta', $beneficiaryAddress2 = '', $beneficiaryBankCode = '140397', $beneficiaryName = 'Panji Samudra', $currency = 'IDR', // e.g., “IDR” $amount = 15000, $remark = 'Test kliring', // Recommended for the reconciliation purpose $chargingType = 'OUR' )
使用RTGS进行支付
$paymentUsingRTGS = $rdf->paymentUsingRTGS( $companyId = 'NI001', $parentCompanyId = 'KSEI', $accountNumber = '0115476117', $beneficiaryAccountNumber = '3333333333', $beneficiaryAddress1 = 'Jakarta', $beneficiaryAddress2 = '', $beneficiaryBankCode = 'CENAIDJA', $beneficiaryName = 'Panji Samudra', $currency = 'IDR', // e.g., “IDR” $amount = 120000000, $remark = 'Test rtgs', // Recommended for the reconciliation purpose $chargingType = 'OUR' )
查询跨行账户
$inquiryInterbankAccount = $rdf->inquiryInterbankAccount( $companyId = 'NI001', $parentCompanyId = 'KSEI', $accountNumber = '0115476117', $beneficiaryBankCode = '013', $beneficiaryAccountNumber = '01300000', )
使用跨行进行支付
$paymentUsingInterbank = $rdf->paymentUsingInterbank( $companyId = 'NI001', $parentCompanyId = 'KSEI', $accountNumber = '0115476117', $beneficiaryAccountNumber = '3333333333', $beneficiaryAccountName = 'KEN AROK', // Get from Inquiry Interbank Account $beneficiaryBankCode = '014', $beneficiaryBankName = 'BANK BCA', // Get from Inquiry Interbank Account $amount = 15000, )
2.2.E RDF服务
创建 RDF
类对象
use BniApi\BniPhp\Bni; use BniApi\BniPhp\api\RDF; $bni = new Bni( $env = 'sandbox', // dev, sandbox, prod $clientId = '{your-client-id}', $clientSecret = '{your-client-secret}', $apiKey = '{your-api-key}', $apiSecret = '{your-api-secret}', $appName = '{your-app-name}' ); $rdn = new RDF( $bni = '{instance-of-bni-class}', $privateKeyPath = '{your-path-private-key}', $channelId = '{your-channel}' );
人脸识别
$faceRecognition = $rdn->faceRecognition( $companyId = 'SANDBOX', $parentCompanyId = 'STI_CHS', $firstName = 'MOHAMMAD', $middleName = 'BAQER', $lastName = 'ZALQAD', $idNumber = '0141111121260118', // Identity Number (KTP only) $birthDate = '29-09-2021', // format : DD-MM-YYYY $birthPlace = 'BANDUNG', $gender = 'M', // “M” or “F” $cityAddress = 'Bandung', $stateProvAddress = 'Jawa Barat', $addressCountry = 'ID', // e.g.: “ID” $streetAddress1 = 'bandung', $streetAddress2 = 'bandung', $postCodeAddress = '40914', $country = 'ID', // e.g.: “ID” $selfiePhoto = '29mdHdhcmUAd3d3Lmlua3NjYXBlLm9yZ5vuP', // Base64 encoded selfie photo );
注册投资者
$registerInvestor = $rdn->registerInvestor( $companyId = 'SANDBOX', $parentCompanyId = 'STI_CHS', $uuidFaceRecog = '492F33851D634CFB', // RequestUuid successed value from Face Recognition API (KYC valid) $title = '01', $firstName = 'Agus', $middleName = '', $lastName = 'Saputra', $optNPWP = '1', // “1” or “0” (Default “1”) $NPWPNum = '001058893408123', $nationality = 'ID', // e.g.: “ID” $domicileCountry = 'ID', // e.g.: “ID” $religion = '2', $birthPlace = 'Semarang', $birthDate = '14081982', // DDMMYYYY $gender = 'M', // “M” or “F” $isMarried = 'S', $motherMaidenName = 'Dina Maryati', $jobCode = '01', $education = '07', $idType = '01', $idNumber = '4147016201959998', // Identity Number (KTP only) $idIssuingCity = 'Jakarta Barat', $idExpiryDate = '26102099', // ddMMyyyy $addressStreet = 'Jalan Mawar Melati', $addressRtRwPerum = '003009Sentosa', $addressKel = 'Cengkareng Barat', $addressKec = 'Cengkareng/Jakarta Barat', $zipCode = '11730', $homePhone1 = '0214', // Area code, e.g. 021 (3 - 4 digit) If not exist, fill with “9999” $homePhone2 = '7459', // Number after area code (min 4 digit) If not exist, fill with “99999999” $officePhone1 = '', // Area code, e.g. 021 $officePhone2 = '', // Number after area code $mobilePhone1 = '0812', // Operator code, e.g. 0812 (4 digit) If not exist, fill with “0899” $mobilePhone2 = '12348331', // Number after operator code (min 6 digit) If not exist, fill with “999999” $faxNum1 = '', // Area code, e.g. 021 $faxNum2 = '', // Number after area code $email = 'agus.saputra@gmail.com', $monthlyIncome = '8000000', $branchOpening = '0259', $institutionName = 'PT. BNI SECURITIES', $sid = 'IDD280436215354', $employerName = 'Salman', // Employer Name / Company Name $employerAddDet = 'St Baker', // Employer street address / home street address $employerAddCity = 'Arrandelle', // Employer city address / home city address $jobDesc = 'Pedagang' // Current investor job, $ownedBankAccNo = '0337109074', // Investor’s owned bank account $idIssuingDate = '10122008' // Issue date, e.g.: “10122016” );
注册投资者的账户
$registerInvestorAccount = $rdn->registerInvestorAccount( $companyId = 'NI001', $parentCompanyId = 'KSEI', $cifNumber = '9100749959', $currency = 'IDR', $openAccountReason = '2', $sourceOfFund = '1', $branchId = '0259', $bnisId = '19050813401', $sre = 'NI001CX5U00109', )
查询账户信息
$inquiryAccountInfo = $rdn->inquiryAccountInfo( $companyId = 'NI001', $parentCompanyId = 'KSEI', $accountNumber = '0115476117' )
查询账户余额
$inquiryAccountBalance = $rdn->inquiryAccountBalance( $companyId = 'NI001', $parentCompanyId = 'KSEI', $accountNumber = '0115476117' )
查询账户历史
$inquiryAccountHistory = $rdn->inquiryAccountHistory( $companyId = 'NI001', $parentCompanyId = 'KSEI', $accountNumber = '0115476117' )
使用转账进行支付
$paymentUsingTransfer = $rdn->paymentUsingTransfer( $companyId = 'NI001', $parentCompanyId = 'KSEI', $accountNumber = '0115476117', $beneficiaryAccountNumber = '0115471119', $currency = 'IDR', // e.g., “IDR” $amount = 11500, $remark = 'Test RDN' // Recommended for the reconciliation purpose )
查询支付状态
$inquiryPaymentStatus = $rdn->inquiryPaymentStatus( $companyId = 'NI001', $parentCompanyId = 'KSEI', $requestedUuid = 'E8C6E0027F6E429F' // UUID that has been processed before )
使用清算进行支付
$paymentUsingClearing = $rdn->paymentUsingClearing( $companyId = 'SANDBOX', $parentCompanyId = 'STI_CHS', $accountNumber = '0115476117', $beneficiaryAccountNumber = '3333333333', $beneficiaryAddress1 = 'Jakarta', $beneficiaryAddress2 = '', $beneficiaryBankCode = '140397', $beneficiaryName = 'Panji Samudra', $currency = 'IDR', // e.g., “IDR” $amount = 15000, $remark = 'Test kliring', // Recommended for the reconciliation purpose $chargingType = 'OUR' )
使用RTGS进行支付
$paymentUsingRTGS = $rdn->paymentUsingRTGS( $companyId = 'NI001', $parentCompanyId = 'KSEI', $accountNumber = '0115476117', $beneficiaryAccountNumber = '3333333333', $beneficiaryAddress1 = 'Jakarta', $beneficiaryAddress2 = '', $beneficiaryBankCode = 'CENAIDJA', $beneficiaryName = 'Panji Samudra', $currency = 'IDR', // e.g., “IDR” $amount = 120000000, $remark = 'Test rtgs', // Recommended for the reconciliation purpose $chargingType = 'OUR' )
查询跨行账户
$inquiryInterbankAccount = $rdn->inquiryInterbankAccount( $companyId = 'NI001', $parentCompanyId = 'KSEI', $accountNumber = '0115476117', $beneficiaryBankCode = '013', $beneficiaryAccountNumber = '01300000', )
使用跨行进行支付
$paymentUsingInterbank = $rdn->paymentUsingInterbank( $companyId = 'NI001', $parentCompanyId = 'KSEI', $accountNumber = '0115476117', $beneficiaryAccountNumber = '3333333333', $beneficiaryAccountName = 'KEN AROK', // Get from Inquiry Interbank Account $beneficiaryBankCode = '014', $beneficiaryBankName = 'BANK BCA', // Get from Inquiry Interbank Account $amount = 15000, )
2.2.F RDN服务
创建 RDN
类对象
use BniApi\BniPhp\Bni; use BniApi\BniPhp\api\RDN; $bni = new Bni( $env = 'sandbox', // dev, sandbox, prod $clientId = '{your-client-id}', $clientSecret = '{your-client-secret}', $apiKey = '{your-api-key}', $apiSecret = '{your-api-secret}', $appName = '{your-app-name}' ); $rdn = new RDN( $bni = '{instance-of-bni-class}', $privateKeyPath = '{your-path-private-key}', $channelId = '{your-channel}' );
人脸识别
$faceRecognition = $rdn->faceRecognition( $companyId = 'SANDBOX', $parentCompanyId = 'STI_CHS', $firstName = 'MOHAMMAD', $middleName = 'BAQER', $lastName = 'ZALQAD', $idNumber = '0141111121260118', // Identity Number (KTP only) $birthDate = '29-09-2021', // format : DD-MM-YYYY $birthPlace = 'BANDUNG', $gender = 'M', // “M” or “F” $cityAddress = 'Bandung', $stateProvAddress = 'Jawa Barat', $addressCountry = 'ID', // e.g.: “ID” $streetAddress1 = 'bandung', $streetAddress2 = 'bandung', $postCodeAddress = '40914', $country = 'ID', // e.g.: “ID” $selfiePhoto = '29mdHdhcmUAd3d3Lmlua3NjYXBlLm9yZ5vuP', // Base64 encoded selfie photo );
检查SID
$checkSID = $rdn->checkSID( $companyId = 'SANDBOX', $parentCompanyId = 'KSEI', $requestUuid = '52D3E26AA18D4FCA', $participantId = 'NI001', $sidNumber = 'IDD1206M9527805', $accountNumberOnKsei = 'NI001CRKG00146', $branchCode = '0259', $ack = 'N' );
注册投资者
$registerInvestor = $rdn->registerInvestor( $companyId = 'SANDBOX', $parentCompanyId = 'STI_CHS', $uuidFaceRecog = '492F33851D634CFB', // RequestUuid successed value from Face Recognition API (KYC valid) $title = '01', $firstName = 'Agus', $middleName = '', $lastName = 'Saputra', $optNPWP = '1', // “1” or “0” (Default “1”) $NPWPNum = '001058893408123', $nationality = 'ID', // e.g.: “ID” $domicileCountry = 'ID', // e.g.: “ID” $religion = '2', $birthPlace = 'Semarang', $birthDate = '14081982', // DDMMYYYY $gender = 'M', // “M” or “F” $isMarried = 'S', $motherMaidenName = 'Dina Maryati', $jobCode = '01', $education = '07', $idType = '01', $idNumber = '4147016201959998', // Identity Number (KTP only) $idIssuingCity = 'Jakarta Barat', $idExpiryDate = '26102099', // ddMMyyyy $addressStreet = 'Jalan Mawar Melati', $addressRtRwPerum = '003009Sentosa', $addressKel = 'Cengkareng Barat', $addressKec = 'Cengkareng/Jakarta Barat', $zipCode = '11730', $homePhone1 = '0214', // Area code, e.g. 021 (3 - 4 digit) If not exist, fill with “9999” $homePhone2 = '7459', // Number after area code (min 4 digit) If not exist, fill with “99999999” $officePhone1 = '', // Area code, e.g. 021 $officePhone2 = '', // Number after area code $mobilePhone1 = '0812', // Operator code, e.g. 0812 (4 digit) If not exist, fill with “0899” $mobilePhone2 = '12348331', // Number after operator code (min 6 digit) If not exist, fill with “999999” $faxNum1 = '', // Area code, e.g. 021 $faxNum2 = '', // Number after area code $email = 'agus.saputra@gmail.com', $monthlyIncome = '8000000', $branchOpening = '0259', $institutionName = 'PT. BNI SECURITIES', $sid = 'IDD280436215354', $employerName = 'Salman', // Employer Name / Company Name $employerAddDet = 'St Baker', // Employer street address / home street address $employerAddCity = 'Arrandelle', // Employer city address / home city address $jobDesc = 'Pedagang' // Current investor job, $ownedBankAccNo = '0337109074', // Investor’s owned bank account $idIssuingDate = '10122008' // Issue date, e.g.: “10122016” );
注册投资者的账户
$registerInvestorAccount = $rdn->registerInvestorAccount( $companyId = 'NI001', $parentCompanyId = 'KSEI', $cifNumber = '9100749959', $currency = 'IDR', $openAccountReason = '2', $sourceOfFund = '1', $branchId = '0259', $bnisId = '19050813401', $sre = 'NI001CX5U00109', )
发送数据静态
$sendDataStatic = $rdn->sendDataStatic( $companyId = 'SPS App', $parentCompanyId = 'KSEI', $participantCode = 'NI001', // Institution code, e.g: “NI001” $participantName = 'PT. BNI SECURITIES', // Institution name, e.g.: “PT. BNI SECURITIES” $investorName = 'SUMARNO', $investorCode = 'IDD250436742277', // Investor code, e.g.: “IDD250436742277” $investorAccountNumber = 'NI001042300155', // e.g.: “NI001042300155” $bankAccountNumber = '242345393', // e.g.: “242345393” $activityDate = '20180511', // yyyyMMdd, e.g: “20180511” $activity = 'O' // (O)pening / (C)lose / (B)lock Account / (U)nblock Account )
查询账户信息
$inquiryAccountInfo = $rdn->inquiryAccountInfo( $companyId = 'NI001', $parentCompanyId = 'KSEI', $accountNumber = '0115476117' )
查询账户余额
$inquiryAccountBalance = $rdn->inquiryAccountBalance( $companyId = 'NI001', $parentCompanyId = 'KSEI', $accountNumber = '0115476117' )
查询账户历史
$inquiryAccountHistory = $rdn->inquiryAccountHistory( $companyId = 'NI001', $parentCompanyId = 'KSEI', $accountNumber = '0115476117' )
使用转账进行支付
$paymentUsingTransfer = $rdn->paymentUsingTransfer( $companyId = 'NI001', $parentCompanyId = 'KSEI', $accountNumber = '0115476117', $beneficiaryAccountNumber = '0115471119', $currency = 'IDR', // e.g., “IDR” $amount = 11500, $remark = 'Test RDN' // Recommended for the reconciliation purpose )
查询支付状态
$inquiryPaymentStatus = $rdn->inquiryPaymentStatus( $companyId = 'NI001', $parentCompanyId = 'KSEI', $requestedUuid = 'E8C6E0027F6E429F' // UUID that has been processed before )
使用清算进行支付
$paymentUsingClearing = $rdn->paymentUsingClearing( $companyId = 'NI001', $parentCompanyId = 'KSEI', $accountNumber = '0115476117', $beneficiaryAccountNumber = '3333333333', $beneficiaryAddress1 = 'Jakarta', $beneficiaryAddress2 = '', $beneficiaryBankCode = '140397', $beneficiaryName = 'Panji Samudra', $currency = 'IDR', // e.g., “IDR” $amount = 15000, $remark = 'Test kliring', // Recommended for the reconciliation purpose $chargingType = 'OUR' )
使用RTGS进行支付
$paymentUsingRTGS = $rdn->paymentUsingRTGS( $companyId = 'NI001', $parentCompanyId = 'KSEI', $accountNumber = '0115476117', $beneficiaryAccountNumber = '3333333333', $beneficiaryAddress1 = 'Jakarta', $beneficiaryAddress2 = '', $beneficiaryBankCode = 'CENAIDJA', $beneficiaryName = 'Panji Samudra', $currency = 'IDR', // e.g., “IDR” $amount = 120000000, $remark = 'Test rtgs', // Recommended for the reconciliation purpose $chargingType = 'OUR' )
查询跨行账户
$inquiryInterbankAccount = $rdn->inquiryInterbankAccount( $companyId = 'NI001', $parentCompanyId = 'KSEI', $accountNumber = '0115476117', $beneficiaryBankCode = '013', $beneficiaryAccountNumber = '01300000', )
使用跨行进行支付
$paymentUsingInterbank = $rdn->paymentUsingInterbank( $companyId = 'NI001', $parentCompanyId = 'KSEI', $accountNumber = '0115476117', $beneficiaryAccountNumber = '3333333333', $beneficiaryAccountName = 'KEN AROK', // Get from Inquiry Interbank Account $beneficiaryBankCode = '014', $beneficiaryBankName = 'BANK BCA', // Get from Inquiry Interbank Account $amount = 15000, )
2.2.G P2P 借贷服务(RDL)
创建 RDL
类对象
use BniApi\BniPhp\Bni; use BniApi\BniPhp\api\RDL; $bni = new Bni( $env = 'sandbox', // dev, sandbox, prod $clientId = '{your-client-id}', $clientSecret = '{your-client-secret}', $apiKey = '{your-api-key}', $apiSecret = '{your-api-secret}', $appName = '{your-app-name}' ); $rdl = new RDL( $bni = '{instance-of-bni-class}', $privateKeyPath = '{your-path-private-key}', $channelId = '{your-channel}' );
人脸识别
$faceRecognition = $rdl->faceRecognition( $companyId = 'SANDBOX', $parentCompanyId = 'STI_CHS', $firstName = 'MOHAMMAD', $middleName = 'BAQER', $lastName = 'ZALQAD', $idNumber = '0141111121260118', // Identity Number (KTP only) $birthDate = '29-09-2021', // format : DD-MM-YYYY $birthPlace = 'BANDUNG', $gender = 'M', // “M” or “F” $cityAddress = 'Bandung', $stateProvAddress = 'Jawa Barat', $addressCountry = 'ID', // e.g.: “ID” $streetAddress1 = 'bandung', $streetAddress2 = 'bandung', $postCodeAddress = '40914', $country = 'ID', // e.g.: “ID” $selfiePhoto = '29mdHdhcmUAd3d3Lmlua3NjYXBlLm9yZ5vuP', // Base64 encoded selfie photo );
注册投资者
$registerInvestor = $rdl->registerInvestor( $companyId = 'SANDBOX', $parentCompanyId = 'STI_CHS', $uuidFaceRecog = '492F33851D634CFB', // RequestUuid successed value from Face Recognition API (KYC valid) $title = '01', $firstName = 'Agus', $middleName = '', $lastName = 'Saputra', $optNPWP = '1', // “1” or “0” (Default “1”) $NPWPNum = '001058893408123', $nationality = 'ID', // e.g.: “ID” $domicileCountry = 'ID', // e.g.: “ID” $religion = '2', $birthPlace = 'Semarang', $birthDate = '14081982', // DDMMYYYY $gender = 'M', // “M” or “F” $isMarried = 'S', $motherMaidenName = 'Dina Maryati', $jobCode = '01', $education = '07', $idType = '01', $idNumber = '4147016201959998', // Identity Number (KTP only) $idIssuingCity = 'Jakarta Barat', $idExpiryDate = '26102099', // ddMMyyyy $addressStreet = 'Jalan Mawar Melati', $addressRtRwPerum = '003009Sentosa', $addressKel = 'Cengkareng Barat', $addressKec = 'Cengkareng/Jakarta Barat', $zipCode = '11730', $homePhone1 = '0214', // Area code, e.g. 021 (3 - 4 digit) If not exist, fill with “9999” $homePhone2 = '7459', // Number after area code (min 4 digit) If not exist, fill with “99999999” $officePhone1 = '', // Area code, e.g. 021 $officePhone2 = '', // Number after area code $mobilePhone1 = '0812', // Operator code, e.g. 0812 (4 digit) If not exist, fill with “0899” $mobilePhone2 = '12348331', // Number after operator code (min 6 digit) If not exist, fill with “999999” $faxNum1 = '', // Area code, e.g. 021 $faxNum2 = '', // Number after area code $email = 'agus.saputra@gmail.com', $monthlyIncome = '8000000', $branchOpening = '0259', $institutionName = 'PT. BNI SECURITIES', $sid = 'IDD280436215354', $employerName = 'Salman', // Employer Name / Company Name $employerAddDet = 'St Baker', // Employer street address / home street address $employerAddCity = 'Arrandelle', // Employer city address / home city address $jobDesc = 'Pedagang' // Current investor job, $ownedBankAccNo = '0337109074', // Investor’s owned bank account $idIssuingDate = '10122008' // Issue date, e.g.: “10122016” );
注册投资者的账户
$registerInvestorAccount = $rdl->registerInvestorAccount( $companyId = 'NI001', $parentCompanyId = 'KSEI', $cifNumber = '9100749959', $currency = 'IDR', $openAccountReason = '2', $sourceOfFund = '1', $branchId = '0259', $bnisId = '19050813401', $sre = 'NI001CX5U00109', )
查询账户信息
$inquiryAccountInfo = $rdl->inquiryAccountInfo( $companyId = 'NI001', $parentCompanyId = 'KSEI', $accountNumber = '0115476117' )
查询账户余额
$inquiryAccountBalance = $rdl->inquiryAccountBalance( $companyId = 'NI001', $parentCompanyId = 'KSEI', $accountNumber = '0115476117' )
查询账户历史
$inquiryAccountHistory = $rdl->inquiryAccountHistory( $companyId = 'NI001', $parentCompanyId = 'KSEI', $accountNumber = '0115476117' )
使用转账进行支付
$paymentUsingTransfer = $rdl->paymentUsingTransfer( $companyId = 'NI001', $parentCompanyId = 'KSEI', $accountNumber = '0115476117', $beneficiaryAccountNumber = '0115471119', $currency = 'IDR', // e.g., “IDR” $amount = 11500, $remark = 'Test RDN' // Recommended for the reconciliation purpose )
查询支付状态
$inquiryPaymentStatus = $rdl->inquiryPaymentStatus( $companyId = 'NI001', $parentCompanyId = 'KSEI', $requestedUuid = 'E8C6E0027F6E429F' // UUID that has been processed before )
使用清算进行支付
$paymentUsingClearing = $rdl->paymentUsingClearing( $companyId = 'NI001', $parentCompanyId = 'KSEI', $accountNumber = '0115476117', $beneficiaryAccountNumber = '3333333333', $beneficiaryAddress1 = 'Jakarta', $beneficiaryAddress2 = '', $beneficiaryBankCode = '140397', $beneficiaryName = 'Panji Samudra', $currency = 'IDR', // e.g., “IDR” $amount = 15000, $remark = 'Test kliring', // Recommended for the reconciliation purpose $chargingType = 'OUR' )
使用RTGS进行支付
$paymentUsingRTGS = $rdl->paymentUsingRTGS( $companyId = 'NI001', $parentCompanyId = 'KSEI', $accountNumber = '0115476117', $beneficiaryAccountNumber = '3333333333', $beneficiaryAddress1 = 'Jakarta', $beneficiaryAddress2 = '', $beneficiaryBankCode = 'CENAIDJA', $beneficiaryName = 'Panji Samudra', $currency = 'IDR', // e.g., “IDR” $amount = 120000000, $remark = 'Test rtgs', // Recommended for the reconciliation purpose $chargingType = 'OUR' )
查询跨行账户
$inquiryInterbankAccount = $rdl->inquiryInterbankAccount( $companyId = 'NI001', $parentCompanyId = 'KSEI', $accountNumber = '0115476117', $beneficiaryBankCode = '013', $beneficiaryAccountNumber = '01300000', )
使用跨行进行支付
$paymentUsingInterbank = $rdl->paymentUsingInterbank( $companyId = 'NI001', $parentCompanyId = 'KSEI', $accountNumber = '0115476117', $beneficiaryAccountNumber = '3333333333', $beneficiaryAccountName = 'KEN AROK', // Get from Inquiry Interbank Account $beneficiaryBankCode = '014', $beneficiaryBankName = 'BANK BCA', // Get from Inquiry Interbank Account $amount = 15000, )
2.2.H BNI Digiloan 移动
创建 Bni Move
类对象
use BniApi\BniPhp\Bni; use BniApi\BniPhp\api\RDL; $bni = new Bni( $env = 'sandbox', // dev, sandbox, prod $clientId = '{your-client-id}', $clientSecret = '{your-client-secret}', $apiKey = '{your-api-key}', $apiSecret = '{your-api-secret}', $appName = '{your-app-name}' );
预筛选
$bniMove = new BniMove($bni) $prescreening = $bniMove->prescreening( $kodeMitra = 'BNI', $npp = '', $namaLengkapKtp = 'Muhammad Haikal Madani', $noKtp = '3174052209980002', $noHandphone = '085921658045', $alamatUsaha = 'jakarta', $provinsiUsaha = '06', $kotaUsaha = '143', $kecamatanUsaha = '1074', $kelurahanUsaha = '4254', $kodePosUsaha = '11450', $sektorEkonomi = '2', $totalPenjualan = 50000000, $jangkaWaktu = '12', $jenisPinjaman = '1', $maximumKredit = 50000000, $jenisKelamin = '1', $tanggalLahir = '1998-10-07', $subSektorEkonomi = '050111', $deskripsi = 'Usaha Ternak Perikanan', $Email = 'muhammadhaikalmadani@mail.com' );
保存图像
$bniMove = new BniMove($bni) $prescreening = $bniMove->saveImage( $Id = 'MJO2024022000004', $deskripsi = 'Foto Identitas KTP', $jenisDokumen = 'A03', $namaFile = 'Foto KTP', $extensionFile = 'png', $dataBase64 = '{image}' #convert your image to base64 );
获取帮助
- 数字服务
- API 文档
- Stackoverflow
- 找不到您想要的答案?请发送电子邮件至 apisupport@bni.co.id