Used to check for browser translation.
用于检测浏览器翻译。
ブラウザの翻訳を検出する

Core Concepts


Before diving into specific examples, it's helpful to understand the fundamental concepts that underpin the Payment Kit SDK. This section covers the SDK's organization, how to manage test and live environments, and the proper way to handle potential errors. Mastering these concepts will enable you to build reliable and scalable payment integrations.

Core SDK Concepts

Your Application

payment SDK Object

SDK Structure

Environments (Test/Live)

Error Handling (try/catch)

Resource Groups (e.g., customers, products)

API Methods (.list(), .create())


SDK Structure#

The Payment Kit SDK is designed with a clear and consistent structure. The main payment object serves as the entry point, providing access to various resource modules. Each module, such as payment.customers or payment.products, groups related API functions together, making the SDK intuitive to explore and use.

For a detailed breakdown of the available modules, see the SDK Structure documentation.

Environments#

Payment Kit operates in two distinct environments: live for real transactions and test for development and integration testing. All API requests are executed in one of these modes. You can easily switch between them to ensure your integration is working correctly before going live.

Learn how to configure your environment in the Environments guide.

Error Handling#

Network issues or invalid data can cause API requests to fail. A robust application must anticipate and handle these errors gracefully. The SDK throws exceptions when errors occur. We recommend using a try...catch block to manage these situations, preventing application crashes and providing clear feedback to users.

For best practices and detailed examples, refer to the Error Handling guide.


With a solid grasp of these core concepts, you are well-prepared to start building with the Payment Kit SDK.

To see these concepts in action, proceed to our Usage Guides for practical, step-by-step examples.