Socket
Socket
Sign inDemoInstall

@os-utils/yandex-checkout

Package Overview
Dependencies
9
Maintainers
1
Versions
5
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    @os-utils/yandex-checkout

Yandex.Checkout API v3.


Version published
Weekly downloads
4
Maintainers
1
Install size
570 kB
Created
Weekly downloads
 

Readme

Source

@os-utils/yandex-checkout

Yandex.Checkout API v3.

Examples

Create a payment

const yandexCheckout = new YandexCheckout({
  shopId: 'shopId',
  secretKey: 'secretKey',
})

const payment = await yandexCheckout.payments.create({
  amount: {
    value: '2.00',
    currency: 'RUB',
  },
  payment_method_data: {
    type: 'bank_card',
  },
  confirmation: {
    type: 'redirect',
    return_url: 'https://www.merchant-website.com/return_url',
  },
  description: 'Order No. 1',
}, 'idempotenceKey')

Create a recurring payment

// Create a payment and save a payment method
const firstPayment = await yandexCheckout.payments.create({
  amount: {
    value: '2.00',
    currency: 'RUB',
  },
  payment_method_data: {
    type: 'bank_card',
  },
  confirmation: {
    type: 'redirect',
    return_url: 'https://www.merchant-website.com/return_url',
  },
  description: 'Order No. 1',
  save_payment_method: true,
  capture: true,
}, 'idempotenceKey')

// Using the saved payment method, create a recurring payment
const secondPayment = await yandexCheckout.payments.create({
  amount: {
    value: '2.00',
    currency: 'RUB',
  },
  payment_method_id: firstPayment.payment_method.id,
  description: 'Order No. 2',
  capture: true,
}, 'idempotenceKey')

Supported methods

  • payments.create
  • payments.list
  • payments.get
  • payments.capture
  • payments.cancel
  • refunds.create
  • refunds.list
  • refunds.get
  • receipts.create
  • receipts.list
  • receipts.get

References

  • Yandex.Checkout API Reference
  • Yandex.Checkout API Documentation

FAQs

Last updated on 03 Nov 2020

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc