Loading…

Toutiao/Douyin Mini Program payment configuration

This tutorial is an early version of Toutiao Mini Program**"Mini Program Checkout"** Function, now Toutiao has abandoned this payment access method, it is recommended that you update to the one recommended by Toutiao **"Byte Mini Program Guaranteed Payment"**: >>> [https://www.yuque.com/apifm/doc/ky2bx1](https://www.yuque.com/apifm/doc/ky2bx1) The effect is as follows: ![](https://dcdn.it120.cc/yuque/0/2020/png/572726/1581934960909-57b0b8b3-6168-4939-810a-a11d3629952a.png) # Developer platform activates payment Toutiao/Douyin Mini Program, after completing the developer certification, you can apply to activate the payment function: ![](https://dcdn.it120.cc/yuque/0/2020/png/572726/1581832590720-23a20c08-1ebf-4367-97c0-157c102533ab.png) #Backend configuration payment Fill in the three pieces of information obtained in the previous step into the "apifm" background, and activate the mini program payment interface. ![](https://dcdn.it120.cc/yuque/0/2020/png/572726/1581832669937-2660aaa0-61d4-496b-9c68-332875711eea.png) Toutiao/Douyin Mini Program itself does not have payment functions. If you want to realize online payment, you must also activate Alipay payment, WeChat payment or bank card payment. For details, please view the official documentation: [https://microapp.bytedance.com/dev/cn/mini-app/develop/open-capacity/payment/mini-app-pay-plugin-reference/application-for-payment](https://microapp.bytedance.com/dev/cn/mini-app/develop/open-capacity/payment/mini-app-pay-plugin-reference/application-for-payment) ## Configure Alipay payment [https://www.yuque.com/apifm/doc/znioys](https://www.yuque.com/apifm/doc/znioys) ## Configure WeChat payment Go to [WeChat Merchant Platform](https://pay.weixin.qq.com/index.php/core/home/login?return_url=%2F) to apply for WeChat H5 payment After applying for WeChat H5 payment, you need to configure the H5 payment domain name. + Configuration process: Please log in to the merchant platform corresponding to the WeChat merchant account - "Product Center" - "Development Configuration" to configure it yourself. + H5 payment domain name: Configure the following domain name into the H5 payment domain name in the WeChat merchant platform - snssdk.com Finally, log in to the backend, fill in your WeChat payment merchant number and secret key in the left menu and WeChat settings. # Error troubleshooting If you still cannot pay after following the above tutorial, please enable the payment debugging function: [https://microapp.bytedance.com/dev/cn/mini-app/develop/open-capacity/payment/tt.pay](https://microapp.bytedance.com/dev/cn/mini-app/develop/open-capacity/payment/tt.pay) ```javascript Add _debug = 1 to the tt.pay method ```