Integration via API
This page is about implementing the new Yandex.Checkout API: this method of setting up payment acceptance on your site is now default. The former protocol is still functioning (if you want to use it, write to the manager).
The new API is for those who wants to carry out the integration independently and customize their payment module and some CMSs.
Carrying out Integration
Step 1. Fill out settings
- First of all, sign up with Yandex.Checkout and log into your Merchant Profile (you will initially see there only application forms to fill out).
- Push Fill out under the Settings.
- Enter URL for notifications, an address in your system to which we will send you notifications.
- Push Save, then push Send (you can fill out your online sales register's settings later: payment testing will work without them).
- Fill out information about your company (you need it for entering into the contract) and send it to us for review.
When both applications are sent (your technical settings and information about your company) a demo store will appear in your Merchant Profile.
Step 2. Configure your Demo Store
1. To open its settings, push Stores and select Demo Store.
2. Under the Settings section, specify the URL in your system for our notifications about successful payments. We recommend you to use different URLs for test and real operations.
3. Issue a secret key for your Demo Store. How to issue the key
Step 3. Implement interaction via the Yandex.Checkout API
Step 4. Perform testing payments
Using Demo Store, you can test payments from Yandex.Money Wallets and with bank cards.
1. Enter the testing data for authentication in Yandex.Checkout on your side:
- secret key from Demo Store
- Demo Store's ID.
2. Make a purchase as your client will do it: go to your online store, add a product to the shopping cart, push Pay.
Use demo card's details to make the payment. You won't need a demo Wallet: payments via Demo Store do not require a real Wallet.
Demo card: 1111111111111026
When paying at our Demo Store, everything functions as it will do for real payments: you get all notifications from us, but the money is not transferred anywhere.
Important: Demo Store remains awailable at any time, you can always use it to test the payment process. Be careful: do not give away the product paid for via Demo Store. To avoid mistakes, you can use a special URL for our notificaitons about testing payments (specify this URL under your Demo Store settings in your Merchant Profile).
Note: a payment goes through two stages. Initially you make a request for a payment, then you need to confirm or cancel it. If you do not confirm it within 6 hours, the payment will return to the user.
(You can perform payments at one stage, without confirmation: to do so, transmit capture=true in the initial request. See documentation for details)
Step 5. Check refunds are working
Make a refund from your Merchant Profile (for starters, via Demo Store). If you are going to make refunds via API, check everything works. Documentation on refunds
Step 6. Let us know, you are all set
When you check everything works, tell your manager to switch real payments on for you.