awesome-payment
awesome payment
common sense
Payment method
Scan code to pay or main scan: that is, the C-end user主动
scans the merchant's payment code. This payment code is an order pre-generated by the payment institution. The merchant enters the payment amount, requests it to the payment institution, and then returns a link (this link Payment can be initiated in the payment APP) for merchants to test. The merchant displays the QR code generated by the link on the mobile POS machine or other screen device, and the user scans it and enters the payment password to complete the payment.
Payment code payment, QR code payment or barcode payment may be scanned: that is, the C-end user presents his or her payment QR code, and the merchant被动
obtains the barcode number through a code scanning gun or other equipment, and the merchant sets the barcode number and deduction amount. The request is sent to the payment institution, and then the payment institution deducts the money, initiates a payment confirmation window to the C-end user (small amounts may be password-free), and completes the payment.
JSAPI payment: JSAPI payment is when the user opens the H5 page defined by the merchant in the payment APP (WeChat, Alipay, Cloud QuickPass), and requests the back-end interface to request the payment to the collection institution based on the merchant information, payment amount, etc. Return relevant PayInfo string parameters (which include order number, merchant information on WeChat/Alipay/Cloud QuickPass and other platforms, verification signature, etc.). The H5 page has introduced the JS of WeChat/Payment Package/Cloud QuickPass in advance. SDK, call up the payment according to the parameters in PayInfo, enter the password, and the payment can be completed. The common multi-code-in-one台卡
of small and micro merchants on the market use this interface to achieve aggregate payment.
APP payment: APP payment, also known as mobile payment, is a model in which merchants integrate an open SDK into the mobile application APP to activate the WeChat payment module to complete payment.
Role
- Individual users: payers, consumers
- Merchant: terminal merchant, final payee
- Service provider: a third party, an aggregated payment service provider that has a payment license and is capable of collecting payments.
- Collection agency
- clearing center
- Netlink: An online payment and clearing platform for non-bank payment institutions, referred to as Netlink. Netlink replaced the previous model of direct connection between third-party payment companies and banks. As a clearing platform, Wanglian connects to third-party payment companies on one end and the banking system on the other.
- UnionPay
In fact, it is also possible for fourth, fifth, and sixth parties to emerge, because technically they are aggregation payment technology companies that can do transfers or support multiple payment channels, subject to legal permission. As long as you do not participate in illegal liquidation, this is also the way for many aggregate payments on the market to survive.
Behavior
- Liquidation: liquidation + settlement
- Clearing: accounting + sending instructions + settling accounts
- Settlement: Deduction + Transfer
MCC industry code
MCC, the full name is Merchant Category Code. That is, the merchant industry code represents the industry in which the merchant is located. The classification code uniformly set by China UnionPay and used by various payment institutions and banks, together with other specific information, constitutes the merchant number of the merchant's POS machine.
- MCC Inquiry-China UnionPay Open Platform
Settlement type
- Corporate: The company signs a contract with a third-party payment company in its name and provides the company's corporate bank account.
- Private: An individual signs a contract with a third-party payment company to provide the personal bank account of the merchant's legal person or designated person.
Provision
Accounts opened by third-party payment companies in various banks are usually used as monetary funds pre-deposited or retained in banking institutions, as well as monetary funds collected or paid by payment institutions on behalf of customers.
Erqing
- What does second clearing mean in the payment industry? Can't a third-party agency handle the second clearance?
handling fee
- Guaranteed rate: the handling rate that must be charged if the transaction amount is relatively small
- Capped fee: the highest handling fee charged for large transactions (each channel may charge different fees)
bank abbreviation
Receipt
t+1为第二个工作日到账;
t+0为当天工作日到账;
d+1为第二天到账(包含休息日,节假日);
d+0为全年当天到账(包含休日,节假日);
Pay on behalf of
Merchant system fund payment
User information
- openid is the unique user ID of a WeChat user under the public account appid (different appids will result in different openids). It can be used to permanently mark a user. It is also a required parameter for WeChat JSAPI payment.
- buyer_id
- userId
Fill order
Reconciliation
- Unilateral accounts and bilateral accounts
- How to make a reconciliation system
channel
- Ant Financial Open Platform
- WeChat payment development documentation
- WeChat Open Community-WeChat Pay
- China UnionPay Open Platform
- remittance to the world
Cross-border payment
A little introduction to strictly investigate and severely fine cross-border payment "driving without a license" 2018 third-party cross-border payment industry research report
in principle
- Judgment of payment results: success only if success is clear, failure only if failure is clear, and payment in progress if the status is unknown.
- In code design, pay attention to the conversion of external interfaces by the glue layer, and the preservation of original data at the log or data level. Do not over-digest the data and abstract it appropriately (because you may encounter a situation where a field is converted back and pieced together)
Possible pitfalls
- The interface caused by the change of the upstream channel domain name or IP is unavailable. If there is no perfect monitoring or switching to the backup channel or domain name, you can only look at it with a blank look and deal with the bug passively.
- Because of the first one, pay more attention to announcements related to payment channels, and pay attention to issues related to recharge or account expiration of your own server or domain name registration.
Safety
Encryption and decryption
- What are the mainstream digital certificate formats?
tool
- SSL tools and various encryption and decryption online algorithms - charges will start, not recommended
- Generation of RSA public and private keys and conversion of PKCS#1 and PKCE#8 formats
- Various encryption and decryption tools
- RSA private key and public key generation tool: Use the one-click generation tool provided by Alipay
- UnionPay number inquiry http://www.5cm.cn/bank/
- ID number verification query https://shenfen.supfree.net/
- Get the bank card's bank and logo icon based on the bank card number
- Bank card authenticity verification https://ccdcapi.alipay.com/validateAndCacheCardInfo.json?_input_charset=utf-8&cardNo=6217002430035835629&cardBinCheck=true
- Get the bank's logo based on the bank's abbreviation https://apimg.alipay.com/combo.png?d=cashier&t=ABC
- A set of auxiliary tools provided by China UnionPay Open Platform
- WeChat Payment API v3 Postman Script Usage Guide
System architecture
- Guidelines for cross-city redundancy upgrade of WeChat payment merchant system
Foreign payment platform tools
- stripe
- Paypal
- Perfectmoney
- Advcash
- Webmoney
- Okey
- Fasapay
- Tether
- Bitcoin
- Payeer
- Global payment tool list reference >> https://www.shopify.com/payment-gateways
Aggregated payment package (library)
- Javen205/IJPay IJPay makes payment at your fingertips, encapsulating common payment methods such as WeChat payment, Alipay payment, UnionPay payment and various commonly used interfaces
- Payum/PayumPHP 7+ Payment processing library. It offers everything you need to work with payments: Credit card & offsite purchasing, subscriptions, payouts etc. - provided by Forma-Pro
- Exrick / xpay
- phoenixg/omnipay-pingpp integrates Alipay (APP, Wap, PC, instant payment, scan code, corporate payment), WeChat (APP, official account, red envelope), UnionPay relationship, UnionPay corporate online banking, Apple Pay, QQ wallet, Aggregated payment gateway for domestic mainstream payment channels such as Yibao Pay, Baidu Wallet, JD Pay, JD Baitiao, China Merchants Bank One Nettong, and installment payment.
- helei112g/paymentPayment is a PHP version of payment aggregation third-party SDK, which integrates WeChat payment, Alipay payment, and China Merchants Netcom payment. Provides a unified calling interface to facilitate quick access to various payment, inquiry, refund, and transfer capabilities. The server is connected to the payment function, which is convenient and fast
- laravel-pay is probably the most elegant laravel payment extension package for Alipay and WeChat that I have ever used.
- FastPay is a compact payment library that uses LiveData to integrate WeChat, Alipay, and UnionPay
Home page or blog
- Liang Chuan Blog: Being a monk is as good as becoming a Buddha - Former third-party payment practitioner, now blockchain practitioner
- Liangchuan Zhihu
- Jiesuanjun’s WeChat public account: jiesuanjun, click this link to open the QR code image
- LeShu aggregation payment documents
Payment platform architecture
- Some thoughts on the architecture design of payment platform
- "58 Home Payment System Architecture and Practice" Cai Min.pdf
- Liu Heng-Evolution of Box Technology Aggregated Payment System.pdf
- Li Shengjun-Evolution of Midea's payment architecture.pdf
- Core points and best practices for payment platform architecture design review.pdf
- Mafengwo payment center architecture evolution
books
- Payment Lecture Hall China Payment Association Training Course Selection Series
- Mobile payment user experience design
- Mobile payment theory and practice
- Deep payment
- Mobile Finance: Payment Revolution
- Internet finance trendsetter: third-party payment
- Ant Financial: From Alipay to the new financial ecosystem
- The essence of Alipay experience design
Topic