# Overview (https://elepay-docs.elestyle.workers.dev/) ## Getting Started The essential steps from account setup to making your first API calls. - [Account Setup](https://elepay-docs.elestyle.workers.dev/get-started/set-up) - [Quick Start](https://elepay-docs.elestyle.workers.dev/get-started/quickstart) - [Payment Processing](https://elepay-docs.elestyle.workers.dev/get-started/process) - [Refund Processing](https://elepay-docs.elestyle.workers.dev/get-started/refunds) - [Test Cards](https://elepay-docs.elestyle.workers.dev/get-started/test-card) - [Error Codes](https://elepay-docs.elestyle.workers.dev/get-started/error-code) ## Use Cases Step-by-step implementations for common payment scenarios. - [Checkout](https://elepay-docs.elestyle.workers.dev/cases/checkout) - [Create a Customer and Invite Card Registration](https://elepay-docs.elestyle.workers.dev/cases/customer) - [Integrate with EC Platform](https://elepay-docs.elestyle.workers.dev/cases/ec-cube-plugin) ## Developer Guides References for SDKs, APIs, Webhooks, and everything you need to build. - [Best Practices](https://elepay-docs.elestyle.workers.dev/cases/best-practices) - [Authentication / API Guide](https://elepay-docs.elestyle.workers.dev/guides/api-guide) - [API Reference](https://elepay-docs.elestyle.workers.dev/openapi) - [Webhook](https://elepay-docs.elestyle.workers.dev/guides/webhook) - [Terminal Payments](https://elepay-docs.elestyle.workers.dev/guides/terminals) - [Extra Payment Parameters](https://elepay-docs.elestyle.workers.dev/guides/extra-setting) - [iOS / Android](https://elepay-docs.elestyle.workers.dev/guides/mobile/ios) - [Other SDKs](https://elepay-docs.elestyle.workers.dev/guides/javascript) ## FAQ See frequently asked questions for more help. - [Server FAQ](https://elepay-docs.elestyle.workers.dev/faq/faq-server) - [iOS FAQ](https://elepay-docs.elestyle.workers.dev/faq/faq-ios) - [Android FAQ](https://elepay-docs.elestyle.workers.dev/faq/faq-android) # Overview (https://elepay-docs.elestyle.workers.dev/openapi) ## Payments Create and manage payment codes, charges, refunds, and disputes. - [Codes](https://elepay-docs.elestyle.workers.dev/openapi/code/createCode) - [CodeSetting](https://elepay-docs.elestyle.workers.dev/openapi/codesetting/listCodePaymentMethods) - [Charges](https://elepay-docs.elestyle.workers.dev/openapi/charge/listCharges) - [Refunds](https://elepay-docs.elestyle.workers.dev/openapi/refund/listChargesRefunds) - [Disputes](https://elepay-docs.elestyle.workers.dev/openapi/dispute/listDisputes) - [PaymentMethods](https://elepay-docs.elestyle.workers.dev/openapi/paymentmethod/listPaymentMethods) ## Merchants Manage merchant locations and store-level settings. - [Locations](https://elepay-docs.elestyle.workers.dev/openapi/location/listChargeLocations) ## Customers Create and manage customers and their saved payment methods. - [Customers](https://elepay-docs.elestyle.workers.dev/openapi/customer/listCustomers) - [Sources](https://elepay-docs.elestyle.workers.dev/openapi/customer/listSources) ## Terminal Register and operate in-store payment terminals. - [Square](https://elepay-docs.elestyle.workers.dev/openapi/terminal/listLocations) ## Services Issue invoices and manage recurring subscriptions. - [Invoices](https://elepay-docs.elestyle.workers.dev/openapi/invoice/listInvoices) - [Subscriptions](https://elepay-docs.elestyle.workers.dev/openapi/subscription/listSubscriptions) # Best Practices (https://elepay-docs.elestyle.workers.dev/cases/best-practices) Recommendations for a stable EasyCheckout integration. Differences between payment methods and internal processing are absorbed by elepay, so you only need to check the **final charge result**. ## Integration sequence [#integration-sequence] ```text sequenceDiagram autonumber participant S as Merchant server participant C as Customer participant E as elepay S->>E: Create EasyQR code (orderNo, amount) E-->>S: code (id, codeUrl) S->>C: Show QR code / Checkout C->>E: Scan QR and pay E-)S: Webhook: charge.succeeded / charge.revoked S-->>E: 2xx Note over E,S: Non-2xx → auto-retry:
1min ×3, then 10min ×2.
Fallback: reconcile via sync API ``` The merchant server creates an EasyQR code, shows it to the customer, the customer pays, and elepay notifies the result via Webhook. See the best practices below for how to handle it. ## Status lifecycle [#status-lifecycle] ```text flowchart TD A(["Create EasyQR code"]) --> P["pending / unpaid"] P -->|"customer scans QR and pays"| D{"payment result"} D -->|"settled"| C["captured / paid"] D -->|"failed"| F["closed / revoked"] P -->|"expired / Close EasyQR code"| F C -.->|"Webhook"| WS(["charge.succeeded"]) F -.->|"Webhook"| WR(["charge.revoked"]) ``` ## Best practices [#best-practices] ### 1. Treat the Webhook as the single source of truth [#1-treat-the-webhook-as-the-single-source-of-truth] * Always verify the `elepay-signature` (HMAC-SHA256) of the received [Webhook](https://elepay-docs.elestyle.workers.dev/guides/webhook) before processing. * The redirect `status` parameter is for page transition only. Do not use it for result determination; determine the result from the final events `charge.succeeded` (success) / `charge.revoked` (revoked). ### 2. Process the Webhook idempotently and return 2xx quickly [#2-process-the-webhook-idempotently-and-return-2xx-quickly] * The same event may be re-delivered, so make processing idempotent (keyed by `orderNo`, etc.) to avoid double processing. * Offload heavy work to async; return 2xx immediately on receipt. A 4xx / 5xx triggers automatic retries (every 1 min x3 -> every 10 min x2). ### 3. Prepare a reconciliation fallback for missed events [#3-prepare-a-reconciliation-fallback-for-missed-events] * In case a Webhook is not delivered, implement a path to reconcile the result via a sync API such as [Retrieve EasyQR code](https://elepay-docs.elestyle.workers.dev/openapi/code/retrieveCode). Do not rely on the Webhook alone. ### 4. Set a unique `orderNo` per order [#4-set-a-unique-orderno-per-order] * Set a unique `orderNo` per order in [Create EasyQR code](https://elepay-docs.elestyle.workers.dev/openapi/code/createCode). It is used to match the order on Webhook receipt and prevents duplicate creation for the same `orderNo`. ### 5. Determine amount and currency on the server side [#5-determine-amount-and-currency-on-the-server-side] * Create the code on the server side (secret key) and limit the public key to client-side display. Do not let the client decide the amount, to prevent tampering. ### 6. Verify in Test mode before going Live [#6-verify-in-test-mode-before-going-live] * Switch between Test / Live and verify the full flow, including Webhook receipt, in Test mode before switching to Live. ### 7. Design the expiry and failure flows [#7-design-the-expiry-and-failure-flows] * Set an expiry appropriate to your use case. When the expiry is reached, an unsettled (`pending`) payment is revoked and `charge.revoked` is notified. * On expiry or failure, provide a recovery path for the customer, such as regenerating the QR code. # Create a Customer and Invite Card Registration (https://elepay-docs.elestyle.workers.dev/cases/customer) By using elepay’s Customer feature, you can create customers to support recurring billing or to charge using registered payment methods. The Customer feature uses both the Client SDK and the API. Customer creation flow overview ![](https://elepay-docs.elestyle.workers.dev/docs/9e0464f-Screen_Shot_2020-08-26_at_0.48.22.png) # Create a customer via API [#create-a-customer-via-api] ## 1. Register a payment method [#1-register-a-payment-method] The end user registers a payment method in a mobile app or on the web. ## 2. Create the customer [#2-create-the-customer] Your server calls [Create Customer](https://elepay-docs.elestyle.workers.dev/openapi/customer/createCustomer) to create a customer linked to the user. If you need to register multiple payment methods, reuse the existing customer. ## 3. Create a Source object [#3-create-a-source-object] Your server calls [Create Source](https://elepay-docs.elestyle.workers.dev/openapi/customer/createSource) to create a Source object. ## 4. Pass the Source object [#4-pass-the-source-object] Your server returns the Source object from elepay to the Client SDK on the client. ## 5. Registration (authorization) [#5-registration-authorization] The Client SDK runs the registration process using the Source object. ## 6. Registration (authorization) result [#6-registration-authorization-result] After registration completes, the selected payment channel server returns the result. ## 7. Receive webhook event [#7-receive-webhook-event] If registration succeeds, elepay sends an event notification to the configured webhook URL. ## 8. Charge recurrently [#8-charge-recurrently] Using `CustomerId` and `SourceId`, your server calls [Create Charge](https://elepay-docs.elestyle.workers.dev/openapi/charge/createCharge) to process payments. > 📘 Supported payment methods for registration > > Currently supported methods: > > * Credit Card > * Paidy > > The following payment methods require separate applications > * PayPay > * merpay > * au PAY > * d払い > * WeChat > * Alipay+ # Android FAQ (https://elepay-docs.elestyle.workers.dev/faq/faq-android) ## How does the elepay Android SDK support Google Play's 16KB requirement? [#how-does-the-elepay-android-sdk-support-google-plays-16kb-requirement] The elepay Android SDK already supports the 16KB alignment requirement; however, APKs for the x86\_64 architecture require separate handling. Since there are almost no physical x86\_64 devices in the market, please exclude x86\_64 using the following approach: ```kotlin android { defaultConfig { ndk { abiFilters += listOf("arm64-v8a", "armeabi-v7a") // Remove "x86_64" } } } ``` If the app still encounters Google Play 16KB alignment issues, please follow the steps below to confirm whether it is caused by other third-party dependencies in the app: ``` 1. > ./gradlew :app:assembleDebug // The packaged APK is located at: app/build/outputs/apk/debug/xxx.apk 2. > check_elf_alignment.sh xxx.apk // The sh script can be obtained from Google's official site: https://developer.android.com/guide/practices/page-sizes#elf-alignment ``` A portion of the elepay Android SDK output is shown below, which meets Google Play's 16KB alignment requirement. ``` === ELF alignment === ....../lib/armeabi-v7a/libentryexpro.so: \e[31mUNALIGNED\e[0m (2**12) ....../lib/armeabi-v7a/libsurface_util_jni.so: \e[32mALIGNED\e[0m (2**14) ....../lib/armeabi-v7a/libmlkit_google_ocr_pipeline.so: \e[31mUNALIGNED\e[0m (2**12) ....../lib/armeabi-v7a/libtensorflowlite_jni.so: \e[31mUNALIGNED\e[0m (2**12) ....../lib/armeabi-v7a/libimage_processing_util_jni.so: \e[32mALIGNED\e[0m (2**14) ....../lib/armeabi-v7a/libuptsmaddon.so: \e[31mUNALIGNED\e[0m (2**12) ....../lib/arm64-v8a/libentryexpro.so: \e[32mALIGNED\e[0m (2**16) ....../lib/arm64-v8a/libsurface_util_jni.so: \e[32mALIGNED\e[0m (2**14) ....../lib/arm64-v8a/libmlkit_google_ocr_pipeline.so: \e[32mALIGNED\e[0m (2**14) ....../lib/arm64-v8a/libtensorflowlite_jni.so: \e[32mALIGNED\e[0m (2**16) ....../lib/arm64-v8a/libimage_processing_util_jni.so: \e[32mALIGNED\e[0m (2**14) ....../lib/arm64-v8a/libuptsmaddon.so: \e[32mALIGNED\e[0m (2**16) \e[31mFound 4 unaligned libs (only arm64-v8a/x86_64 libs need to be aligned).\e[0m ===================== ``` # iOS FAQ (https://elepay-docs.elestyle.workers.dev/faq/faq-ios) ## After integrating the elepay iOS SDK, how much will the app size increase? [#after-integrating-the-elepay-ios-sdk-how-much-will-the-app-size-increase] The elepay iOS SDK supports Bitcode. If the app you are integrating supports Bitcode, the size increases by about 15 MB. If Bitcode is not supported, it increases by about 50 MB. ## Does the elepay iOS SDK support Apple Watch? [#does-the-elepay-ios-sdk-support-apple-watch] We do not currently support WatchKit or App Extensions. ## When paying with Apple Pay, Error Code 10100 "Unsupported payment method" occurs [#when-paying-with-apple-pay-error-code-10100-unsupported-payment-method-occurs] Possible causes: 1. The iOS device hardware does not support Apple Pay, or parental controls have restricted the Apple Pay feature. 2. No usable credit card is registered in the user's Apple Wallet (Visa / Mastercard / American Express / JCB *). Even if the physical card shows one of the brands above, it cannot be used if the card image in Apple Wallet does not display that brand. * JCB is supported only for merchants who have separately passed onboarding review. 3. In Xcode settings, ensure Apple Pay is enabled and confirm that you have uploaded the [Apple Pay certificate](https://elepay-docs.elestyle.workers.dev/guides/mobile/payment-methods-config#apple-pay) to the elepay dashboard. ![](https://elepay-docs.elestyle.workers.dev/docs/d3028f3-ELEPayExample_xcodeproj.png) 1. In Objective-C projects where ElepaySDK for iOS is integrated manually, required system frameworks may not be added automatically. If the problem persists after clearing the points above, try adding "PassKit.framework" manually and test again. ![](https://elepay-docs.elestyle.workers.dev/docs/81e5331-ELEPayExample_xcodeproj.png) # Server FAQ (https://elepay-docs.elestyle.workers.dev/faq/faq-server) ## Webhook [#webhook] | Item | Question | Answer | | ------------------ | -------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | Retry logic | If a webhook cannot be delivered, will it be retried? | Initially, retry 3 times at 1-minute intervals;
then retry 3 times at 10-minute intervals | | Configuration unit | Can we configure different URLs per store? | Configuration is at the application level. Use the locationId in the webhook notification to determine the store. | | Notification type | Are webhooks sent on payment failure? | There are no webhook notifications for payment failures.
When using charge, poll for the payment status in your backend and, if it becomes failed, design your flow to allow a new attempt.
When using EasyQR, if a failure occurs while the code is still valid, the user can select a payment method and try again; therefore waiting until the code expires is recommended | | Propagation time | Is it applied immediately after saving in the dashboard? | Yes, applied immediately.
Because multiple configurations are possible, we recommend deleting the old URL after the switch is complete | ## frontUrl [#fronturl] | Key Word | Question | Answer | | ----------------------- | --------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------- | | Browser tab | After payment completes and it navigates to frontUrl, does it open in the original tab or a new tab? | Credit card: navigates in the original tab.
When an app launches for code payments, the navigation to frontUrl opens in a new tab | | Private mode | If the browser opens in private mode, can it navigate to frontUrl correctly? | Yes, navigation works in private mode. | | Where navigation occurs | Does the navigation to frontUrl happen on the merchant’s QR display screen or on the user’s smartphone after payment? | Navigation occurs on the device that accesses the code URL, so it navigates on the user’s smartphone | | Navigation condition | Is navigation possible only when using checkout? | Navigation is triggered by accessing codeUrl, so it is also possible when using only the Code API | ## charge [#charge] | Key Word | Question | Answer | | --------------------- | -------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | Authorization/Capture | Can authorization and capture be performed at different times? | For credit cards and Apple Pay/Google Pay, yes.
【How to implement】
Set capture=false in create charge to obtain an authorization.
Finalize the sale via capture charge.
【Notes】
Credit cards and Google Pay support only equal-amount or reduced-amount captures.
Apple Pay supports only equal-amount captures | ## EasyQR [#easyqr] | Key Word | Question | Answer | | -------- | ---------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | orderNo | Can orderNo be duplicated? | orderNo must be unique within the same application. | | | What error code will be returned if a duplicate orderNo is sent? | Current behavior:
for a completed transaction, or when re-generating within the validity period of an already generated code with the same orderNo, the following error is returned:
`"code": "9_000_000_40022",`
`"errorCode": "M002007",`
`"message": "該当注文番号はすでに支払済み。"`
Therefore, you can re-create with an orderNo used for a transaction canceled via Close EasyQR or canceled due to expiration. | ## API keys [#api-keys] | Key Word | Question | Answer | | ----------------- | ------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | | Reissue | When an API key is reissued, is there an overlap period between the old and new keys? | They coexist for up to 3 days, but we recommend switching as soon as possible | | Management unit | Do we need to manage API keys separately for each store? | API keys are managed per application (brand). | | Secret/Public key | Do Create EasyQR code / Retrieve EasyQR code / Close EasyQR code all use the “secret key”? | All of Create EasyQR code / Retrieve EasyQR code / Close EasyQR code use the secret key.
It is used via either Basic or Bearer authentication. | | Secret/Public key | In the JavaScript SDK, is the key used in new Elepay(key, options) the “public key”? | The key specified for new Elepay(key, options) in the JavaScript SDK is the public key. It is used on the frontend for generating payment tokens, etc.; use the value labeled “Public Key” in the dashboard. | # Error Codes (Legacy / Deprecated) (https://elepay-docs.elestyle.workers.dev/get-started/error-code-legacy) **warn** The 5-digit error codes documented on this page are **deprecated**. For new integrations, please use the [new error code reference](/get-started/error-code). This page is kept for backward compatibility with existing integrations. This page explains the error codes that can occur in elepay. ## API HTTP Status Codes [#api-http-status-codes] Basically, three categories of status codes are returned. | Code | Description | | ------- | ------------------------------------------------------------------------------------------------------------------------- | | **2xx** | **Success** The request was accepted successfully | | **4xx** | **Client Error** The request from the client was invalid. | | **5xx** | **Server Error** The elepay server failed to process the request | ## Error Code Details [#error-code-details] | Code | Description | Details | Source | | --------- | ------------------------------------------------------------------------------------------------ | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------- | | **10000** | SDK not initialized. | | iOS SDK | | **10001** | This service is inactive. | Inactive application. Please wait until your application is approved by elepay. | API | | **10002** | This payment method is inactive. | Inactive payment method. Please wait until configuration in elepay is completed. | API | | **10003** | Invalid payment method. | The payment method is not supported by elepay. | API | | **10011** | SDK initialization has not finished yet. | We recommend initializing the elepay SDK as soon as your app starts. If you request a payment immediately after calling the SDK's initialization method, this error is likely to occur. | iOS SDK | | **10100** | Required payment method not supported by user device. | Example: The OS version is too old to support the method; Apple Pay is disabled on the device; or there is no valid credit card in the iOS Wallet. Note: This error also occurs if Apple Pay is not enabled in the Xcode build settings. | iOS SDK | | **10101** | Credit card was declined. | Example: Wrong card number, expired card, etc. | API, Android SDK, iOS SDK | | **10102** | Invalid amount. | The user entered an invalid amount (too large or too small), so the charge could not be processed. | API, Android SDK | | **10103** | Invalid charge ID. | | Android SDK | | **10104** | Invalid payload. | Could not parse the given payload data. The SDK received invalid data. | Android SDK, iOS SDK | | **10105** | Invalid payload (same as 10104; developers do not need to distinguish). | Could not parse the given payload data. The SDK received invalid data. | Android SDK, iOS SDK | | **10106** | Invalid resource. | The payload is not for the current platform. Example: Using a Web payload in an iOS app. | Android SDK, iOS SDK | | **10107** | Invalid status. | The payload status is not valid for processing. | Android SDK, iOS SDK | | **10108** | The charge has already been refunded. | | API | | **10109** | Not captured; refund refused. | | API | | **10100** | Payment method unsupported by user device. | Example: When using Apple Pay, the device has no supported credit card added or the device does not support Apple Pay at all. | iOS SDK, Android SDK | | **10110** | Third‑party payment app is not installed. | Example: PayPay or WeChat app is not installed. Handle this error and guide the user to the install page for a better experience. | iOS SDK, Android SDK | | **10111** | Not found. | Example: The charge ID cannot be found in the elepay system. | API | | **40012** | Order number is required. | | API | | **40013** | frontUrl is required. | | API | | **40015** | Buyer name is required. | | API | | **40018** | Buyer zip is required. | | API | | **40019** | Buyer address1 is required. | | API | | **40020** | Buyer address2 is required. | | API | | **40021** | Order number length is invalid (maximum 20 characters). | | API | | **40022** | The order number has already been used. | | API | | **40023** | Invalid currency. | | API | | **40024** | Product name is required. | | API | | **40025** | Partial refunds are not supported for this charge. | | API | | **40026** | Refunds are not supported for this charge. | | API | | **40027** | Invalid request body. | | API | | **40028** | Source is not supported for this payment method. | | API | | **40029** | Multiple sources are not supported for this payment method. | | API | | **40030** | Source ID or customer ID is invalid. | | API | | **40031** | The source ID is not suitable for the payment method. | | API | | **40034** | Multiple refunds are not supported for this charge. | | API | | **40035** | Invalid payment resource. | | API | | **40101** | Offline code has expired. | | API | | **40102** | Invalid offline code. | | API | | **40103** | Insufficient balance. | | API | | **40104** | Unsupported card. | | API | | **40105** | Charge has already been closed. | | API | | **40106** | Amount limit exceeded. | | API | | **40110** | Other offline error occurred. | | API | | **50000** | An error occurred on the elepay server. | | API | | **50001** | Payment provider error (API) or bad network (SDK). | | API, Android SDK, iOS SDK | | **50002** | Invalid data received. | Example: The data received is not from the elepay server. | Android SDK, iOS SDK, HTML5 SDK | | **50003** | An error occurred when communicating with the payment provider. | | API | # Error Codes (https://elepay-docs.elestyle.workers.dev/get-started/error-code) This is the list of `errorCode` values returned in elepay API responses. Error codes are categorized by their first character. * **M** : Merchant / API-side errors — issues such as malformed request payloads that should be fixed on the merchant side * **U** : User / Transaction errors — issues caused by the end user, such as card declines or insufficient balance * **S** : System errors — internal errors originating from elepay or the payment provider ```json { "generatedAt": "2026-09-09T15:16:18.327241130Z", "items": [ { "code": "M001000", "httpStatus": 400, "category": "merchant", "message": { "en": "There are problems with setting up the account.", "zh-TW": "存在帳戶設置問題。", "zh-CN": "存在账户设置问题。", "ja": "アカウントの設定に問題があります。" } }, { "code": "M001001", "httpStatus": 400, "category": "merchant", "message": { "en": "The payment method is not valid.", "zh-TW": "支付方法無效。", "zh-CN": "支付方法无效。", "ja": "決済方法は有効していません。" } }, { "code": "M001002", "httpStatus": 400, "category": "merchant", "message": { "en": "The payment method is incorrect.", "zh-TW": "支付方法不正確。", "zh-CN": "支付方法不正确。", "ja": "決済方法が正しくありません。" } }, { "code": "M001003", "httpStatus": 400, "category": "merchant", "message": { "en": "Terminal payment is not valid.", "zh-TW": "終端支付無效。", "zh-CN": "终端支付无效。", "ja": "端末決済は有効ではありません。" } }, { "code": "M001004", "httpStatus": 400, "category": "merchant", "message": { "en": "This payment method does not support authorization.", "zh-TW": "該支付方式不支持授權。", "zh-CN": "该支付方式不支持授权。", "ja": "該当決済方法は承認をサポートしていません。" } }, { "code": "M002001", "httpStatus": 400, "category": "merchant", "message": { "en": "Required parameters are missing.", "zh-TW": "缺少必要參數。", "zh-CN": "缺少必要参数。", "ja": "必要なパラメータがありません。" } }, { "code": "M002002", "httpStatus": 400, "category": "merchant", "message": { "en": "The value of the parameter provided is incorrect.", "zh-TW": "提供的參數值錯誤。", "zh-CN": "提供的参数值有误。", "ja": "提供されたパラメータの値が正しくありません。" } }, { "code": "M002003", "httpStatus": 400, "category": "merchant", "message": { "en": "The requested resource does not exist.", "zh-TW": "請求的資源不存在。", "zh-CN": "请求的资源不存在。", "ja": "要求されたリソースは存在しません。" } }, { "code": "M002004", "httpStatus": 400, "category": "merchant", "message": { "en": "The resource already exists.", "zh-TW": "資源已經存在。", "zh-CN": "资源已经存在。", "ja": "リソースが既に存在します。" } }, { "code": "M002005", "httpStatus": 400, "category": "merchant", "message": { "en": "Unsupported operation.", "zh-TW": "不支援的操作。", "zh-CN": "不支持的操作。", "ja": "サポートされていない操作。" } }, { "code": "M002006", "httpStatus": 400, "category": "merchant", "message": { "en": "The created resource exceeds the limit.", "zh-TW": "創建的資源超過限制。", "zh-CN": "创建的资源超过限制。", "ja": "作成されたリソースが制限を超えています。" } }, { "code": "M002007", "httpStatus": 400, "category": "merchant", "message": { "en": "The order number has already been paid.", "zh-TW": "該訂單號已經被支付。", "zh-CN": "该订单号已经被支付。", "ja": "該当注文番号はすでに支払済み。" } }, { "code": "M002009", "httpStatus": 400, "category": "merchant", "message": { "en": "This currency is not supported.", "zh-TW": "不支援此貨幣。", "zh-CN": "不支持此货币。", "ja": "該当通貨はサポートされていません。" } }, { "code": "M002010", "httpStatus": 400, "category": "merchant", "message": { "en": "This payment method does not support multiple authorizations.", "zh-TW": "該支付方式不支持多次授權。", "zh-CN": "该支付方法不支持多次授权。", "ja": "この支払い方法は複数の承認をサポートしていません。" } }, { "code": "M002012", "httpStatus": 400, "category": "merchant", "message": { "en": "The terminal of this readerId is not valid.", "zh-TW": "該readerId的終端不是有效的。", "zh-CN": "该readerId的终端不是有效的。", "ja": "このreaderIdの端末は有効ではありません。" } }, { "code": "M003000", "httpStatus": 400, "category": "merchant", "message": { "en": "The call method provided is incorrect.", "zh-TW": "提供的調用方法錯誤。", "zh-CN": "提供的调用方法有误。", "ja": "提供されたコールメソッドが正しくありません。" } }, { "code": "M004001", "httpStatus": 400, "category": "merchant", "message": { "en": "The API key provided is invalid.", "zh-TW": "提供的API金鑰無效。", "zh-CN": "提供的API密钥无效。", "ja": "提供されたAPIキーが無効です。" } }, { "code": "M004002", "httpStatus": 400, "category": "merchant", "message": { "en": "Required authentication parameters are missing.", "zh-TW": "缺少必要的認證參數。", "zh-CN": "缺少必要的认证参数。", "ja": "必要な認証パラメータがありません。" } }, { "code": "M004003", "httpStatus": 400, "category": "merchant", "message": { "en": "The requested operation is not allowed.", "zh-TW": "不允許的操作。", "zh-CN": "不允许的操作。", "ja": "要求された操作は許可されていません。" } }, { "code": "M005000", "httpStatus": 400, "category": "merchant", "message": { "en": "There have been too many requests in a short period of time.", "zh-TW": "請求過於頻繁。", "zh-CN": "请求太过频繁。", "ja": "短時間に多くの要求がありました。" } }, { "code": "M006000", "httpStatus": 400, "category": "merchant", "message": { "en": "The current status is invalid.", "zh-TW": "當前狀態無效。", "zh-CN": "当前状态无效。", "ja": "この操作は現在のステータスに対して実行できません。" } }, { "code": "M006001", "httpStatus": 400, "category": "merchant", "message": { "en": "Another operation is currently in progress.", "zh-TW": "另一個操作正在進行中。", "zh-CN": "另一个操作正在进行中。", "ja": "別の操作が進行中です。" } }, { "code": "M006002", "httpStatus": 400, "category": "merchant", "message": { "en": "The requested operation has already been completed.", "zh-TW": "請求的操作已經完成。", "zh-CN": "请求的操作已经完成。", "ja": "要求された操作はすでに終了しています。" } }, { "code": "M006003", "httpStatus": 400, "category": "merchant", "message": { "en": "The code has already been paid or cancelled.", "zh-TW": "該Code已經被支付或者取消。", "zh-CN": "该Code已经被支付或者取消。", "ja": "該当コードはすでに支払われたか、またはキャンセルされています。" } }, { "code": "M006004", "httpStatus": 400, "category": "merchant", "message": { "en": "This code has already expired.", "zh-TW": "該Code已經過期。", "zh-CN": "该Code已经过期。", "ja": "該当コードはすでに期限切れです。" } }, { "code": "M006005", "httpStatus": 400, "category": "merchant", "message": { "en": "The cancellation operation needs to be carried out on the terminal.", "zh-TW": "取消操作需要在終端上進行。", "zh-CN": "取消操作需要在终端上进行。", "ja": "キャンセル操作は端末上で行う必要があります。" } }, { "code": "M006006", "httpStatus": 400, "category": "merchant", "message": { "en": "The payment is in dispute and cannot be refunded.", "zh-TW": "該支付處於爭議中,無法退款。", "zh-CN": "该支付处于争议中,无法退款。", "ja": "この支払いは紛争中で、返金できません。" } }, { "code": "M006007", "httpStatus": 400, "category": "merchant", "message": { "en": "Payments that have been completed cannot be cancelled, please use the refund operation.", "zh-TW": "不能取消已經完成的支付,請使用退款操作。", "zh-CN": "不能取消已经完成的支付,请使用退款操作", "ja": "完了した支払いはキャンセルできません、返金操作を使用してください。" } }, { "code": "M007001", "httpStatus": 400, "category": "merchant", "message": { "en": "The merchant's transaction limit has been exceeded.", "zh-TW": "超過商戶交易限制。", "zh-CN": "超过商户交易限制。", "ja": "マーチャントの取引限度額を超えています。" } }, { "code": "M007002", "httpStatus": 400, "category": "merchant", "message": { "en": "The merchant's refund limit has been exceeded.", "zh-TW": "超過商戶退款上限。", "zh-CN": "超过商户退款上限。", "ja": "マーチャントの返金上限を超えています。" } }, { "code": "M008000", "httpStatus": 400, "category": "merchant", "message": { "en": "Unsupported web environment.", "zh-TW": "不支持的WEB環境。", "zh-CN": "不支持的WEB环境。", "ja": "サポートされていないウェブ環境。" } }, { "code": "S001000", "httpStatus": 500, "category": "system", "message": { "en": "There was an internal error.", "zh-TW": "發生了內部錯誤。", "zh-CN": "发生了内部错误。", "ja": "内部エラーが発生しました。" } }, { "code": "S001001", "httpStatus": 500, "category": "system", "message": { "en": "There was a problem connecting to the payment service. Please try again later.", "zh-TW": "連接支付服務時遇到問題,請稍候再試。", "zh-CN": "连接支付服务时遇到问题,请稍候再试。", "ja": "支払いサービスへの接続に問題がありました。後ほど再度お試しください。" } }, { "code": "S002000", "httpStatus": 500, "category": "system", "message": { "en": "The system is currently undergoing maintenance.", "zh-TW": "系統正在維護中。", "zh-CN": "系统正在维护中。", "ja": "システムは現在メンテナンス中です。" } }, { "code": "S002001", "httpStatus": 500, "category": "system", "message": { "en": "The payment service provider is currently under maintenance. Please use an alternative payment method.", "zh-TW": "該支付服務提供商正在維護中,請使用其他支付方式。", "zh-CN": "该支付服务提供商正在维护中,请使用其他支付方式。", "ja": "この支払いサービスプロバイダーは現在メンテナンス中です。別の支払い方法をご利用ください。" } }, { "code": "U001000", "httpStatus": 400, "category": "user", "message": { "en": "Insufficient balance. Try another method or add funds.", "zh-TW": "餘額不足,請嘗試其他支付方式或充值。", "zh-CN": "余额不足,请尝试其他支付方式或充值。", "ja": "残高不足です。他の方法を試すか、資金を追加してください。" } }, { "code": "U001001", "httpStatus": 400, "category": "user", "message": { "en": "Insufficient balance. Please add funds or use another payment method.", "zh-TW": "餘額不足,請充值或使用其他支付方式。", "zh-CN": "余额不足,请充值或使用其他支付方式。", "ja": "残高不足です。資金を追加するか、別の支払方法を使用してください。" } }, { "code": "U001002", "httpStatus": 400, "category": "user", "message": { "en": "Credit limit not sufficient. Please use another card or payment method.", "zh-TW": "信用卡額度不足,請使用其他卡片或支付方式。", "zh-CN": "信用卡额度不足,请使用其他卡片或支付方式。", "ja": "クレジット限度額が不十分です。別のカードまたは支払方法を使用してください。" } }, { "code": "U002000", "httpStatus": 400, "category": "user", "message": { "en": "Payment limit exceeded. Try another method.", "zh-TW": "超出支付限制,請嘗試其他支付方式。", "zh-CN": "超出支付限制,请尝试其他支付方式。", "ja": "支払い限度を超えました。他の方法を試してください。" } }, { "code": "U002001", "httpStatus": 400, "category": "user", "message": { "en": "Single transaction limit exceeded. Please use another method.", "zh-TW": "超出單筆交易限額,請使用其他支付方式。", "zh-CN": "超出单笔交易限额,请使用其他支付方式。", "ja": "1回の取引限度額を超えています。別の方法を使用してください。" } }, { "code": "U002002", "httpStatus": 400, "category": "user", "message": { "en": "Daily transaction limit exceeded. Please use another method.", "zh-TW": "超出每日交易限額,請使用其他支付方式。", "zh-CN": "超出每日交易限额,请使用其他支付方式。", "ja": "1日の取引限度額を超えています。別の方法を使用してください。" } }, { "code": "U002003", "httpStatus": 400, "category": "user", "message": { "en": "Monthly transaction limit exceeded. Please use another method.", "zh-TW": "超出每月交易限額,請使用其他支付方式。", "zh-CN": "超出每月交易限额,请使用其他支付方式。", "ja": "月間取引限度額を超えています。別の方法を使用してください。" } }, { "code": "U003000", "httpStatus": 400, "category": "user", "message": { "en": "Incorrect payment info. Please verify or use another method.", "zh-TW": "支付資訊錯誤,請核對或嘗試其他支付方式。", "zh-CN": "支付信息错误,请核对或尝试其他支付方式。", "ja": "支払情報に誤りがあります。確認するか、他の方法を試してください。" } }, { "code": "U003001", "httpStatus": 400, "category": "user", "message": { "en": "Incorrect card number. Please check and try again.", "zh-TW": "卡號錯誤,請檢查後再試。", "zh-CN": "卡号错误,请检查后再试。", "ja": "カード番号が誤っています。確認してから再試行してください。" } }, { "code": "U003002", "httpStatus": 400, "category": "user", "message": { "en": "Card expired. Use another card or payment method.", "zh-TW": "該卡已過期,請使用其他卡或支付方式。", "zh-CN": "该卡已过期,请使用其他卡或支付方式。", "ja": "カードの有効期限が切れています。別のカードまたは支払方法を使用してください。" } }, { "code": "U003003", "httpStatus": 400, "category": "user", "message": { "en": "Invalid CVC. Please check and try again.", "zh-TW": "CVC無效,請檢查後再試。", "zh-CN": "CVC无效,请检查后再试。", "ja": "CVCが無効です。確認してから再試行してください。" } }, { "code": "U003004", "httpStatus": 400, "category": "user", "message": { "en": "Incorrect address. Please verify and try again.", "zh-TW": "地址錯誤,請核對後再試。", "zh-CN": "地址错误,请核对后再试。", "ja": "住所に誤りがあります。確認してから再試行してください。" } }, { "code": "U003005", "httpStatus": 400, "category": "user", "message": { "en": "Incorrect password. Please check and try again.", "zh-TW": "密碼錯誤,請檢查後再試。", "zh-CN": "密码错误,请检查后再试。", "ja": "パスワードが間違っています。確認してから再試行してください。" } }, { "code": "U003006", "httpStatus": 400, "category": "user", "message": { "en": "The QR code is invalid. Please refresh your payment QR code or try a different method.", "zh-TW": "QR碼無效,請刷新支付QR碼或嘗試其他方式。", "zh-CN": "二维码无效,请刷新支付二维码或尝试其他方式。", "ja": "QRコードが無効です。支払いQRコードを更新するか、別の方法を試してください。" } }, { "code": "U003007", "httpStatus": 400, "category": "user", "message": { "en": "The QR code may have been used. Please check if your payment was successful or refresh the QR code.", "zh-TW": "QR碼可能已被使用,請檢查支付是否成功或刷新QR碼。", "zh-CN": "二维码可能已被使用,请检查支付是否成功或刷新二维码。", "ja": "QRコードは既に使用されている可能性があります。支払いが成功したか確認するか、QRコードを更新してください。" } }, { "code": "U003008", "httpStatus": 400, "category": "user", "message": { "en": "The QR code has expired. Please refresh your payment QR code and try again.", "zh-TW": "QR碼已過期,請刷新支付QR碼後再試。", "zh-CN": "二维码已过期,请刷新支付二维码后再试。", "ja": "QRコードの有効期限が切れています。支払いQRコードを更新して再試行してください。" } }, { "code": "U003009", "httpStatus": 400, "category": "user", "message": { "en": "3D Secure authentication failed. Try again or use another method.", "zh-TW": "3D安全認證失敗,請重試或使用其他支付方式。", "zh-CN": "3D安全认证失败,请重试或使用其他支付方式。", "ja": "3Dセキュア認証に失敗しました。再試行するか、別の方法を使用してください。" } }, { "code": "U003010", "httpStatus": 400, "category": "user", "message": { "en": "Account settings incorrect. Please update settings and try again.", "zh-TW": "帳戶設置錯誤,請更新設置後再試。", "zh-CN": "账户设置错误,请更新设置后再试。", "ja": "アカウント設定に誤りがあります。設定を更新してから再試行してください。" } }, { "code": "U003011", "httpStatus": 400, "category": "user", "message": { "en": "Authorization expired. Please reauthorize and try again.", "zh-TW": "授權已過期,請重新授權後再試。", "zh-CN": "授权已过期,请重新授权后再试。", "ja": "承認の有効期限が切れています。再承認してから再試行してください。" } }, { "code": "U004000", "httpStatus": 400, "category": "user", "message": { "en": "Transaction rejected. Try another method or contact your bank.", "zh-TW": "交易被拒,請嘗試其他支付方式或聯繫銀行。", "zh-CN": "交易被拒,请尝试其他支付方式或联系银行。", "ja": "取引が拒否されました。他の方法を試すか、銀行に連絡してください。" } }, { "code": "U004001", "httpStatus": 400, "category": "user", "message": { "en": "Currency not supported. Try another currency or method.", "zh-TW": "不支援該貨幣,請嘗試其他貨幣或支付方式。", "zh-CN": "不支持该货币,请尝试其他货币或支付方式。", "ja": "この通貨はサポートされていません。他の通貨または方法を試してください。" } }, { "code": "U004002", "httpStatus": 400, "category": "user", "message": { "en": "Card type not supported. Please use a different card or method.", "zh-TW": "不支援此類卡,請使用其他類型的卡或支付方式。", "zh-CN": "不支持此类卡,请使用其他类型的卡或支付方式。", "ja": "このカードタイプはサポートされていません。別のカードまたは方法を試してください。" } }, { "code": "U004003", "httpStatus": 400, "category": "user", "message": { "en": "Transaction type not supported. Try another method.", "zh-TW": "不支援此交易類型,請嘗試其他支付方式。", "zh-CN": "不支持此交易类型,请尝试其他支付方式。", "ja": "この取引タイプはサポートされていません。他の方法を試してください。" } }, { "code": "U004004", "httpStatus": 400, "category": "user", "message": { "en": "Account deactivated. Contact support or use another account.", "zh-TW": "帳戶已停用,請聯繫客服或使用其他帳戶。", "zh-CN": "账户已停用,请联系客服或使用其他账户。", "ja": "アカウントが無効になっています。サポートに連絡するか、別のアカウントを使用してください。" } }, { "code": "U004005", "httpStatus": 400, "category": "user", "message": { "en": "Account reported lost. Contact your bank or use another account.", "zh-TW": "帳戶已報失,請聯繫銀行或使用其他帳戶。", "zh-CN": "账户已报失,请联系银行或使用其他账户。", "ja": "アカウントが紛失と報告されました。銀行に連絡するか、別のアカウントを使用してください。" } }, { "code": "U004006", "httpStatus": 400, "category": "user", "message": { "en": "Transaction location not supported. Try another location or method.", "zh-TW": "不支援此交易地點,請嘗試其他地點或支付方式。", "zh-CN": "不支持此交易地点,请尝试其他地点或支付方式。", "ja": "この取引場所はサポートされていません。他の場所または方法を試してください。" } }, { "code": "U005000", "httpStatus": 400, "category": "user", "message": { "en": "Too many attempts. Please wait before retrying.", "zh-TW": "嘗試次數過多,請稍後再試。", "zh-CN": "尝试次数过多,请稍后再试。", "ja": "試行回数が多すぎます。再試行する前にお待ちください。" } }, { "code": "U006000", "httpStatus": 400, "category": "user", "message": { "en": "Payment cancelled. Try again or use another method.", "zh-TW": "支付已取消,請重新嘗試或使用其他支付方式。", "zh-CN": "支付已取消,请重新尝试或使用其他支付方式。", "ja": "支払いがキャンセルされました。再試行するか、他の方法を使用してください。" } }, { "code": "U006001", "httpStatus": 400, "category": "user", "message": { "en": "Authorization denied. Try another method or contact support.", "zh-TW": "授權被拒絕,請嘗試其他支付方式或聯繫客服。", "zh-CN": "授权被拒绝,请尝试其他支付方式或联系客服。", "ja": "承認が拒否されました。他の方法を試すか、サポートに連絡してください。" } }, { "code": "U007000", "httpStatus": 400, "category": "user", "message": { "en": "Transaction deadline exceeded. Please retry or use another method.", "zh-TW": "超過交易期限,請重新嘗試或使用其他支付方式。", "zh-CN": "超过交易期限,请重新尝试或使用其他支付方式。", "ja": "取引期限を超えました。再試行するか、他の方法を使用してください。" } }, { "code": "U007001", "httpStatus": 400, "category": "user", "message": { "en": "Payment deadline exceeded. Please retry or use another method.", "zh-TW": "支付截止日期已過,請重試或使用其他支付方式。", "zh-CN": "支付截止日期已过,请重试或使用其他支付方式。", "ja": "支払期限を超えています。再試行するか、別の方法を使用してください。" } }, { "code": "U007002", "httpStatus": 400, "category": "user", "message": { "en": "Refund deadline exceeded. Contact support for assistance.", "zh-TW": "退款截止日期已過,請聯繫客服尋求幫助。", "zh-CN": "退款截止日期已过,请联系客服寻求帮助。", "ja": "返金期限を超えています。サポートに連絡して支援を受けてください。" } }, { "code": "U008000", "httpStatus": 400, "category": "user", "message": { "en": "Amount out of range. Adjust and retry.", "zh-TW": "金額超出範圍,請調整後重試。", "zh-CN": "金额超出范围,请调整后重试。", "ja": "金額が範囲外です。調整して再試行してください。" } }, { "code": "U008001", "httpStatus": 400, "category": "user", "message": { "en": "Amount too large. Please reduce and try again.", "zh-TW": "金額過大,請減少金額後重試。", "zh-CN": "金额过大,请减少金额后重试。", "ja": "金額が大きすぎます。減らしてから再試行してください。" } }, { "code": "U008002", "httpStatus": 400, "category": "user", "message": { "en": "Amount too small. Please increase and try again.", "zh-TW": "金額過小,請增加金額後重試。", "zh-CN": "金额过小,请增加金额后重试。", "ja": "金額が小さすぎます。増やしてから再試行してください。" } }, { "code": "U009000", "httpStatus": 400, "category": "user", "message": { "en": "Further action required. Please follow the instructions.", "zh-TW": "需要進一步操作,請按照指示操作。", "zh-CN": "需要进一步操作,请按照指示操作。", "ja": "追加のアクションが必要です。指示に従ってください。" } } ] } ``` ## Error Response Structure [#error-response-structure] When the API returns an error, the response body takes the following form. ```json { "requestId": "req_1a2b3c4d", "errorCode": "U001000", "code": "9_elepay_creditcard_10101", "message": "カードが拒否されました", "parameterName": null, "providerError": { "providerKey": "stripe", "code": "card_declined", "message": "Your card was declined." } } ``` | Field | Description | | --------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | `errorCode` | The elepay standard error code defined in the table above. Branch your business logic based on this value. | | `code` | Legacy 5-digit compatibility code (prefixed with `9_`). Do not use it for new development. | | `message` | Error message. Returned in Japanese / English / Chinese depending on the `Accept-Language` header (defaults to Japanese). | | `requestId` | Request identifier. Share this value with support when contacting us. | | `parameterName` | For validation errors, the name of the parameter that caused the problem. `null` when not applicable. | | `providerError` | Raw error information returned by the payment provider (Stripe / PayPay / GMO, etc.) is passed through transparently. Use it to identify provider-specific errors that elepay has not yet mapped. | ### About `providerError` [#about-providererror] `providerError.code` and `providerError.message` are **defined on the payment provider side** and the format varies between providers. For long-term operation we recommend branching on `errorCode` (the elepay standard), but `providerError` is useful in the following cases. * When a newly introduced provider-specific error has not yet been mapped to a standard code on the elepay side * When the original code is required on the provider's dashboard or in support inquiries * When analyzing provider-specific trends in logs or analytics ## Legacy Error Codes (Deprecated) [#legacy-error-codes-deprecated] **Deprecated** The legacy 5-digit error codes (e.g., `10001`, `40022`, `50000`) are **deprecated**. Please use the new format described above for new development. They are provided as a compatibility layer for existing integrations. For the mapping, see [Legacy Error Codes](https://elepay-docs.elestyle.workers.dev/get-started/error-code-legacy). # Payment Processing (https://elepay-docs.elestyle.workers.dev/get-started/process) By using elepay’s Charge feature, you can keep the payment flow safe and smooth. End users can complete payment with just a few taps in a mobile app or on a web page. For the Charge feature, please use the Client SDK. Although a Server SDK is provided to improve developer convenience, you can also integrate directly with the RESTful API without using it. Payment flow overview ![](https://elepay-docs.elestyle.workers.dev/docs/5d9f652de8efdde609dd924855c16cc8a5f839b60f081b9781b13c5dc0e81302-charge.png) # Pay with the API [#pay-with-the-api] ## 1. Order on mobile [#1-order-on-mobile] The end user places an order in a mobile app or on the web. ## 2. Payment request [#2-payment-request] Your server calls the API for [Create Charge](https://elepay-docs.elestyle.workers.dev/openapi/charge/createCharge) and requests a payment. ## 3. Create a Charge object [#3-create-a-charge-object] The elepay server creates a Charge object for the payment request and returns it to your server. ## 4. Pass the Charge object [#4-pass-the-charge-object] Your server passes the Charge object to the Client SDK on the client. ## 5. Process the payment [#5-process-the-payment] The Client SDK on the client side performs the payment using the Charge object. ## 6. Payment result [#6-payment-result] When processing finishes, the specified payment channel server returns the payment result. ## 7. Receive webhook event [#7-receive-webhook-event] If the payment succeeds, elepay sends an event notification to the URL configured for your webhook. ## 8. Retrieve and handle payment status [#8-retrieve-and-handle-payment-status] We recommend adding logic on your server to retrieve the payment status. If, for any reason, you did not receive the webhook event, you can use [Retrieve Charge Status](https://elepay-docs.elestyle.workers.dev/openapi/charge/retrieveChargeStatus) to fetch the status and handle the payment result accordingly. # Check in the dashboard [#check-in-the-dashboard] You can review payment records under “支払い管理 / 支払い一覧” in the dashboard. For refunds, see [Refund Processing](https://elepay-docs.elestyle.workers.dev/get-started/refunds). ![](https://elepay-docs.elestyle.workers.dev/docs/f40064d-______elepay.png) # Quick Start (https://elepay-docs.elestyle.workers.dev/get-started/quickstart) Follow this guide to create your first EasyQR code with a single API call and see a real, scannable payment QR code in your browser. The entire flow runs in test mode, so no real payments are collected. **What is EasyQR** EasyQR is a dynamic payment QR code provided by elepay: your server creates a code, and the customer scans it to pay via dozens of methods such as PayPay and credit cards. For the complete approach to integrating the QR code into a website or device, see [EasyCheckout](https://elepay-docs.elestyle.workers.dev/cases/checkout). ## Before you begin [#before-you-begin] You only need to prepare one thing: a **test Secret Key**. * Log in to the elepay dashboard and obtain your test Secret Key under “開発設定 / API” on the left. It looks like `sk_test_…`. For detailed steps, see [Initial setup](https://elepay-docs.elestyle.workers.dev/get-started/set-up). * The test Secret Key corresponds to **test mode**: it does not connect to real payment channels and produces no real transactions, so you can try it freely. **warn** The Secret Key has full access to API operations and **must be used only on the server side**. Never commit it to a code repository or expose it in the frontend. ## Step 1: Create an EasyQR code [#step-1-create-an-easyqr-code] Send a request to `POST /codes` to create an EasyQR code. Set your test Secret Key as an environment variable, then copy and run the command directly: ```bash export ELEPAY_SECRET_KEY=sk_test_… # ← your test Secret Key curl -X POST https://api.elepay.io/codes \ -H "Authorization: Bearer $ELEPAY_SECRET_KEY" \ -H "Content-Type: application/json" \ -d '{ "amount": 500, "currency": "JPY", "orderNo": "quickstart-0001" }' ``` **Authentication methods** elepay supports both Bearer and Basic authentication. The example above uses Bearer (the key as the token); if you switch to Basic, use the key as the username and leave the password empty. For details, see the [API guide](https://elepay-docs.elestyle.workers.dev/guides/api-guide). Request fields (full definitions in [Create EasyQR code](https://elepay-docs.elestyle.workers.dev/openapi/code/createCode)): | Field | Required | Description | | ---------- | -------- | ------------------------------------------------------------------------ | | `amount` | Yes | Payment amount, an integer. `JPY` is in yen (`500` means ¥500) | | `orderNo` | Yes | The order number on your system, up to 50 characters, for reconciliation | | `currency` | No | Currency code (ISO 4217), defaults to `JPY` | A successful creation returns `201`, and the response body is a code object (the following is an example; actual field values vary by account): ```json { "id": "code_xxxxxxxxxxxxxxxx", "object": "code", "liveMode": false, "amount": 500, "currency": "JPY", "orderNo": "quickstart-0001", "status": "pending", "codeUrl": "https://pay.elepay.io/code/xxxxxxxxxxxxxxxx", "expiryTime": 1717200000000, "createTime": 1717199400000 } ``` Key fields: | Field | Meaning | | ---------- | --------------------------------------------------------------------------------- | | `id` | The unique identifier of the EasyQR code, used for later retrieval / closing | | `liveMode` | `false` indicates test mode (created with a test Secret Key) | | `status` | `pending` (unpaid) when newly created; becomes `captured` after payment completes | | `codeUrl` | **The customer payment landing page URL**—used in the next step | ## Step 2: View your payment QR code [#step-2-view-your-payment-qr-code] Copy the `codeUrl` from the response and open it in a browser. You will see a checkout page hosted by elepay: the amount on the left, and the payment QR code with available payment methods on the right. ![EasyQR checkout page](https://elepay-docs.elestyle.workers.dev/docs/fdfa6f6c89671f21da0c49a86a440b156f6b48603faaf6ab5a40f530f3635091-image.png) The customer scans this QR code with their phone and can pay using methods such as PayPay or a credit card. **🎉 Congratulations** This is the first EasyQR code you created with the API—you have now completed the core elepay payment flow: from creation to QR code generation. **info** If the QR code page indicates that no payment method is available, first enable at least one payment method under “簡単決済 > 設定 > 決済方法管理” in the dashboard. ## Next steps [#next-steps] * **Integrate into your website or device**: [EasyCheckout integration](https://elepay-docs.elestyle.workers.dev/cases/checkout) (hosted page / embedded Widget) * **Query payment status**: [Retrieve EasyQR code](https://elepay-docs.elestyle.workers.dev/openapi/code/retrieveCode) * **Learn about all fields**: [Create EasyQR code](https://elepay-docs.elestyle.workers.dev/openapi/code/createCode) * **Go live with real payments**: After enabling payment methods in the dashboard, simply replace the test Secret Key with a live Secret Key (`sk_live_…`) # Refund Processing (https://elepay-docs.elestyle.workers.dev/get-started/refunds) elepay also provides a refund feature. Your server can issue refunds by calling the API. # Refund via API [#refund-via-api] ## 1. Refund request [#1-refund-request] Your server calls [Create Refund](https://elepay-docs.elestyle.workers.dev/openapi/refund/createRefund) to request a refund. ## 2. Handle the response [#2-handle-the-response] The elepay server returns a Refund object in response to the request.
If the request is accepted, the `failure_msg` field of the Refund object is null. ## 3. Receive webhook event [#3-receive-webhook-event] If the refund succeeds, elepay sends an event notification to the URL configured for your webhook. # Refund in the dashboard [#refund-in-the-dashboard] You can refund a specific payment record under “支払い管理 / 支払い一覧” in the dashboard. ![](https://elepay-docs.elestyle.workers.dev/docs/e0fa380-______elepay.png) ![](https://elepay-docs.elestyle.workers.dev/docs/7d1820f-______elepay.0.png) > 📘 Refund window > > Refunds can be issued within 90 days from the capture date. > ❗️ Refund request vs. refunded > > Refunds are processed asynchronously. After a refund is requested, the status may not become “refunded” immediately. # Account Setup (https://elepay-docs.elestyle.workers.dev/get-started/set-up) Before starting development, understand the elepay development environment. By signing in to the elepay dashboard, you can configure the environments below. Some values must be set in source code; do not expose them publicly. # Test mode and Live mode [#test-mode-and-live-mode] elepay provides two environments: Test and Live. During development, you can switch between them by configuring the App Key for each environment. ## Test mode [#test-mode] To use the test environment, create a new elepay account. Even while individual payment methods are under review, you can continue development in the test environment. ## Live mode [#live-mode] After each payment method is enabled, you can use the production environment to accept payments. # Obtaining and configuring Test Key and Live Key [#obtaining-and-configuring-test-key-and-live-key] App keys for the Test and Live environments are managed in the elepay dashboard. Click “開発設定 / API” in the left navigation to view your API keys. ![](https://elepay-docs.elestyle.workers.dev/docs/fd15563-API______elepay.png) # Test Cards (https://elepay-docs.elestyle.workers.dev/get-started/test-card) When testing credit card payments in Test mode, do not use real card numbers. Use the test numbers below. Test cards differ by payment processor. **Stripe** | Number | Brand | Expiry | CVC | | ------------------- | ---------------- | ----------- | ------------ | | 4242 4242 4242 4242 | VISA | Future date | Any 3 digits | | 5555 5555 5555 4444 | Mastercard | Future date | Any 3 digits | | 3782 822463 10005 | American Express | Future date | Any 4 digits | | 3566 0020 2036 0505 | JCB | Future date | Any 3 digits | **Paygent** | Number | Brand | Expiry | CVC | | ------------------- | ---------------- | ----------- | ------------ | | 4023 1234 5678 0000 | VISA | Future date | Any 3 digits | | 5251 1234 5678 0000 | Mastercard | Future date | Any 3 digits | | 5251 1234567 80000 | American Express | Future date | Any 4 digits | | 3580 1234 5678 0000 | JCB | Future date | Any 3 digits | # Authentication / API Guide (https://elepay-docs.elestyle.workers.dev/guides/api-guide) # API Guide [#api-guide] # Overview [#overview] The elepay API is a REST‑based payments API. It supports operations used in day‑to‑day running such as charging and refunding. # Authentication [#authentication] To use the API, register an account and obtain API keys. There are two types of keys: Test key and Live key. The test key is used in the Test environment, and the live key is used in the Live environment. For details of the environments, see [Getting Started](https://elepay-docs.elestyle.workers.dev/get-started/set-up). | No | Name | Purpose | | -- | -------- | ---------------------------------------------------------------------------------------- | | 1 | Test key | Does not connect to the live payment server and never creates real payment records. | | 2 | Live key | Connects to the live payment server (available after your live application is approved). | The publishable key is the public API key embedded in your app’s payment page HTML and is used to create tokens. Server‑side API requests are authenticated using the secret key via HTTP Basic authentication by treating the secret key as the username and omitting the password. If you prefer Bearer authentication, use an HTTP Bearer header instead of Basic. Handle the secret key with care, as it grants access to all API operations. | No | Name | Purpose | | -- | --------------- | ---------------------------------------------- | | 1 | Publishable key | Public key embedded in HTML for token creation | | 2 | Secret key | Server‑side authentication secret | > ## 📘 Basic authentication [#-basic-authentication] > > With Basic auth, concatenate the username and password with a colon `:` and send it Base64‑encoded. > > 1. Concatenate the secret key and an empty password with a colon: > > `{SK_LIVE_KEY_HERE}:` > 2. Base64‑encode the value: > > `c2tfbGl2ZV94eHh4eHh4eHh4eHh4eHh4eHh4eHg6` > 3. Send the encoded value in the HTTP Basic Authorization header: > > `Authorization: Basic c2tfbGl2ZV94eHh4eHh4eHh4eHh4eHh4eHh4eHg6` > ## 📘 Bearer authentication [#-bearer-authentication] > > To use Bearer authentication, send an HTTP Bearer header instead of the Basic header: > > > `Authorization: Bearer {SK_LIVE_KEY_HERE}` # Protocol [#protocol] For security, all API communication with the elepay servers must use HTTPS. # Methods [#methods] Requests to the elepay API support three HTTP methods: GET, POST, and DELETE. # Response format [#response-format] All response data from the API is returned in JSON format. # Timestamps [#timestamps] Date‑related data is represented as UNIX timestamps in the UTC time zone. Some fields such as expected transfer dates and execution dates that do not require seconds use the Date type (for example: 2023‑12‑01). # API Reference [#api-reference] We provide the following APIs. For details, see [API Reference](https://elepay-docs.elestyle.workers.dev/openapi). | No | API | Method | Notes | | -- | ------ | -------- | ---------------------- | | 1 | Charge | | | | | | list | List charges | | | | create | Create a Charge object | | | | retrieve | Retrieve a charge | | 2 | Refund | | | | | | list | List refunds | | | | create | Create a Refund object | | | | retrieve | Retrieve a refund | # Extra Payment Parameters (https://elepay-docs.elestyle.workers.dev/guides/extra-setting) ## When the payment resource is `web`, `ios`, or `android` [#when-the-payment-resource-is-web-ios-or-android] ### Alipay+ (Alipay, AlipayHK, KakaoPay, GCash, TNG, etc.) [#alipay-alipay-alipayhk-kakaopay-gcash-tng-etc] | Field | Description | Required | | ------------- | -------------------------------- | ------------------------------- | | **frontUrl** | URL to redirect to after payment | Required when resource is `web` | | **userAgent** | Browser User‑Agent | Required when resource is `web` | ### Apple Pay [#apple-pay] | Field | Description | Required | | ------------ | ------------------------------------------- | -------- | | **shopName** | Payee name shown on Apple Pay authorization | Optional | ### Google Pay [#google-pay] | Field | Description | Required | | ------------ | -------------------------------------------- | --------------------------------------------- | | **shopName** | Payee name shown on Google Pay authorization | Optional | | **frontUrl** | URL to redirect to after payment | Required when resource is `web` and using 3DS | ### atone [#atone] | Field | Description | Required | | --------------- | ------------------------------------------ | -------- | | **productName** | Product name shown on the user’s statement | Optional | ### LINE Pay [#line-pay] | Field | Description | Required | | ------------------- | ---------------------------------------------------- | ----------------------------------------- | | **frontUrl** | URL to redirect to after payment | Required when resource is `web` or `liff` | | **productName** | Product name shown on LINE Pay authorization screen | Optional | | **productImageUrl** | Product image shown on LINE Pay authorization screen | Optional | ### UnionPay [#unionpay] | Field | Description | Required | | --------------- | -------------------------------------------- | ------------------------------- | | **frontUrl** | URL to redirect to after payment | Required when resource is `web` | | **productName** | Product name shown on UnionPay authorization | Optional | ### au PAY [#au-pay] | Field | Description | Required | | ------------ | -------------------------------- | ------------------------------- | | **frontUrl** | URL to redirect to after payment | Required when resource is `web` | ### Merpay [#merpay] | Field | Description | Required | | ------------ | -------------------------------- | ------------------------------- | | **frontUrl** | URL to redirect to after payment | Required when resource is `web` | ### d Payment (d払い) [#d-payment-d払い] | Field | Description | Required | | ------------ | -------------------------------- | ------------------------------- | | **frontUrl** | URL to redirect to after payment | Required when resource is `web` | ### J‑Coin Pay [#jcoin-pay] | Field | Description | Required | | ------------ | -------------------------------- | ------------------------------- | | **frontUrl** | URL to redirect to after payment | Required when resource is `web` | ### PayPal [#paypal] No extra fields required. ### Paidy [#paidy] | Field | Description | Required | | ------------ | -------------------------------------------- | -------- | | **shopName** | Store name shown on Paidy authorization page | Optional | ### PayPay [#paypay] | Field | Description | Required | | --------------- | -------------------------------- | ------------------------------- | | **frontUrl** | URL to redirect to after payment | Required when resource is `web` | | **productName** | Product name | Optional | ### WeChat Pay [#wechat-pay] | Field | Description | Required | | --------------- | -------------------------------- | -------------------------------- | | **frontUrl** | URL to redirect to after payment | Required when resource is `web` | | **productName** | Product name | Optional | | **openid** | User openid | Required when resource is `mini` | ### Rakuten Pay (RPay) [#rakuten-pay-rpay] | Field | Description | Required | | ------------- | ------------------ | ------------------------------- | | **frontUrl** | URL to redirect to | Required when resource is `web` | | **userAgent** | Browser User‑Agent | Required when resource is `web` | ### Atokara(アトカラ) [#atokaraアトカラ] | Field | Description | Required | | ------------ | -------------------------------- | -------- | | **frontUrl** | URL to redirect to after payment | Required | | **fullName** | | Required | | **zipCode** | | Required | | **address** | | Required | | **tel** | | Required | | **email** | | Required | ## When the payment resource is `cpm` [#when-the-payment-resource-is-cpm] ### Common fields [#common-fields] | Field | Description | Required | | --------- | --------------------------------------- | -------- | | **token** | Value of the scanned barcode or QR code | Required | ## When the payment resource is `reader` [#when-the-payment-resource-is-reader] ### Common fields [#common-fields-1] | Field | Description | Required | | ------------ | ------------------ | -------- | | **readerId** | Terminal reader ID | Required | ## For Create EasyQR [#for-create-easyqr] ### Common fields [#common-fields-2] | Field | Description | Required | | ------------------------ | ----------------------------------------------------------------------- | -------- | | **defaultPaymentMethod** | Payment brand to display by default. Users can switch to other methods. | Optional | ## For credit cards [#for-credit-cards] | Field | Description | Required | | ----------------------- | -------------------------------- | --------------------------------------------- | | **requestThreeDSecure** | Set to `true` to enable 3DS | Optional | | **frontUrl** | URL to redirect to after payment | Required when resource is `web` and using 3DS | # Terminal Payments (https://elepay-docs.elestyle.workers.dev/guides/terminals) elepay provides in‑person payment capabilities via terminal devices. By using a terminal, you can accept card‑present payments such as credit and debit cards. For cards with IC chips, a PIN entry may be required. Contactless payments and e‑money are also supported. > 🚧 Before using terminal payments, you must open an account with Square and complete the configuration on the elepay side. High‑level flow until a payment can be accepted ![](https://elepay-docs.elestyle.workers.dev/docs/ee8ebf5-terminal_prepare.png) Payment flow ![](https://elepay-docs.elestyle.workers.dev/docs/6b666a5-terminal_charge.png) # Payment processing [#payment-processing] ### 1. Payment request [#1-payment-request] Your server calls elepay’s Charge API to create a payment request. > 📘 Key request parameters > > **resource**: set to `reader`. (Will be changed to `terminal` in a future version.) > > **paymentMethod**: payment method > > **extra**: `readerId` is required. ### 2. Customer payment [#2-customer-payment] Process payments such as credit cards, debit cards, and e‑money on the terminal. ### 3. Check the Charge status and display the result [#3-check-the-charge-status-and-display-the-result] You can confirm the result by either of the following: **1. Receive a webhook event** Whether a payment succeeds or fails, elepay sends the corresponding event notification to the configured webhook URL. **2. Retrieve payment status** Poll the Charge retrieval API to check status until the payment succeeds or times out (recommended timeout 60 seconds; poll every 10 seconds). # Check in the dashboard [#check-in-the-dashboard] You can review payment records under “Payment Management / Payments”. For refunds, see [Refunds](https://elepay-docs.elestyle.workers.dev/get-started/refunds). # Webhook (https://elepay-docs.elestyle.workers.dev/guides/webhook) # Overview [#overview] To integrate with your system, elepay provides Webhooks and related tools for handling asynchronous notifications. ## Webhook [#webhook] A webhook is a mechanism for receiving notifications about events that occur in a service via an external URL over HTTP. ![](https://elepay-docs.elestyle.workers.dev/docs/5594a16-Untitled_Diagram_1.png) ## Tools [#tools] We provide development tools such as sending webhook notifications, request logs, and response format validation. See the developer tools for details. # Usage Guide [#usage-guide] ## Use cases [#use-cases] With webhooks, you can have elepay notify any URL when events like the following occur: * When a payment is completed successfully * When a refund is completed successfully Simply add a destination URL in the elepay dashboard and the above events will be delivered automatically. ![](https://elepay-docs.elestyle.workers.dev/docs/0db64b6-Webhook______elepay.png) ## Setup [#setup] Log in to the elepay dashboard. From the management screen shown below, add your webhook destination. Enter the URL, select event types, and click Add. You can register multiple webhook endpoints. ![](https://elepay-docs.elestyle.workers.dev/docs/bc5025c-123123123.png) ### 1. Webhook URL [#1-webhook-url] Specify the URL that receives webhook notifications under “Developer Settings / Webhook”. ### 2. Test mode and Live mode [#2-test-mode-and-live-mode] Both Test mode and Live mode are supported. Use the Test/Live toggle at the top of the dashboard to manage settings for each environment. ### 3. Webhook events [#3-webhook-events] elepay defines the webhook notification events. When an event listed below occurs, a corresponding webhook notification is sent. #### Request [#request] All elepay webhooks are sent as POST requests. The request body contains the event JSON data. #### Event list [#event-list] These are the event types actually sent by elepay. The event type is contained in the JSON under `type`. | Type | Description | | -------------------- | ------------------------- | | `charge.succeeded` | Payment succeeded | | `charge.revoked` | Payment revoked | | `refund.succeeded` | Refund succeeded | | `source.activated` | Authorization succeeded | | `source.inactivated` | Authorization invalidated | | `reader.activated` | Reader pairing completed | Below is an example of the event data sent when a payment of 1800 JPY succeeds. ```json { "id": "evt_la06CoQAiPojSgJKe5gt3nwq", "object": "event", "createTime": 1543944030817, "liveMode": false, "type": "charge.succeeded", "data": { "object": { // Charge object } } } ``` The `data` field contains the detailed content of the event. Its structure matches the JSON returned by the API. ## Receiving notifications [#receiving-notifications] ### Success handling [#success-handling] When you successfully receive a webhook notification, return an HTTP 2xx status code. ### Error handling [#error-handling] If receiving the webhook fails, be sure to return an HTTP 4xx or 5xx status code. elepay will automatically retry. Retries occur first 3 times at 1‑minute intervals, then 2 more times at 10‑minute intervals. If delivery still fails, use the synchronous APIs to reconcile the payment status. | Retry | Count | Interval | | --------- | ------- | --------------- | | 1–3 times | Total 3 | 1 time / 1 min | | 4–5 times | Total 2 | 1 time / 10 min | ### Authenticity [#authenticity] All webhook requests from the elepay servers include an `elepay-signature` header. The header looks like this: ```text Format: elepay-signature: t=[timestamp],sign=[signature] Example: elepay-signature: t=1581064080,sign=100dcc3d839c89cd91ecdd23d7305b2fdb8ae73b498c27efd812b25fc86ec702 ``` > 📘 Depending on your framework, HTTP headers may not preserve the all‑lowercase `elepay-signature`. In that case, try `Elepay-Signature`. **Authenticity verification logic** The signature is generated by applying the HMAC‑SHA256 algorithm using the timestamp and a verification secret. You can view or regenerate the secret on the webhook details page in the dashboard. ![](https://elepay-docs.elestyle.workers.dev/docs/585eb50-Webhook_______elepay.png) 1. Extract the timestamp and signature from the header. 2. Read the request body data. 3. Create the string: ` + "." + `. 4. Using the verification secret, sign the string from step 3 with HMAC‑SHA256. 5. Compare the result from step 4 with the signature from step 1 to verify authenticity. # AllValue (https://elepay-docs.elestyle.workers.dev/cases/allvalue) 1. Log in to the AllValue admin panel and click "Settings" → "Payments". ![](https://elepay-docs.elestyle.workers.dev/docs/413149c-pasted-image.png) 2. On the "Payments" page, under "Other payment methods," click the "Select payment method" link. ![](https://elepay-docs.elestyle.workers.dev/docs/f17adfb-pasted-image-2.png) 3. From the list of payment service providers, click "elepay". ![](https://elepay-docs.elestyle.workers.dev/docs/f71a6fc-pasted-image-3.png) 4. On the elepay settings screen, enter the App ID and Secret (for the values, please contact the elepay support desk). ![](https://elepay-docs.elestyle.workers.dev/docs/4de8650-pasted-image-4.png) 5. Specify the payment methods available for users to choose. When finished, click the "Save" button. ![](https://elepay-docs.elestyle.workers.dev/docs/c94d8d3-pasted-image-5.png) 6. After returning to the Payments page, under "Checkout settings" you can adjust the display order of payment methods. ![](https://elepay-docs.elestyle.workers.dev/docs/920b7ae-pasted-image-6.png) # EC-CUBE (https://elepay-docs.elestyle.workers.dev/cases/ec-cube-plugin) ## Overview [#overview] elepay provides a dedicated plugin for EC-CUBE. At present, only the “EC-CUBE Downloadable Version” is supported.
The support timeline for the “EC-CUBE Cloud Version” is undecided. ## Installing the Plugin [#installing-the-plugin] This section explains how to install the elepay for EC-CUBE plugin. 1. Download the plugin\ Download the latest plugin ZIP from the release pages below.\ [elepay for EC-CUBE v4](https://github.com/elestyle/elepay-eccube4-plugin/releases) (up to 4.2)\ [elepay for EC-CUBE v3](https://github.com/elestyle/elepay-eccube3-plugin/releases) > 📘 Note > > Do not extract the downloaded ZIP file. > > v4.2 is not yet supported. Please use the latest v4.1.x. 2. Log in to the EC-CUBE admin console with administrator privileges.\ Click “Owners Store” → “Plugin List” → “User’s Own Plugin” → “Upload to add new”. ![](https://elepay-docs.elestyle.workers.dev/docs/127bc35-image-20200503-030214.png) 3. On the “Upload New Plugin” screen, upload the ZIP file downloaded in Step 1. ![](https://elepay-docs.elestyle.workers.dev/docs/0352534-image-20200503-030342.png) 4. In the list of installed plugins, click the “▶︎” button for “elepay EC-CUBE plugin” to enable it. ![](https://elepay-docs.elestyle.workers.dev/docs/3cfce70-image-20200503-083844.png) 5. When the plugin’s “Status” shows “Enabled,” it is ready for use. ![](https://elepay-docs.elestyle.workers.dev/docs/c3c0abb-image-20200503-083916.png) This completes the plugin installation. ## Initial Setup [#initial-setup] This section explains how to perform the initial setup. 1. In the EC-CUBE admin console, go to “Owners Store” → “Plugin List” → “elepay EC-CUBE plugin” and click the gear icon (⚙). ![](https://elepay-docs.elestyle.workers.dev/docs/d71b394-image-20200503-083957.png) 2. Enter the development keys you obtained from the elepay dashboard into “Public Key” and “Secret Key.” For how to obtain elepay development keys, see “[Overview](https://elepay-docs.elestyle.workers.dev/get-started/set-up)”. > ❗️ Warning: When using development keys for the test environment (keys starting with pk*test* or sk*test*), no actual payment is processed. Even if the order status shows “Paid,” do not ship any goods. ![](https://elepay-docs.elestyle.workers.dev/docs/95be5f1-image-20210406-042557.png) 3. Copy the Webhook URL. ![](https://elepay-docs.elestyle.workers.dev/docs/0e0b3d7-image-20210405-085539.png) 4. In the elepay dashboard, go to “Developer Settings” → “Webhook,” and click “New.” ![](https://elepay-docs.elestyle.workers.dev/docs/9ad476a-image-20210405-084536.png) 5. Paste the Webhook URL copied in Step 3 into “URL,” check “Payment Succeeded” under “Event Type,” then click “OK.” ![](https://elepay-docs.elestyle.workers.dev/docs/bac37d4-image-20210405-085341.png) All settings are now complete.
Buyers will see the list of elepay payment methods on the EC-CUBE payment method selection screen. > 📘 Only the payment methods enabled in elepay are displayed. Methods not supported by the browser or device are automatically hidden. ![](https://elepay-docs.elestyle.workers.dev/docs/ec-cube-plugin-checkout-payment-methods.png) # WooCommerce (https://elepay-docs.elestyle.workers.dev/cases/woocommerce-plugin) ## Overview [#overview] elepay provides a dedicated plugin for WooCommerce. ## Installing the Plugin [#installing-the-plugin] This section explains how to install the elepay for WooCommerce plugin. 1. Download the plugin\ Download the latest plugin ZIP from the release page below.\ [elepay for WooCommerce](https://github.com/elestyle/woocommerce-gateway-elepay/releases) > 📘 Do not extract the downloaded ZIP file. 2. Log in to the WordPress admin console with administrator privileges.\ Click “Plugins” → “Add New”. ![](https://elepay-docs.elestyle.workers.dev/docs/adcc6f4-image-20210901-022542.png) 3. On the “Add Plugins” screen, upload the ZIP file downloaded in Step 1. ![](https://elepay-docs.elestyle.workers.dev/docs/bd3442f-image-20210901-025522.png) 4. On the installation result screen, click “Activate Plugin”. ![](https://elepay-docs.elestyle.workers.dev/docs/cc04219-image-20210901-025604.png) 5. When “elepay Plug-in for WooCommerce” appears in the “Plugins” list, it is ready to use. ![](https://elepay-docs.elestyle.workers.dev/docs/1459aae-image-20210901-025655.png) This completes the plugin installation. ## Initial Setup [#initial-setup] This section explains the initial setup for the plugin. 1. In the WordPress admin console, go to “Settings” → “Payments” → “elepay Payments - QR Code Payments” → click “Manage”. ![](https://elepay-docs.elestyle.workers.dev/docs/90c1229-image-20210901-025839.png) 2. Under “Enable/Disable,” check “Enable elepay,” then enter the development keys obtained from the elepay dashboard into “Public Key” and “Secret Key.” Finally, click “Save changes.” For how to obtain elepay development keys, see “[Overview](https://elepay-docs.elestyle.workers.dev/get-started/set-up)”. > ❗️ Warning: When using development keys for the test environment (keys starting with pk\_test or sk\_test), no actual payment is processed. Even if the order status shows “Paid,” do not ship any goods. ![](https://elepay-docs.elestyle.workers.dev/docs/69e2d28-image-20210901-031006.png) 3. Copy the Webhook URL. ![](https://elepay-docs.elestyle.workers.dev/docs/cd45b44-image-20210901-030500.png) 4. In the elepay dashboard, go to “Developer Settings” → “Webhook” and click “New.” ![](https://elepay-docs.elestyle.workers.dev/docs/2762d21-image-20210405-084536.png) 5. Paste the Webhook URL copied in Step 3 into “URL,” check “Payment Succeeded” under “Event Type,” then click “OK.” ![](https://elepay-docs.elestyle.workers.dev/docs/36c9403-image-20210405-085341.png) All settings are now complete.
From the payment method selection screen in EC-CUBE, buyers can see the list of elepay payment methods. > 📘 Only the payment methods enabled in elepay are displayed. Methods not supported by the browser or device are automatically hidden. # Hosted Checkout Integration (https://elepay-docs.elestyle.workers.dev/cases/checkout/elepay-hosted) # Set up the hosted Checkout page [#set-up-the-hosted-checkout-page] When customers click a button on your website, they are redirected to the elepay‑hosted Checkout page. > * Effort: low code, \~20 minutes > * Implementation style: hosted page > * UI flexibility: limited When customers have already selected items and are ready to purchase, follow the steps below. ### Step 1: Create an EasyQR code for the selected items [#step-1-create-an-easyqr-code-for-the-selected-items] #### Configure the Checkout page [#configure-the-checkout-page] Example for [Create EasyQR code](https://elepay-docs.elestyle.workers.dev/openapi/code/createCode): ```sh --data ' { "currency": "JPY", "extra": { "defaultPaymentMethod": "paypay" # QR code for a specific brand }, "amount": 266, # Show total amount "items": [ # Show details for each item { "name": "お茶", "price": 108, "count": 1 }, { "name": "コーラ", "price": 158, "count": 1 } ] } ' ``` | Show details for each item | Show only total amount | QR code for a specific brand | | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | | ![](https://elepay-docs.elestyle.workers.dev/docs/561e8f4eb56cc69195fae551b4003cac5f287b91c1180b97c414c572cb0e4d6c-image.png) | ![](https://elepay-docs.elestyle.workers.dev/docs/fdfa6f6c89671f21da0c49a86a440b156f6b48603faaf6ab5a40f530f3635091-image.png) | ![](https://elepay-docs.elestyle.workers.dev/docs/b839861abb314abe309c7774597672a0b092501ab38416b9a322e95c2da32a4d-image.png) | ### Step 2: Add a payment button on your site and redirect to the Checkout page [#step-2-add-a-payment-button-on-your-site-and-redirect-to-the-checkout-page] Use the JavaScript SDK to navigate to the Checkout page. The SDK automatically detects the device type: it opens the Checkout page on desktop and the Payment page on mobile. ```js ``` ### Step 3: After the customer completes payment, handle the redirect page and status [#step-3-after-the-customer-completes-payment-handle-the-redirect-page-and-status] After the payment flow finishes, the redirect URL includes a status parameter (e.g., status=captured), which allows the frontend to determine success or failure. * captured: Payment completed * cancelled: Payment cancelled * failure: Payment failed > Example: [https://example.com/thank-you?status=captured](https://example.com/thank-you?status=captured) > 👍 To track payment status accurately, receiving event notifications via Webhook is recommended. > > In elepay \[開発設定>Webhook], you can configure the receiving URL. > > When a payment succeeds, elepay sends an event notification to the configured webhook URL. ### Other settings [#other-settings] #### Customize the Checkout page UI [#customize-the-checkout-page-ui] The Checkout page customers see can be customized under elepay \[簡単決済>設定>基本設定], including icon and color scheme. #### Configure payment methods [#configure-payment-methods] Under elepay \[簡単決済>設定>決済方法管理], you can manage available payment methods (review, enable, disable). Newly added payment methods can be used immediately. #### Add location information [#add-location-information] You can add location information when creating the EasyQR code. It is also manageable under elepay \[ロケーション]. # Checkout (https://elepay-docs.elestyle.workers.dev/cases/checkout) EasyCheckout is elepay’s dynamic QR code (MPM) feature. It is used to dynamically display a QR code in the following scenarios so customers can scan and pay. * E‑commerce websites * Self‑ordering * Checkout terminals * Ticket vending machines * Vending machines ![](https://elepay-docs.elestyle.workers.dev/docs/99db5342ab4fb12bab717470e9df68f0658f60d57a9bd18779f4fcd4c987086a-image.png) ### Integration Methods [#integration-methods] | [Hosted](https://elepay-docs.elestyle.workers.dev/cases/checkout/elepay-hosted) | [Embedded](https://elepay-docs.elestyle.workers.dev/cases/checkout/qrwidget) | | ------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------ | | ![](https://elepay-docs.elestyle.workers.dev/docs/1549a376af48980f8a7225dfc3f20da5f9391d18b3fd9936a162debeac85aeca-image.png) | ![](https://elepay-docs.elestyle.workers.dev/docs/1bbf18acef17ee812b911805f01a046a6b306db5b8483eb1f370eb5e62651277-image.png) | | ・Effort: low code, \~20 minutes
・Implementation style: hosted page
・UI flexibility: limited | ・Effort: low code, \~40 minutes
・Implementation style: embedded QR code
・UI flexibility: limited | ### Flow [#flow] ![](https://elepay-docs.elestyle.workers.dev/docs/8ac6d135d117ae433f9837d5cc11896108e20afeb2306181c54979139e48d4e5-easyqr.png) # Embedded QR Payment Integration (https://elepay-docs.elestyle.workers.dev/cases/checkout/qrwidget) Configure fixed devices to enable flexible payments. > * Effort: low code, \~40 minutes > * Implementation style: QR code embedded in page > * UI flexibility: limited Three steps for customers or staff to operate the device and display a payment QR code. ### Step 1: Create an EasyQR code for the product/service [#step-1-create-an-easyqr-code-for-the-productservice] ``` curl --request POST \ --url https://api.elepay.io/codes \ --header 'accept: application/json;charset=utf-8' \ --header 'content-type: application/json;charset=utf-8' \ --header 'authorization: Bearer [秘密鍵]' --data ' { "currency": "JPY", "items": [ { "name": "商品1", "price": 100, "count": 1 } ], "amount": 500, "orderNo": "0419" }' ``` ### Step 2: Configure the embedded UI style and apply it to the device [#step-2-configure-the-embedded-ui-style-and-apply-it-to-the-device] elepay provides UI customization within a certain scope and is suitable for common scenarios. | Param | Type | Description | | ----------------------------- | --------- | -------------------------------------------------------- | | options | `object` | Widget options | | options.container | `string` | CSS selector string of the target container DOM element | | options.direction | `string` | Widget layout: vertical (default) or horizontal | | options.icon | `boolean` | If true, show a QR code with brand icons. Default: false | | options.parts.amount | `boolean` | If true, show amount. Default: true | | options.parts.paymentLogo | `boolean` | If true, show payment method icons. Default: true | | options.parts.tip | `boolean` | If true, show help message. Default: true | | options.theme.primaryColor | `boolean` | Primary color | | options.theme.borderColor | `boolean` | Widget border color. null: no border | | options.theme.backgroundColor | `boolean` | Widget background color. Default: white | **For example** | Vertical | Horizontal | Hide payment methods | QR code only | | ------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------- | | ![](https://elepay-docs.elestyle.workers.dev/docs/98b430a38db9c5c25fb8ba2637bb8c3bf10caf40e8c174101735f3cc02228ca8-CleanShot_1.png) | ![](https://elepay-docs.elestyle.workers.dev/docs/98b430a38db9c5c25fb8ba2637bb8c3bf10caf40e8c174101735f3cc02228ca8-CleanShot_2.png) | ![](https://elepay-docs.elestyle.workers.dev/docs/98b430a38db9c5c25fb8ba2637bb8c3bf10caf40e8c174101735f3cc02228ca8-CleanShot_3.png) | ![](https://elepay-docs.elestyle.workers.dev/docs/98b430a38db9c5c25fb8ba2637bb8c3bf10caf40e8c174101735f3cc02228ca8-CleanShot_4.png) | ### Step 3: After the customer completes payment, handle the payment status [#step-3-after-the-customer-completes-payment-handle-the-payment-status] The widget provides [events](https://elepay-docs.elestyle.workers.dev/guides/javascript/api-reference) to detect payment progress. | Status/Progress | | | ----------------- | -------------------------------------------------------------------------------------------- | | Payment succeeded | `widget.on('success', function (event, codeObject) {// Handle after payment completes });` | | Payment expired | `widget.on('expired', function (event, codeObject) {// e.g., generate a new EasyQR code });` | | Payment error | `widget.on('error', function (event, error) { // Error handling });` | | Destroy widget | `widget.destroy();` | ### Other settings [#other-settings] #### Customize the Checkout page UI [#customize-the-checkout-page-ui] The Checkout page customers see can be customized under elepay \[簡単決済>設定>基本設定], including icon and color scheme. #### Configure payment methods [#configure-payment-methods] Under elepay \[簡単決済>設定>決済方法管理], you can manage available payment methods (review, enable, disable). Newly added payment methods can be used immediately. #### Add location information [#add-location-information] You can add location information when creating the EasyQR code. It is also manageable under elepay \[ロケーション]. # React Native, Flutter (https://elepay-docs.elestyle.workers.dev/guides/other-sdk) * For the React Native SDK integration manual, see the following page. [https://github.com/elestyle/elepay-react-native](https://github.com/elestyle/elepay-react-native) * For the Flutter SDK integration manual, see the following page. [https://pub.dev/packages/elepay\_flutter](https://pub.dev/packages/elepay_flutter) # Server (https://elepay-docs.elestyle.workers.dev/guides/server) elepay supports a variety of languages and e‑commerce services. To support an even broader range of developers, we plan to add more SDKs going forward. # Official SDKs [#official-sdks] * Java * PHP * Ruby (in preparation) * Python (in preparation) ## Java [#java] JDK 1.8 or later is required. ### Manual installation [#manual-installation] Download the SDK from GitHub and import the JAR file under `libs` into your project. ### Install via Maven [#install-via-maven] Add elepay SDK: ```xml io.elepay elepay-java-sdk 1.2.2 ``` ### Install via Gradle [#install-via-gradle] Add elepay SDK: ```groovy compile 'io.elepay:elepay-java-sdk:1.2.2' ``` ## PHP [#php] PHP 7.3 or later is required. ### Manual installation [#manual-installation-1] ```groovy require_once('/path/to/ElepayApi/vendor/autoload.php'); ``` ### Install via Composer [#install-via-composer] 1. Add the following to `composer.json`: ```json { "require": { "elestyle/elepay-php-sdk": ">=1.2.0" } } ``` 1. Run `composer install`: ```text composer install ``` # Payment Method Configuration (https://elepay-docs.elestyle.workers.dev/guides/mobile/payment-methods-config) # Overview [#summary] When using the mobile SDKs (iOS, Android), the configuration for each payment method is described on this page. > ◯: Requires individual settings, △: Only common elepay settings are needed, X: No special settings. ## iOS Development Setup [#ios-development-setup] | Payment | URL Scheme | LSApplicationQueriesSchemes | Apple Pay Merchant ID | | ----------------------------- | ---------- | --------------------------- | --------------------- | | [PayPay](#paypay) | △ | ◯ \*1 | — | | [merpay](#merpay) | △ | X | — | | d払い | X | X | — | | [au PAY](#au-pay) | △ | ◯ \*1 | — | | [Rakuten Pay](#rpay) | △ | ◯ | — | | Paidy | X | X | — | | atone | X | X | — | | [WeChat Pay](#wechat-pay) | ◯ | ◯ | — | | [Alipay](#alipay) | △ | ◯ | — | | [UnionPay (銀聯雲閃付)](#unionpay) | △ | ◯ | ◯ | | [PayPal](#paypal) | X | ◯ | — | | [Apple Pay](#apple-pay) | X | X | ◯ | | Credit Card | X | X | — | *** 1: From ElepaySDK for iOS v3.2.1 onward, you do not need to add each payment app’s scheme to LSApplicationQueriesSchemes. If the payment app is not actually installed, the SDK returns error code "10110". ## Android Development Setup [#android-development-setup] ### About payment providers [#about-payment-providers] #### GoAllpay [#goallpay] If you use GoAllpay, you must add the GoAllpay SDK repository and dependency to your project configuration. For details, refer to the GoAllpay SDK docs in [Chinese](https://git.allpayx.com/OpenAPI/common/src/master/v5/android/Android_Integration_Specification_CH.md) or [English](https://git.allpayx.com/OpenAPI/common/src/master/v5/android/Android_Integration_Specification_EN.md). Setup: > Add the following to the root project’s `build.gradle`: ```groovy repositories { // ... other maven repos // maven repo for GoAllpay SDK maven { url 'https://s01.oss.sonatype.org/content/repositories/releases/' } } ``` > Add the following to the app module’s `build.gradle`: ```groovy dependencies { // ... other dependencies api("io.github.goallpay:allpaysdk:5.2.5") } ``` ### Per-payment-method setup [#per-payment-method-setup] | Payment | AndroidManifest.xml (Process Activity) | build.gradle (Library Dependency) | | ----------------------------- | -------------------------------------- | --------------------------------- | | [PayPay](#paypay) | ◯ | X | | [merpay](#merpay) | ◯ | X | | d払い | X | X | | [au PAY](#au-pay) | ◯ | X | | [Rakuten Pay](#rpay) | X | ◯ | | Paidy | X | X | | atone | X | X | | [WeChat Pay](#wechat-pay) | ◯ | ◯ | | [Alipay](#alipay) | X | ◯ | | [UnionPay (銀聯雲閃付)](#unionpay) | X | X | | [PayPal](#paypal) | X | X | | [Apple Pay](#apple-pay) | X | X | | Credit Card | X | X | From elepay Android SDK 1.8.0 and later, the callback Activity specified in `AndroidManifest.xml` can be consolidated into a single Activity as shown below. The per-payment-method setup used up to 1.7.1 is no longer supported. When using 1.8.0 or later, use `ElepayCallbackActivity`. > 📘 For how to obtain the elepay-specific URL Scheme, see “[URL Scheme for iOS/Android SDK](https://elepay-docs.elestyle.workers.dev/guides/mobile/url-scheme)”. ```xml ←このschemeは「アプリ設定」ページより取得してください。 ``` ## Payment methods [#payment-methods] ### PayPay [#paypay] #### iOS [#ios] ##### iOS 9 and later [#ios-9-and-later] Starting with ElepaySDK for iOS v3.2.1, you can use the payment app without adding the scheme below to LSApplicationQueriesSchemes. If the payment app is not installed, the SDK returns [error code](https://elepay-docs.elestyle.workers.dev/get-started/error-code) “10110”. For ElepaySDK for iOS v3.2.1 and earlier, to hand off to the PayPay app, add the `LSApplicationQueriesSchemes` key under **PROJECT** → **TARGETS** → **Info** (or `Info.plist`) in Xcode. ```xml paypay ``` ##### Callback URL Scheme for iOS apps [#callback-url-scheme-for-ios-apps] For the default elepay URL Scheme, see [here](https://elepay-docs.elestyle.workers.dev/guides/mobile/ios). #### Android [#android] > 🚧 From elepay Android SDK 1.8.0 and later, the callback Activity specified in `AndroidManifest.xml` can be consolidated into `ElepayCallbackActivity`. The per-payment-method setup used up to 1.7.1 is no longer supported. When using 1.8.0 or later, use `ElepayCallbackActivity`. See the [Overview](#summary) for details. To use PayPay, add the URL Scheme from the “App Settings” page of your elepay account to your project’s `AndroidManifest.xml`. ```xml ←このschemeは「アプリ設定」ページより取得してください。 ``` If you customize the Activity launched by the scheme, inherit from `jp.elestyle.androidapp.elepay.activity.paypay.PayPayActivity`. ### merpay [#merpay] #### Android [#android-1] > 🚧 From elepay Android SDK 1.8.0 and later, the callback Activity specified in `AndroidManifest.xml` can be consolidated into `ElepayCallbackActivity`. The per-payment-method setup used up to 1.7.1 is no longer supported. When using 1.8.0 or later, use `ElepayCallbackActivity`. See the [Overview](#summary) for details. To use merpay, add the URL Scheme from the “App Settings” page of your elepay account to your project’s `AndroidManifest.xml`. ```xml ←このschemeは「アプリ設定」ページより取得してください。 ``` ### au PAY [#au-pay] #### iOS [#ios-1] ##### iOS 9 and later [#ios-9-and-later-1] Starting with ElepaySDK for iOS v3.2.1, you can use the payment app without adding the scheme below to LSApplicationQueriesSchemes. If the payment app is not installed, the SDK returns [error code](https://elepay-docs.elestyle.workers.dev/get-started/error-code) “10110”. For ElepaySDK for iOS v3.2.1 and earlier, to hand off to the au PAY app, add the `LSApplicationQueriesSchemes` key under **PROJECT** → **TARGETS** → **Info** (or `Info.plist`) in Xcode. ```xml auwallet ``` ##### Callback URL Scheme for iOS apps [#callback-url-scheme-for-ios-apps-1] For the default elepay URL Scheme, see [here](https://elepay-docs.elestyle.workers.dev/guides/mobile/ios). ### Rakuten Pay [#rpay] #### iOS [#ios-2] To use RPay, in addition to the elepay SDK, you must add the proprietary (non‑public) RPay framework to your project’s build dependencies. Contact elepay support for how to obtain RPayKit.framework and how to add it. ##### iOS 9 and later [#ios-9-and-later-2] To hand off to the Rakuten Pay app, add the `LSApplicationQueriesSchemes` key under **PROJECT** → **TARGETS** → **Info** (or `Info.plist`) in Xcode. ```xml rakutenpaysdk ``` ##### Callback URL Scheme for iOS apps [#callback-url-scheme-for-ios-apps-2] For the default elepay URL Scheme, see [here](https://elepay-docs.elestyle.workers.dev/guides/mobile/ios). #### Android [#android-2] To use RPay, in addition to the elepay SDK, add the proprietary Rakuten Pay AAR (non‑public) to your project’s build dependencies. For how to add the dependency, see the Android Developer [official docs](https://developer.android.com/studio/projects/android-library#psd-add-aar-jar-dependency). > 📘 For the download location of the Rakuten Pay AAR, contact elepay support. ### Apple Pay [#apple-pay] #### iOS [#ios-3] This section describes how to implement Apple Pay. ##### How it works [#how-it-works] Apple Pay allows Apple devices to function as a wallet for simple payments. ##### Apple Pay configuration [#apple-pay-configuration] See [Setting Up Apple Pay](https://developer.apple.com/documentation/passkit/apple_pay/setting_up_apple_pay_requirements). 1. Register an Apple Merchant ID To use Apple Pay, you must register an Apple Merchant ID. 2. Create an Apple Pay certificate A certificate is required to encrypt payment data. Create the certificate as follows: (1) In elepay, go to “開発設定” → “Apple Pay” → “Apple Pay Certificate” and download the CSR (Certificate Signing Request). (2) Upload the CSR on Apple Developer using the Merchant ID created in step 1 to create the certificate. (3) Subsequent certificate handling varies by payment provider; see the corresponding provider section below. 3. Integrate with Xcode Open your project in Xcode and enable Apple Pay under the Capabilities tab. You may be prompted to sign in with your developer account. After enabling it, check the Merchant ID created in step 1 to complete the configuration. See also [Adding capabilities to your app](https://developer.apple.com/documentation/xcode/adding-capabilities-to-your-app). ##### Apple Pay (Stripe) [#apple-pay-stripe]Upload the certificate generated on the Apple Developer site to the elepay `Payment Module (決済モジュール)` dashboard.##### Apple Pay (GMO / Paygent) [#apple-pay-gmo--paygent]The CSR must be generated by the merchant (do not use the CSR available from the elepay dashboard):1) On Apple Developer, create the certificate using your own CSR and Merchant ID. 2) Upload the certificate to the GMO / Paygent dashboard yourself (no upload to the elepay dashboard is required). 3) Only the Apple Merchant ID needs to be provided to the elepay support team.##### Apple Pay (Stripe · UnionPay in China) certificate [#apple-pay-stripe--unionpay-in-china-certificate]**(Required only if you applied for “China UnionPay Apple Pay”)**- On [Apple Developer](https://developer.apple.com/account), create a Certificate Signing Request (CSR). Refer to Apple’s guide.![](https://elepay-docs.elestyle.workers.dev/docs/Apple_Developer1.png)- When creating the CSR, be sure to check “Let me specify key pair information”.![](https://elepay-docs.elestyle.workers.dev/docs/Apple_Developer2.png)- In “Key Pair Information”, set Algorithm to “ECC” and Key Size to “256 bits”.![](https://elepay-docs.elestyle.workers.dev/docs/Apple_Developer3.png)- When uploading the CSR to developer.apple.com, select “No” for “Will payments associated with this Merchant ID be processed exclusively in China?”.![](https://elepay-docs.elestyle.workers.dev/docs/Apple_Developer4.png)- Download the generated certificate (.cer) and export a Personal Information Exchange (.p12) with an empty password. - In elepay “開発設定” → “Apple Pay” → “Apple Pay Certificate (中国)”, upload the certificate (.cer) and the .p12 file above. ### Google Pay [#google-pay] #### Android [#android-3] Specify `googlePayEnvironment` when setting up the elepay SDK. > Using Google Pay requires an application to Google. You may be asked to submit apps built for both TEST and PRODUCTION environments. > > When applying via the [Google Pay & Wallet Console](https://pay.google.com/business/console), you must select the corresponding PSP, such as Stripe (stripe), GMO-PG (gmopg), or Paygent (paygent). When configuring the elepay SDK, you can specify `googlePayExistingPaymentRequired` (default: true) to check whether the user already has a valid payment card in Google Pay. > true: At least one payable card is required in Google Pay. > > false: Do not check cards in Google Pay. If there is no card, the user can add one in the payment dialog. ```kotlin val configuration = ElepayConfiguration( apiKey = "" // test key or live key googlePayEnvironment = GooglePayEnvironment.TEST // or GooglePayEnvironment.PRODUCTION googlePayExistingPaymentRequired = false // default true ) Elepay.setup(configuration) ``` Because Google Pay depends on Google Play Services, you must check availability before use. The SDK provides the following method for availability of Google Pay: ```kotlin // Check whether Google Pay can be used. fun checkIfGooglePayIsReadyToUse( activity: Activity, resultHandler: (Boolean) -> Unit ) ``` ##### Google Pay development [#google-pay-development] 1. Ensure `minSdkVersion` meets the official requirements: [https://developers.google.com/pay/api/android/guides/setup#app%20prerequisites](https://developers.google.com/pay/api/android/guides/setup#app%20prerequisites) 2. Configure `AndroidManifest.xml`: ``` ... ``` ##### Google Pay PRODUCTION verification [#google-pay-production-verification] Per Google Pay requirements, PRODUCTION must use a Google Play release-signed build. Follow this process: 1. Apply for Google Pay API integration. a. [https://developers.google.com/pay/api/android/guides/test-and-deploy/publish-your-integration](https://developers.google.com/pay/api/android/guides/test-and-deploy/publish-your-integration) 2. You must download the app from Google Play Store and test it (a locally installed release-signed APK is not accepted). a. [https://developers.google.com/pay/api/android/guides/setup#app%20prerequisites](https://developers.google.com/pay/api/android/guides/setup#app%20prerequisites) b. After signing with your release key and uploading to Google Play, download with a tester account and verify Google Pay functionality. 3. Use `GooglePayEnvironment.PRODUCTION`, not `GooglePayEnvironment.TEST`. ##### Differences between TEST and PRODUCTION [#differences-between-test-and-production] When `googlePayExistingPaymentRequired` is true: 1. **Test environment**: Depends on the Google Wallet app. Install Google Wallet and register a credit card; otherwise the Google Pay dialog will not start and `checkIfGooglePayIsReadyToUse` returns `false` (forcing a payment will return error code 10100). 2. **Production environment**: Real users must have a payment card registered in Google Wallet or their Google account. If not, `checkIfGooglePayIsReadyToUse` returns `false` (forcing a payment will return error code 10100). When `googlePayExistingPaymentRequired` is false: 1. **Test environment**: The payment dialog automatically fills test card information. 2. **Production environment**: If the user has no card in Google Pay, the dialog prompts them to add a card. ##### Google Pay × GMO Test Mode (3DS2 integration) [#google-pay--gmo-test-mode-3ds2-integration] When invoking Google Pay through the GMO channel in Test Mode (charge `liveMode=false`), the SDK replaces the real token returned by Google Wallet with the `googlePayTestToken` issued by elepay, and then hands it to GMO `ExecutePaymentFlow` to trigger 3DS2 authentication. To cover different 3DS2 scenarios during development (challenge / frictionless, various failure codes, etc.), contact the elepay support team to adjust this test token. No changes are required on the app side. ### PayPal [#paypal] #### iOS [#ios-4] ##### Callback URL Scheme for iOS apps [#callback-url-scheme-for-ios-apps-3] For the default elepay URL Scheme, see [here](https://elepay-docs.elestyle.workers.dev/guides/mobile/ios). In addition, add a PayPal‑specific URL Scheme that starts with your app’s Bundle ID. See [elepay Dashboard](https://dashboard.elepay.io/) → **開発設定** → **アプリ設定** → **URL Scheme** → **PayPal**. ##### iOS 9 and later [#ios-9-and-later-3] To hand off to the PayPal app, add the `LSApplicationQueriesSchemes` key under **PROJECT** → **TARGETS** → **Info** (or `Info.plist`) in Xcode. ```xml com.paypal.ppclient.touch.v1 com.paypal.ppclient.touch.v2 ``` ### Alipay [#alipay] #### iOS [#ios-5] Alipay is a simple and secure payment service provided by Ant Financial, available on iOS, Android, and web browsers. ##### iOS 9 and later [#ios-9-and-later-4] To hand off to the Alipay app, add the `LSApplicationQueriesSchemes` key under **PROJECT** → **TARGETS** → **Info** (or `Info.plist`) in Xcode. ```xml alipay ``` ##### Callback URL Scheme for iOS apps [#callback-url-scheme-for-ios-apps-4] For the default elepay URL Scheme, see [here](https://elepay-docs.elestyle.workers.dev/guides/mobile/ios). #### Android [#android-4] To use Alipay, download the [Alipay SDK](https://doc.open.alipay.com/doc2/detail.htm?treeId=54\&articleId=104509\&docType=1) and place it under your project’s `libs` folder. > 📘 The Alipay SDK filename looks like: > alipaySdk-15.6.8-20191021122455-noUtdid.aar Then, add the Alipay SDK dependency to your app’s `build.gradle`: ```groovy dependencies { // ... other dependencies implementation files('libs/alipaySdk-20170725.jar') } ``` ### WeChat Pay [#wechat-pay] #### iOS [#ios-6] ##### Callback URL Scheme for iOS apps [#callback-url-scheme-for-ios-apps-5] For the default elepay URL Scheme, see [here](https://elepay-docs.elestyle.workers.dev/guides/mobile/ios). In addition, a WeChat‑specific URL Scheme (starting with `wx`) is required. See [elepay Dashboard](https://dashboard.elepay.io/) → **開発設定** → **アプリ設定** → **URL Scheme** → **WeChat Pay**. If WeChat Pay is not enabled, this section is hidden. ##### iOS 9 and later [#ios-9-and-later-5] To hand off to the WeChat Pay app, add the `LSApplicationQueriesSchemes` key under **PROJECT** → **TARGETS** → **Info** (or `Info.plist`) in Xcode. ```xml weixin weixinULAPI ``` #### Android [#android-5] WeChat Pay depends on the WeChat library. Add the WeChat SDK dependency to `build.gradle`. We recommend the latest version; see [WeChat SDK maven](https://bintray.com/wechat-sdk-team/maven) for versions. ```groovy dependencies { // ... other dependencies implementation "com.tencent.mm.opensdk:wechat-sdk-android-without-mta:version" } ``` Then add the following `activity-alias` to your project’s `AndroidManifest.xml`. WeChat Pay looks for `package.name.wxapi.WXPayEntryActivity`, so the elepay SDK links into your existing code. ```xml ``` ### UnionPay(銀聯雲閃付) [#unionpay] #### iOS [#ios-7] ##### iOS 9 and later [#ios-9-and-later-6] To hand off to a UnionPay app, add the `LSApplicationQueriesSchemes` key under **PROJECT** → **TARGETS** → **Info** (or `Info.plist`) in Xcode. ```xml uppaysdk uppaywallet uppayx1 uppayx2 uppayx3 ``` ##### Callback URL Scheme for iOS apps [#callback-url-scheme-for-ios-apps-6] For the default elepay URL Scheme, see [here](https://elepay-docs.elestyle.workers.dev/guides/mobile/ios). # URL Scheme (https://elepay-docs.elestyle.workers.dev/guides/mobile/url-scheme) # Obtain the URL Scheme for iOS / Android SDK [#obtain-the-url-scheme-for-ios--android-sdk] Please log in from the [elepay dashboard](https://dashboard.elepay.io/). After logging in, go to **Multi-Payments → Developer Settings → App Settings** in this order (see the images below). ![](https://elepay-docs.elestyle.workers.dev/docs/8ff36ca-IMG_0665.png) On the App Settings screen, add a new app configuration. When adding, you will need the production app’s Bundle ID (for iOS apps) and Package Name (for Android apps). ![](https://elepay-docs.elestyle.workers.dev/docs/bda4ad9-IMG_0666.png) Once the app configuration is added, a “Getting Started” guide will be shown on the screen where you can confirm the URL Scheme. ![](https://elepay-docs.elestyle.workers.dev/docs/62d3dac-IMG_0667.png) # Capture charge (https://elepay-docs.elestyle.workers.dev/openapi/charge/captureCharge) Captures a charge. **Page URL**: https://elepay-docs.elestyle.workers.dev/openapi/charge/captureCharge **Endpoint**: POST /charges/{id}/capture ```json { "openapi": "3.1.0", "info": { "version": "1.3.0", "title": "elepay API Reference", "description": "The elepay API is a REST-based payment API. It provides various capabilities for payment operations, such as processing payments and refunds.", "contact": { "name": "ELESTYLE, INC", "url": "https://elepay.io", "email": "support@elestyle.jp" } }, "servers": [ { "url": "https://api.elepay.io" } ], "security": [ { "bearerAuth": [] }, { "basicAuth": [] } ], "tags": [ { "name": "Charge" } ], "paths": { "/charges/{id}/capture": { "post": { "tags": [ "Charge" ], "summary": "Capture charge", "description": "Captures a charge.", "operationId": "captureCharge", "parameters": [ { "name": "id", "description": "Charge ID", "in": "path", "required": true, "schema": { "type": "string" } } ], "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ChargeCaptureReq" } } } }, "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ChargeDto" } } } } } } } }, "components": { "schemas": { "ChargeCaptureReq": { "description": "Capture request", "type": "object", "properties": { "amount": { "description": "Capture amount\nBy setting this, you can process a payment amount different from the amount at creation. Note that it must be less than the amount at creation.\n", "type": "integer" }, "extra": { "type": "object", "maxProperties": 20, "propertyNames": { "type": "string", "maxLength": 20 }, "additionalProperties": { "type": "string" } } } }, "ChargeDto": { "type": "object", "description": "Payment object", "properties": { "id": { "description": "Charge ID", "type": "string", "maxLength": 32 }, "appId": { "description": "App ID", "type": "string", "maxLength": 32 }, "object": { "description": "Object type", "type": "string", "default": "charge" }, "liveMode": { "description": "Whether this is live mode\n- false Test mode\n- true Live mode\n", "type": "boolean" }, "amount": { "description": "Payment amount", "type": "integer" }, "authorizeAmount": { "description": "Pre-authorization amount", "type": "integer" }, "currency": { "description": "Currency code (ISO 4217)", "type": "string", "minLength": 3, "maxLength": 3, "default": "JPY" }, "authorize": { "description": "Pre-authorization flag", "type": "boolean" }, "paymentMethod": { "$ref": "#/components/schemas/PaymentMethodType" }, "resource": { "$ref": "#/components/schemas/ResourceType" }, "orderNo": { "description": "Merchant system order number, e.g., order number, payment ID, etc.", "type": "string", "maxLength": 50 }, "description": { "description": "Payment description", "type": "string", "maxLength": 1024 }, "location": { "$ref": "#/components/schemas/ChargeLocationDto" }, "extra": { "description": "Payment extra data", "type": "object", "maxProperties": 20, "propertyNames": { "type": "string", "maxLength": 20 }, "additionalProperties": { "type": "string" } }, "metadata": { "description": "Payment metadata", "type": "object", "maxProperties": 20, "propertyNames": { "type": "string", "maxLength": 20 }, "additionalProperties": { "type": "string" } }, "cardInfo": { "$ref": "#/components/schemas/CardInfo" }, "voucherNo": { "description": "Provider payment voucher number", "type": "string", "maxLength": 32 }, "clientIp": { "description": "Client IP address", "type": "string", "maxLength": 45 }, "paid": { "description": "Paid flag", "type": "boolean" }, "refunded": { "description": "Refunded flag", "type": "boolean" }, "disputed": { "description": "Disputed flag", "type": "boolean" }, "refunds": { "$ref": "#/components/schemas/RefundsDto" }, "status": { "$ref": "#/components/schemas/ChargeStatusType" }, "codeContent": { "description": "Merchant-presented QR code (only when resource is mpm)", "type": "string" }, "credential": { "description": "Client SDK credentials", "type": "string" }, "paidTime": { "description": "Payment time (epoch millisecond)", "type": "integer", "format": "int64" }, "refundTime": { "description": "Refund time (epoch millisecond)", "type": "integer", "format": "int64" }, "expiryTime": { "description": "Payment request expiry time (epoch millisecond)", "type": "integer", "format": "int64" }, "settleTime": { "description": "Payment settlement time (epoch millisecond)", "type": "integer", "format": "int64" }, "createTime": { "description": "Payment creation time (epoch millisecond)", "type": "integer", "format": "int64" } } }, "PaymentMethodType": { "description": "Payment method\n- auto Auto detection (available for CPM payments only)\n- alipay Alipay\n- alipayhk AlipayHK\n- alipayplus Alipay+\n- amazonpay Amazon Pay\n- applepay Apple Pay\n- applepay_cn Apple Pay (China)\n- atokara Atokara\n- atone atone (pay next month at convenience stores)\n- aupay au Pay\n- clicktopay Click To Pay\n- banktransfer Bank transfer\n- creditcard Credit card\n- dana DANA\n- docomopay d Payment\n- ezlink EZ-Link\n- felica E-money\n- felica_id iD\n- felica_quickpay QUICPay\n- felica_transport_ic Transit IC card\n- gcash GCash\n- ginkopay Bank Pay\n- googlepay Google Pay\n- jcoinpay J-Coin Pay\n- jkopay JKOPAY\n- kakaopay Kakao Pay\n- konbini Convenience store payment\n- linepay LINE Pay\n- merpay Merpay\n- origamipay Origami Pay\n- paidy Paidy (pay next month)\n- paypal PayPal\n- paypay PayPay\n- pxpayplus AllPay\n- rakutenpay Rakuten Pay\n- smartcode Smart Code\n- tng Touch 'n Go eWallet\n- truemoney TrueMoney\n- unionpay UnionPay QuickPass\n- wechatpay Wechat Pay\n- aeonpay AEON Pay\n- rabbitlinepay Rabbit LINE Pay\n- bpi BPI\n- boost Boost\n- hellomoney HelloMoney by AUB\n- tosspay Toss Pay\n- naverpay Naver Pay\n- wellwa WellWa Points\n- grabpay Grab Pay\n- momopay Momo Pay\n- promptpay Prompt Pay\n- wovenpay Woven City Pay\n- ezopay EZO Pay\n", "type": "string", "enum": [ "alipay", "alipayhk", "alipayplus", "amazonpay", "applepay", "applepay_cn", "atokara", "atone", "aupay", "clicktopay", "banktransfer", "creditcard", "dana", "docomopay", "ezlink", "felica", "felica_id", "felica_quickpay", "felica_transport_ic", "gcash", "ginkopay", "googlepay", "jcoinpay", "jkopay", "kakaopay", "konbini", "linepay", "merpay", "origamipay", "paidy", "paypal", "paypay", "pxpayplus", "rakutenpay", "smartcode", "tng", "truemoney", "unionpay", "wechatpay", "aeonpay", "rabbitlinepay", "bpi", "boost", "hellomoney", "tosspay", "naverpay", "wellwa", "grabpay", "momopay", "promptpay", "wovenpay", "ezopay", "auto" ] }, "ResourceType": { "description": "Payment resource\n- web Web browser\n- ios iOS native app\n- android Android native app\n- liff LINE LIFF app\n- mini WeChat Mini Program\n- cpm CPM payment (customer-presented QR code)\n- mpm MPM payment (merchant-presented QR code)\n- reader Card reader payment (reader device required)\n- posapp POS app payment (POS app integration required)\n", "type": "string", "enum": [ "web", "ios", "android", "liff", "mini", "cpm", "mpm", "reader", "posapp" ] }, "ChargeLocationDto": { "description": "Location object", "type": "object", "properties": { "id": { "description": "Location ID", "type": "string", "maxLength": 32 }, "name": { "$ref": "#/components/schemas/StringTransliterationDto" }, "tel": { "description": "Phone number", "type": "string", "maxLength": 20 }, "zip": { "description": "Postal code", "type": "string", "maxLength": 8 }, "address": { "$ref": "#/components/schemas/AddressTransliterationDto" }, "latitude": { "description": "Latitude", "type": "number", "format": "double" }, "longitude": { "description": "Longitude", "type": "number", "format": "double" }, "note": { "description": "Remarks", "type": "string" }, "status": { "$ref": "#/components/schemas/ChargeLocationStatusType" } } }, "CardInfo": { "type": "object", "description": "Card and wallet information", "properties": { "brand": { "$ref": "#/components/schemas/CardBrandType" }, "last4": { "description": "Last 4 digits of the card number", "type": "string" }, "expMonth": { "description": "Expiration month", "type": "integer" }, "expYear": { "description": "Expiration year", "type": "integer" }, "name": { "description": "Cardholder name", "type": "string" }, "issuerCode": { "description": "Card issuer code (GMO payment only)\nComplies with GMO-PG \"destination card company code\"\n", "type": "string" }, "issuerName": { "description": "Card issuer name (GMO payment only)\nCompany name corresponding to GMO-PG \"destination card company code\"\n", "type": "string" }, "wallet": { "description": "Wallet information", "type": "string" }, "walletApp": { "description": "Wallet app information (for paymentMethod alipayplus or smartcode, the actual app name used)", "type": "string" }, "repaymentType": { "description": "Repayment type\n- 1 One-time payment\n- revolving Revolving payment\n- bonus_one_time Bonus one-time payment\n- 2 Two-installment payment\n- 3 Three-installment payment\n", "type": "string" }, "approvalCode": { "description": "Authorization code", "type": "string" }, "threeDSecure": { "description": "3D Secure enabled", "type": "boolean" }, "threeDSecureVersion": { "description": "3D Secure version", "type": "string" }, "threeDSecureDetail": { "description": "3D Secure details", "type": "string" }, "businessType": { "description": "Business type", "type": "string" }, "konbiniScanTime": { "description": "Last scan time by the convenience store", "type": "integer", "format": "int64" }, "konbiniType": { "description": "Convenience store type used for the actual payment\n- unknown\n- seven_eleven\n- lawson\n- familymart\n- ministop\n- seicomart\n", "type": "string" }, "receivedAmount": { "description": "Actual amount received from the convenience store or bank", "type": "integer" }, "receivedTime": { "description": "Actual time received by the convenience store or bank; this value may contain only the date (midnight).", "type": "integer", "format": "int64" }, "bankUserCode": { "description": "Bank transfer user code", "type": "string" }, "bankUserName": { "description": "Bank transfer user name", "type": "string" }, "bankName": { "description": "Receiving bank name", "type": "string" }, "bankBranchName": { "description": "Receiving bank branch name", "type": "string" }, "bankAccountNo": { "description": "Receiving bank account number", "type": "string" }, "billingNo": { "description": "Billing number (for payment station)", "type": "string" } } }, "RefundsDto": { "description": "Refund summary. If multiple refunds are issued, refund details are summarized and returned.", "type": "object", "properties": { "amount": { "description": "Total refunded amount", "type": "integer" }, "totalCount": { "description": "Number of refunds", "type": "integer" }, "data": { "description": "Refund details", "type": "array", "items": { "$ref": "#/components/schemas/RefundDto" } } } }, "ChargeStatusType": { "description": "Payment status\n- pending Unpaid\n- waiting Waiting for payment (information entered)\n- notified Preparing for payment (notified)\n- uncaptured Authorized (not captured)\n- captured Paid\n- partially_refunded Partially refunded\n- refunded Refunded\n- amount_mismatch Amount mismatch\n- revoked Canceled\n- failed Payment failed\n", "type": "string", "enum": [ "pending", "waiting", "notified", "uncaptured", "captured", "partially_refunded", "refunded", "amount_mismatch", "revoked", "failed" ] }, "StringTransliterationDto": { "description": "Name transliteration object", "type": "object", "properties": { "kanji": { "description": "Kanji", "type": "string" }, "kana": { "description": "Kana", "type": "string" }, "romaji": { "description": "Romaji", "type": "string" } } }, "AddressTransliterationDto": { "description": "Address transliteration object", "type": "object", "properties": { "kanji": { "$ref": "#/components/schemas/AddressDto" }, "kana": { "$ref": "#/components/schemas/AddressDto" }, "romaji": { "$ref": "#/components/schemas/AddressDto" } } }, "ChargeLocationStatusType": { "description": "Location status\n- active Active\n- submitted Submitted\n", "type": "string", "enum": [ "active", "submitted" ] }, "CardBrandType": { "description": "- unknown\n- visa\n- mastercard\n- amex\n- jcb\n- diners\n- unionpay\n- discover\n- felica\n- seven_eleven\n- lawson\n- familymart\n- ministop\n- seicomart\n", "type": "string" }, "RefundDto": { "description": "Refund object", "type": "object", "properties": { "id": { "description": "Refund ID", "type": "string", "maxLength": 32 }, "object": { "description": "Object type", "type": "string", "default": "refund" }, "chargeId": { "description": "Charge ID", "type": "string", "maxLength": 32 }, "liveMode": { "description": "Whether this is live mode\n- false Test mode\n- true Live mode\n", "type": "boolean" }, "amount": { "description": "Refund amount. You can refund the full amount, or partially refund by specifying amount.", "type": "integer" }, "currency": { "description": "Currency code (ISO 4217)", "type": "string", "minLength": 3, "maxLength": 3 }, "metadata": { "description": "Refund metadata", "type": "object", "maxProperties": 20, "propertyNames": { "type": "string", "maxLength": 20 }, "additionalProperties": { "type": "string" } }, "reason": { "description": "Refund reason", "type": "string", "maxLength": 255 }, "status": { "$ref": "#/components/schemas/RefundStatusType" }, "refundedTime": { "description": "Refund processed time (epoch millisecond)", "type": "integer", "format": "int64" }, "createTime": { "description": "Refund creation time (epoch millisecond)", "type": "integer", "format": "int64" } } }, "AddressDto": { "description": "Address object", "type": "object", "properties": { "pref": { "description": "Prefecture", "type": "string" }, "city": { "description": "City/Municipality", "type": "string" }, "town": { "description": "Town", "type": "string" }, "address1": { "description": "Address line 1", "type": "string" }, "address2": { "description": "Address line 2", "type": "string" } } }, "RefundStatusType": { "description": "Refund status\n- pending Not refunded\n- refunded Refunded\n", "type": "string", "enum": [ "pending", "refunded" ] } }, "securitySchemes": { "bearerAuth": { "type": "http", "scheme": "bearer", "description": "API authentication is performed via Bearer auth using the secret key as the bearer token.\nThe secret key is a critical key that allows all API operations, so handle it with care.\n" }, "basicAuth": { "type": "http", "scheme": "basic", "description": "API authentication is performed via Basic auth using the secret key as the username and omitting the password.\nThe secret key is a critical key that allows all API operations, so handle it with care.\n" } } } } ``` # Create charge (https://elepay-docs.elestyle.workers.dev/openapi/charge/createCharge) Creates a charge. **Page URL**: https://elepay-docs.elestyle.workers.dev/openapi/charge/createCharge **Endpoint**: POST /charges ```json { "openapi": "3.1.0", "info": { "version": "1.3.0", "title": "elepay API Reference", "description": "The elepay API is a REST-based payment API. It provides various capabilities for payment operations, such as processing payments and refunds.", "contact": { "name": "ELESTYLE, INC", "url": "https://elepay.io", "email": "support@elestyle.jp" } }, "servers": [ { "url": "https://api.elepay.io" } ], "security": [ { "bearerAuth": [] }, { "basicAuth": [] } ], "tags": [ { "name": "Charge" } ], "paths": { "/charges": { "post": { "tags": [ "Charge" ], "summary": "Create charge", "description": "Creates a charge.", "operationId": "createCharge", "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ChargeReq" } } }, "description": "Payment request", "required": true }, "responses": { "201": { "description": "Created", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ChargeDto" } } } } } } } }, "components": { "schemas": { "ChargeReq": { "type": "object", "description": "Payment request", "required": [ "amount", "paymentMethod", "orderNo" ], "properties": { "amount": { "description": "Amount", "type": "integer" }, "capture": { "description": "Whether to capture the payment.\nIf false, only authorization and amount hold are performed. Default is true.\n", "type": "boolean", "default": true }, "currency": { "description": "Currency code (ISO 4217)", "type": "string", "minLength": 3, "maxLength": 3, "default": "JPY" }, "paymentMethod": { "$ref": "#/components/schemas/PaymentMethodType" }, "resource": { "$ref": "#/components/schemas/ResourceType" }, "orderNo": { "description": "Merchant system order number (e.g., order number, payment ID, etc.).\nMaximum length is 50 characters.\n", "type": "string", "maxLength": 50 }, "description": { "description": "Description of the payment", "type": "string", "maxLength": 1024 }, "extra": { "description": "Used when there is additional payment-related information. For details, refer to 'Developer Guide -> Payment Extra Information Settings'.", "type": "object", "maxProperties": 20, "propertyNames": { "type": "string", "maxLength": 20 }, "additionalProperties": { "type": "string" } }, "metadata": { "description": "Metadata\nArbitrary key-value data.\nUp to 20 keys; values are strings up to 255 bytes.\nStrings beginning with 'route' or '__' are reserved keys.\n", "type": "object", "maxProperties": 20, "propertyNames": { "type": "string", "maxLength": 20 }, "additionalProperties": { "type": "string" } }, "clientIp": { "description": "Client IP address", "type": "string", "maxLength": 39 }, "customerId": { "description": "Customer ID", "type": "string", "maxLength": 32 }, "sourceId": { "description": "Customer source ID", "type": "string", "maxLength": 32 }, "locationId": { "description": "Location ID", "type": "string", "maxLength": 32 } } }, "ChargeDto": { "type": "object", "description": "Payment object", "properties": { "id": { "description": "Charge ID", "type": "string", "maxLength": 32 }, "appId": { "description": "App ID", "type": "string", "maxLength": 32 }, "object": { "description": "Object type", "type": "string", "default": "charge" }, "liveMode": { "description": "Whether this is live mode\n- false Test mode\n- true Live mode\n", "type": "boolean" }, "amount": { "description": "Payment amount", "type": "integer" }, "authorizeAmount": { "description": "Pre-authorization amount", "type": "integer" }, "currency": { "description": "Currency code (ISO 4217)", "type": "string", "minLength": 3, "maxLength": 3, "default": "JPY" }, "authorize": { "description": "Pre-authorization flag", "type": "boolean" }, "paymentMethod": { "$ref": "#/components/schemas/PaymentMethodType" }, "resource": { "$ref": "#/components/schemas/ResourceType" }, "orderNo": { "description": "Merchant system order number, e.g., order number, payment ID, etc.", "type": "string", "maxLength": 50 }, "description": { "description": "Payment description", "type": "string", "maxLength": 1024 }, "location": { "$ref": "#/components/schemas/ChargeLocationDto" }, "extra": { "description": "Payment extra data", "type": "object", "maxProperties": 20, "propertyNames": { "type": "string", "maxLength": 20 }, "additionalProperties": { "type": "string" } }, "metadata": { "description": "Payment metadata", "type": "object", "maxProperties": 20, "propertyNames": { "type": "string", "maxLength": 20 }, "additionalProperties": { "type": "string" } }, "cardInfo": { "$ref": "#/components/schemas/CardInfo" }, "voucherNo": { "description": "Provider payment voucher number", "type": "string", "maxLength": 32 }, "clientIp": { "description": "Client IP address", "type": "string", "maxLength": 45 }, "paid": { "description": "Paid flag", "type": "boolean" }, "refunded": { "description": "Refunded flag", "type": "boolean" }, "disputed": { "description": "Disputed flag", "type": "boolean" }, "refunds": { "$ref": "#/components/schemas/RefundsDto" }, "status": { "$ref": "#/components/schemas/ChargeStatusType" }, "codeContent": { "description": "Merchant-presented QR code (only when resource is mpm)", "type": "string" }, "credential": { "description": "Client SDK credentials", "type": "string" }, "paidTime": { "description": "Payment time (epoch millisecond)", "type": "integer", "format": "int64" }, "refundTime": { "description": "Refund time (epoch millisecond)", "type": "integer", "format": "int64" }, "expiryTime": { "description": "Payment request expiry time (epoch millisecond)", "type": "integer", "format": "int64" }, "settleTime": { "description": "Payment settlement time (epoch millisecond)", "type": "integer", "format": "int64" }, "createTime": { "description": "Payment creation time (epoch millisecond)", "type": "integer", "format": "int64" } } }, "PaymentMethodType": { "description": "Payment method\n- auto Auto detection (available for CPM payments only)\n- alipay Alipay\n- alipayhk AlipayHK\n- alipayplus Alipay+\n- amazonpay Amazon Pay\n- applepay Apple Pay\n- applepay_cn Apple Pay (China)\n- atokara Atokara\n- atone atone (pay next month at convenience stores)\n- aupay au Pay\n- clicktopay Click To Pay\n- banktransfer Bank transfer\n- creditcard Credit card\n- dana DANA\n- docomopay d Payment\n- ezlink EZ-Link\n- felica E-money\n- felica_id iD\n- felica_quickpay QUICPay\n- felica_transport_ic Transit IC card\n- gcash GCash\n- ginkopay Bank Pay\n- googlepay Google Pay\n- jcoinpay J-Coin Pay\n- jkopay JKOPAY\n- kakaopay Kakao Pay\n- konbini Convenience store payment\n- linepay LINE Pay\n- merpay Merpay\n- origamipay Origami Pay\n- paidy Paidy (pay next month)\n- paypal PayPal\n- paypay PayPay\n- pxpayplus AllPay\n- rakutenpay Rakuten Pay\n- smartcode Smart Code\n- tng Touch 'n Go eWallet\n- truemoney TrueMoney\n- unionpay UnionPay QuickPass\n- wechatpay Wechat Pay\n- aeonpay AEON Pay\n- rabbitlinepay Rabbit LINE Pay\n- bpi BPI\n- boost Boost\n- hellomoney HelloMoney by AUB\n- tosspay Toss Pay\n- naverpay Naver Pay\n- wellwa WellWa Points\n- grabpay Grab Pay\n- momopay Momo Pay\n- promptpay Prompt Pay\n- wovenpay Woven City Pay\n- ezopay EZO Pay\n", "type": "string", "enum": [ "alipay", "alipayhk", "alipayplus", "amazonpay", "applepay", "applepay_cn", "atokara", "atone", "aupay", "clicktopay", "banktransfer", "creditcard", "dana", "docomopay", "ezlink", "felica", "felica_id", "felica_quickpay", "felica_transport_ic", "gcash", "ginkopay", "googlepay", "jcoinpay", "jkopay", "kakaopay", "konbini", "linepay", "merpay", "origamipay", "paidy", "paypal", "paypay", "pxpayplus", "rakutenpay", "smartcode", "tng", "truemoney", "unionpay", "wechatpay", "aeonpay", "rabbitlinepay", "bpi", "boost", "hellomoney", "tosspay", "naverpay", "wellwa", "grabpay", "momopay", "promptpay", "wovenpay", "ezopay", "auto" ] }, "ResourceType": { "description": "Payment resource\n- web Web browser\n- ios iOS native app\n- android Android native app\n- liff LINE LIFF app\n- mini WeChat Mini Program\n- cpm CPM payment (customer-presented QR code)\n- mpm MPM payment (merchant-presented QR code)\n- reader Card reader payment (reader device required)\n- posapp POS app payment (POS app integration required)\n", "type": "string", "enum": [ "web", "ios", "android", "liff", "mini", "cpm", "mpm", "reader", "posapp" ] }, "ChargeLocationDto": { "description": "Location object", "type": "object", "properties": { "id": { "description": "Location ID", "type": "string", "maxLength": 32 }, "name": { "$ref": "#/components/schemas/StringTransliterationDto" }, "tel": { "description": "Phone number", "type": "string", "maxLength": 20 }, "zip": { "description": "Postal code", "type": "string", "maxLength": 8 }, "address": { "$ref": "#/components/schemas/AddressTransliterationDto" }, "latitude": { "description": "Latitude", "type": "number", "format": "double" }, "longitude": { "description": "Longitude", "type": "number", "format": "double" }, "note": { "description": "Remarks", "type": "string" }, "status": { "$ref": "#/components/schemas/ChargeLocationStatusType" } } }, "CardInfo": { "type": "object", "description": "Card and wallet information", "properties": { "brand": { "$ref": "#/components/schemas/CardBrandType" }, "last4": { "description": "Last 4 digits of the card number", "type": "string" }, "expMonth": { "description": "Expiration month", "type": "integer" }, "expYear": { "description": "Expiration year", "type": "integer" }, "name": { "description": "Cardholder name", "type": "string" }, "issuerCode": { "description": "Card issuer code (GMO payment only)\nComplies with GMO-PG \"destination card company code\"\n", "type": "string" }, "issuerName": { "description": "Card issuer name (GMO payment only)\nCompany name corresponding to GMO-PG \"destination card company code\"\n", "type": "string" }, "wallet": { "description": "Wallet information", "type": "string" }, "walletApp": { "description": "Wallet app information (for paymentMethod alipayplus or smartcode, the actual app name used)", "type": "string" }, "repaymentType": { "description": "Repayment type\n- 1 One-time payment\n- revolving Revolving payment\n- bonus_one_time Bonus one-time payment\n- 2 Two-installment payment\n- 3 Three-installment payment\n", "type": "string" }, "approvalCode": { "description": "Authorization code", "type": "string" }, "threeDSecure": { "description": "3D Secure enabled", "type": "boolean" }, "threeDSecureVersion": { "description": "3D Secure version", "type": "string" }, "threeDSecureDetail": { "description": "3D Secure details", "type": "string" }, "businessType": { "description": "Business type", "type": "string" }, "konbiniScanTime": { "description": "Last scan time by the convenience store", "type": "integer", "format": "int64" }, "konbiniType": { "description": "Convenience store type used for the actual payment\n- unknown\n- seven_eleven\n- lawson\n- familymart\n- ministop\n- seicomart\n", "type": "string" }, "receivedAmount": { "description": "Actual amount received from the convenience store or bank", "type": "integer" }, "receivedTime": { "description": "Actual time received by the convenience store or bank; this value may contain only the date (midnight).", "type": "integer", "format": "int64" }, "bankUserCode": { "description": "Bank transfer user code", "type": "string" }, "bankUserName": { "description": "Bank transfer user name", "type": "string" }, "bankName": { "description": "Receiving bank name", "type": "string" }, "bankBranchName": { "description": "Receiving bank branch name", "type": "string" }, "bankAccountNo": { "description": "Receiving bank account number", "type": "string" }, "billingNo": { "description": "Billing number (for payment station)", "type": "string" } } }, "RefundsDto": { "description": "Refund summary. If multiple refunds are issued, refund details are summarized and returned.", "type": "object", "properties": { "amount": { "description": "Total refunded amount", "type": "integer" }, "totalCount": { "description": "Number of refunds", "type": "integer" }, "data": { "description": "Refund details", "type": "array", "items": { "$ref": "#/components/schemas/RefundDto" } } } }, "ChargeStatusType": { "description": "Payment status\n- pending Unpaid\n- waiting Waiting for payment (information entered)\n- notified Preparing for payment (notified)\n- uncaptured Authorized (not captured)\n- captured Paid\n- partially_refunded Partially refunded\n- refunded Refunded\n- amount_mismatch Amount mismatch\n- revoked Canceled\n- failed Payment failed\n", "type": "string", "enum": [ "pending", "waiting", "notified", "uncaptured", "captured", "partially_refunded", "refunded", "amount_mismatch", "revoked", "failed" ] }, "StringTransliterationDto": { "description": "Name transliteration object", "type": "object", "properties": { "kanji": { "description": "Kanji", "type": "string" }, "kana": { "description": "Kana", "type": "string" }, "romaji": { "description": "Romaji", "type": "string" } } }, "AddressTransliterationDto": { "description": "Address transliteration object", "type": "object", "properties": { "kanji": { "$ref": "#/components/schemas/AddressDto" }, "kana": { "$ref": "#/components/schemas/AddressDto" }, "romaji": { "$ref": "#/components/schemas/AddressDto" } } }, "ChargeLocationStatusType": { "description": "Location status\n- active Active\n- submitted Submitted\n", "type": "string", "enum": [ "active", "submitted" ] }, "CardBrandType": { "description": "- unknown\n- visa\n- mastercard\n- amex\n- jcb\n- diners\n- unionpay\n- discover\n- felica\n- seven_eleven\n- lawson\n- familymart\n- ministop\n- seicomart\n", "type": "string" }, "RefundDto": { "description": "Refund object", "type": "object", "properties": { "id": { "description": "Refund ID", "type": "string", "maxLength": 32 }, "object": { "description": "Object type", "type": "string", "default": "refund" }, "chargeId": { "description": "Charge ID", "type": "string", "maxLength": 32 }, "liveMode": { "description": "Whether this is live mode\n- false Test mode\n- true Live mode\n", "type": "boolean" }, "amount": { "description": "Refund amount. You can refund the full amount, or partially refund by specifying amount.", "type": "integer" }, "currency": { "description": "Currency code (ISO 4217)", "type": "string", "minLength": 3, "maxLength": 3 }, "metadata": { "description": "Refund metadata", "type": "object", "maxProperties": 20, "propertyNames": { "type": "string", "maxLength": 20 }, "additionalProperties": { "type": "string" } }, "reason": { "description": "Refund reason", "type": "string", "maxLength": 255 }, "status": { "$ref": "#/components/schemas/RefundStatusType" }, "refundedTime": { "description": "Refund processed time (epoch millisecond)", "type": "integer", "format": "int64" }, "createTime": { "description": "Refund creation time (epoch millisecond)", "type": "integer", "format": "int64" } } }, "AddressDto": { "description": "Address object", "type": "object", "properties": { "pref": { "description": "Prefecture", "type": "string" }, "city": { "description": "City/Municipality", "type": "string" }, "town": { "description": "Town", "type": "string" }, "address1": { "description": "Address line 1", "type": "string" }, "address2": { "description": "Address line 2", "type": "string" } } }, "RefundStatusType": { "description": "Refund status\n- pending Not refunded\n- refunded Refunded\n", "type": "string", "enum": [ "pending", "refunded" ] } }, "securitySchemes": { "bearerAuth": { "type": "http", "scheme": "bearer", "description": "API authentication is performed via Bearer auth using the secret key as the bearer token.\nThe secret key is a critical key that allows all API operations, so handle it with care.\n" }, "basicAuth": { "type": "http", "scheme": "basic", "description": "API authentication is performed via Basic auth using the secret key as the username and omitting the password.\nThe secret key is a critical key that allows all API operations, so handle it with care.\n" } } } } ``` # List charges (https://elepay-docs.elestyle.workers.dev/openapi/charge/listCharges) Retrieves a list of charge information. **Page URL**: https://elepay-docs.elestyle.workers.dev/openapi/charge/listCharges **Endpoint**: GET /charges ```json { "openapi": "3.1.0", "info": { "version": "1.3.0", "title": "elepay API Reference", "description": "The elepay API is a REST-based payment API. It provides various capabilities for payment operations, such as processing payments and refunds.", "contact": { "name": "ELESTYLE, INC", "url": "https://elepay.io", "email": "support@elestyle.jp" } }, "servers": [ { "url": "https://api.elepay.io" } ], "security": [ { "bearerAuth": [] }, { "basicAuth": [] } ], "tags": [ { "name": "Charge" } ], "paths": { "/charges": { "get": { "tags": [ "Charge" ], "summary": "List charges", "description": "Retrieves a list of charge information.", "operationId": "listCharges", "parameters": [ { "name": "paymentMethod", "description": "Payment method (multiple values can be specified).", "in": "query", "required": false, "schema": { "type": "array", "items": { "$ref": "#/components/schemas/PaymentMethodType" } } }, { "name": "from", "description": "Start time (epoch millisecond). Retrieves data created on or after the specified time.", "in": "query", "schema": { "type": "integer", "format": "int64" } }, { "name": "to", "description": "End time (epoch millisecond). Retrieves data created on or before the specified time.", "in": "query", "schema": { "type": "integer", "format": "int64" } }, { "name": "dateField", "description": "Specifies which fields are used for the start and end times.\n- paid_time Payment time\n- create_time Charge creation time\n", "in": "query", "required": false, "schema": { "$ref": "#/components/schemas/ChargeDateTimeType" } }, { "name": "status", "description": "Payment status", "in": "query", "required": false, "schema": { "$ref": "#/components/schemas/ChargeStatusType" } }, { "name": "limit", "description": "Maximum number of items", "in": "query", "required": false, "schema": { "type": "integer", "maximum": 100, "default": 20 } }, { "name": "offset", "description": "Starting offset", "in": "query", "schema": { "type": "integer", "default": 0 } }, { "name": "sort", "description": "Sort field\n- paid_time Payment time\n- create_time Charge creation time\n", "in": "query", "required": false, "schema": { "$ref": "#/components/schemas/ChargeDateTimeType" } }, { "name": "order", "description": "Sort order\n- desc Descending\n- asc Ascending\n", "in": "query", "required": false, "schema": { "$ref": "#/components/schemas/SortOrderType" } } ], "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ChargesResponse" } } } } } } } }, "components": { "schemas": { "PaymentMethodType": { "description": "Payment method\n- auto Auto detection (available for CPM payments only)\n- alipay Alipay\n- alipayhk AlipayHK\n- alipayplus Alipay+\n- amazonpay Amazon Pay\n- applepay Apple Pay\n- applepay_cn Apple Pay (China)\n- atokara Atokara\n- atone atone (pay next month at convenience stores)\n- aupay au Pay\n- clicktopay Click To Pay\n- banktransfer Bank transfer\n- creditcard Credit card\n- dana DANA\n- docomopay d Payment\n- ezlink EZ-Link\n- felica E-money\n- felica_id iD\n- felica_quickpay QUICPay\n- felica_transport_ic Transit IC card\n- gcash GCash\n- ginkopay Bank Pay\n- googlepay Google Pay\n- jcoinpay J-Coin Pay\n- jkopay JKOPAY\n- kakaopay Kakao Pay\n- konbini Convenience store payment\n- linepay LINE Pay\n- merpay Merpay\n- origamipay Origami Pay\n- paidy Paidy (pay next month)\n- paypal PayPal\n- paypay PayPay\n- pxpayplus AllPay\n- rakutenpay Rakuten Pay\n- smartcode Smart Code\n- tng Touch 'n Go eWallet\n- truemoney TrueMoney\n- unionpay UnionPay QuickPass\n- wechatpay Wechat Pay\n- aeonpay AEON Pay\n- rabbitlinepay Rabbit LINE Pay\n- bpi BPI\n- boost Boost\n- hellomoney HelloMoney by AUB\n- tosspay Toss Pay\n- naverpay Naver Pay\n- wellwa WellWa Points\n- grabpay Grab Pay\n- momopay Momo Pay\n- promptpay Prompt Pay\n- wovenpay Woven City Pay\n- ezopay EZO Pay\n", "type": "string", "enum": [ "alipay", "alipayhk", "alipayplus", "amazonpay", "applepay", "applepay_cn", "atokara", "atone", "aupay", "clicktopay", "banktransfer", "creditcard", "dana", "docomopay", "ezlink", "felica", "felica_id", "felica_quickpay", "felica_transport_ic", "gcash", "ginkopay", "googlepay", "jcoinpay", "jkopay", "kakaopay", "konbini", "linepay", "merpay", "origamipay", "paidy", "paypal", "paypay", "pxpayplus", "rakutenpay", "smartcode", "tng", "truemoney", "unionpay", "wechatpay", "aeonpay", "rabbitlinepay", "bpi", "boost", "hellomoney", "tosspay", "naverpay", "wellwa", "grabpay", "momopay", "promptpay", "wovenpay", "ezopay", "auto" ] }, "ChargeDateTimeType": { "description": "Time field", "type": "string", "enum": [ "paid_time", "create_time" ], "default": "create_time" }, "ChargeStatusType": { "description": "Payment status\n- pending Unpaid\n- waiting Waiting for payment (information entered)\n- notified Preparing for payment (notified)\n- uncaptured Authorized (not captured)\n- captured Paid\n- partially_refunded Partially refunded\n- refunded Refunded\n- amount_mismatch Amount mismatch\n- revoked Canceled\n- failed Payment failed\n", "type": "string", "enum": [ "pending", "waiting", "notified", "uncaptured", "captured", "partially_refunded", "refunded", "amount_mismatch", "revoked", "failed" ] }, "SortOrderType": { "description": "Sort order", "type": "string", "enum": [ "desc", "asc" ], "default": "desc" }, "ChargesResponse": { "description": "Payment list", "type": "object", "properties": { "total": { "description": "Count", "type": "integer" }, "charges": { "description": "Payment details", "type": "array", "items": { "$ref": "#/components/schemas/ChargeDto" } } } }, "ChargeDto": { "type": "object", "description": "Payment object", "properties": { "id": { "description": "Charge ID", "type": "string", "maxLength": 32 }, "appId": { "description": "App ID", "type": "string", "maxLength": 32 }, "object": { "description": "Object type", "type": "string", "default": "charge" }, "liveMode": { "description": "Whether this is live mode\n- false Test mode\n- true Live mode\n", "type": "boolean" }, "amount": { "description": "Payment amount", "type": "integer" }, "authorizeAmount": { "description": "Pre-authorization amount", "type": "integer" }, "currency": { "description": "Currency code (ISO 4217)", "type": "string", "minLength": 3, "maxLength": 3, "default": "JPY" }, "authorize": { "description": "Pre-authorization flag", "type": "boolean" }, "paymentMethod": { "$ref": "#/components/schemas/PaymentMethodType" }, "resource": { "$ref": "#/components/schemas/ResourceType" }, "orderNo": { "description": "Merchant system order number, e.g., order number, payment ID, etc.", "type": "string", "maxLength": 50 }, "description": { "description": "Payment description", "type": "string", "maxLength": 1024 }, "location": { "$ref": "#/components/schemas/ChargeLocationDto" }, "extra": { "description": "Payment extra data", "type": "object", "maxProperties": 20, "propertyNames": { "type": "string", "maxLength": 20 }, "additionalProperties": { "type": "string" } }, "metadata": { "description": "Payment metadata", "type": "object", "maxProperties": 20, "propertyNames": { "type": "string", "maxLength": 20 }, "additionalProperties": { "type": "string" } }, "cardInfo": { "$ref": "#/components/schemas/CardInfo" }, "voucherNo": { "description": "Provider payment voucher number", "type": "string", "maxLength": 32 }, "clientIp": { "description": "Client IP address", "type": "string", "maxLength": 45 }, "paid": { "description": "Paid flag", "type": "boolean" }, "refunded": { "description": "Refunded flag", "type": "boolean" }, "disputed": { "description": "Disputed flag", "type": "boolean" }, "refunds": { "$ref": "#/components/schemas/RefundsDto" }, "status": { "$ref": "#/components/schemas/ChargeStatusType" }, "codeContent": { "description": "Merchant-presented QR code (only when resource is mpm)", "type": "string" }, "credential": { "description": "Client SDK credentials", "type": "string" }, "paidTime": { "description": "Payment time (epoch millisecond)", "type": "integer", "format": "int64" }, "refundTime": { "description": "Refund time (epoch millisecond)", "type": "integer", "format": "int64" }, "expiryTime": { "description": "Payment request expiry time (epoch millisecond)", "type": "integer", "format": "int64" }, "settleTime": { "description": "Payment settlement time (epoch millisecond)", "type": "integer", "format": "int64" }, "createTime": { "description": "Payment creation time (epoch millisecond)", "type": "integer", "format": "int64" } } }, "ResourceType": { "description": "Payment resource\n- web Web browser\n- ios iOS native app\n- android Android native app\n- liff LINE LIFF app\n- mini WeChat Mini Program\n- cpm CPM payment (customer-presented QR code)\n- mpm MPM payment (merchant-presented QR code)\n- reader Card reader payment (reader device required)\n- posapp POS app payment (POS app integration required)\n", "type": "string", "enum": [ "web", "ios", "android", "liff", "mini", "cpm", "mpm", "reader", "posapp" ] }, "ChargeLocationDto": { "description": "Location object", "type": "object", "properties": { "id": { "description": "Location ID", "type": "string", "maxLength": 32 }, "name": { "$ref": "#/components/schemas/StringTransliterationDto" }, "tel": { "description": "Phone number", "type": "string", "maxLength": 20 }, "zip": { "description": "Postal code", "type": "string", "maxLength": 8 }, "address": { "$ref": "#/components/schemas/AddressTransliterationDto" }, "latitude": { "description": "Latitude", "type": "number", "format": "double" }, "longitude": { "description": "Longitude", "type": "number", "format": "double" }, "note": { "description": "Remarks", "type": "string" }, "status": { "$ref": "#/components/schemas/ChargeLocationStatusType" } } }, "CardInfo": { "type": "object", "description": "Card and wallet information", "properties": { "brand": { "$ref": "#/components/schemas/CardBrandType" }, "last4": { "description": "Last 4 digits of the card number", "type": "string" }, "expMonth": { "description": "Expiration month", "type": "integer" }, "expYear": { "description": "Expiration year", "type": "integer" }, "name": { "description": "Cardholder name", "type": "string" }, "issuerCode": { "description": "Card issuer code (GMO payment only)\nComplies with GMO-PG \"destination card company code\"\n", "type": "string" }, "issuerName": { "description": "Card issuer name (GMO payment only)\nCompany name corresponding to GMO-PG \"destination card company code\"\n", "type": "string" }, "wallet": { "description": "Wallet information", "type": "string" }, "walletApp": { "description": "Wallet app information (for paymentMethod alipayplus or smartcode, the actual app name used)", "type": "string" }, "repaymentType": { "description": "Repayment type\n- 1 One-time payment\n- revolving Revolving payment\n- bonus_one_time Bonus one-time payment\n- 2 Two-installment payment\n- 3 Three-installment payment\n", "type": "string" }, "approvalCode": { "description": "Authorization code", "type": "string" }, "threeDSecure": { "description": "3D Secure enabled", "type": "boolean" }, "threeDSecureVersion": { "description": "3D Secure version", "type": "string" }, "threeDSecureDetail": { "description": "3D Secure details", "type": "string" }, "businessType": { "description": "Business type", "type": "string" }, "konbiniScanTime": { "description": "Last scan time by the convenience store", "type": "integer", "format": "int64" }, "konbiniType": { "description": "Convenience store type used for the actual payment\n- unknown\n- seven_eleven\n- lawson\n- familymart\n- ministop\n- seicomart\n", "type": "string" }, "receivedAmount": { "description": "Actual amount received from the convenience store or bank", "type": "integer" }, "receivedTime": { "description": "Actual time received by the convenience store or bank; this value may contain only the date (midnight).", "type": "integer", "format": "int64" }, "bankUserCode": { "description": "Bank transfer user code", "type": "string" }, "bankUserName": { "description": "Bank transfer user name", "type": "string" }, "bankName": { "description": "Receiving bank name", "type": "string" }, "bankBranchName": { "description": "Receiving bank branch name", "type": "string" }, "bankAccountNo": { "description": "Receiving bank account number", "type": "string" }, "billingNo": { "description": "Billing number (for payment station)", "type": "string" } } }, "RefundsDto": { "description": "Refund summary. If multiple refunds are issued, refund details are summarized and returned.", "type": "object", "properties": { "amount": { "description": "Total refunded amount", "type": "integer" }, "totalCount": { "description": "Number of refunds", "type": "integer" }, "data": { "description": "Refund details", "type": "array", "items": { "$ref": "#/components/schemas/RefundDto" } } } }, "StringTransliterationDto": { "description": "Name transliteration object", "type": "object", "properties": { "kanji": { "description": "Kanji", "type": "string" }, "kana": { "description": "Kana", "type": "string" }, "romaji": { "description": "Romaji", "type": "string" } } }, "AddressTransliterationDto": { "description": "Address transliteration object", "type": "object", "properties": { "kanji": { "$ref": "#/components/schemas/AddressDto" }, "kana": { "$ref": "#/components/schemas/AddressDto" }, "romaji": { "$ref": "#/components/schemas/AddressDto" } } }, "ChargeLocationStatusType": { "description": "Location status\n- active Active\n- submitted Submitted\n", "type": "string", "enum": [ "active", "submitted" ] }, "CardBrandType": { "description": "- unknown\n- visa\n- mastercard\n- amex\n- jcb\n- diners\n- unionpay\n- discover\n- felica\n- seven_eleven\n- lawson\n- familymart\n- ministop\n- seicomart\n", "type": "string" }, "RefundDto": { "description": "Refund object", "type": "object", "properties": { "id": { "description": "Refund ID", "type": "string", "maxLength": 32 }, "object": { "description": "Object type", "type": "string", "default": "refund" }, "chargeId": { "description": "Charge ID", "type": "string", "maxLength": 32 }, "liveMode": { "description": "Whether this is live mode\n- false Test mode\n- true Live mode\n", "type": "boolean" }, "amount": { "description": "Refund amount. You can refund the full amount, or partially refund by specifying amount.", "type": "integer" }, "currency": { "description": "Currency code (ISO 4217)", "type": "string", "minLength": 3, "maxLength": 3 }, "metadata": { "description": "Refund metadata", "type": "object", "maxProperties": 20, "propertyNames": { "type": "string", "maxLength": 20 }, "additionalProperties": { "type": "string" } }, "reason": { "description": "Refund reason", "type": "string", "maxLength": 255 }, "status": { "$ref": "#/components/schemas/RefundStatusType" }, "refundedTime": { "description": "Refund processed time (epoch millisecond)", "type": "integer", "format": "int64" }, "createTime": { "description": "Refund creation time (epoch millisecond)", "type": "integer", "format": "int64" } } }, "AddressDto": { "description": "Address object", "type": "object", "properties": { "pref": { "description": "Prefecture", "type": "string" }, "city": { "description": "City/Municipality", "type": "string" }, "town": { "description": "Town", "type": "string" }, "address1": { "description": "Address line 1", "type": "string" }, "address2": { "description": "Address line 2", "type": "string" } } }, "RefundStatusType": { "description": "Refund status\n- pending Not refunded\n- refunded Refunded\n", "type": "string", "enum": [ "pending", "refunded" ] } }, "securitySchemes": { "bearerAuth": { "type": "http", "scheme": "bearer", "description": "API authentication is performed via Bearer auth using the secret key as the bearer token.\nThe secret key is a critical key that allows all API operations, so handle it with care.\n" }, "basicAuth": { "type": "http", "scheme": "basic", "description": "API authentication is performed via Basic auth using the secret key as the username and omitting the password.\nThe secret key is a critical key that allows all API operations, so handle it with care.\n" } } } } ``` # Retrieve charge (https://elepay-docs.elestyle.workers.dev/openapi/charge/retrieveCharge) Retrieves detailed information about a charge. **Page URL**: https://elepay-docs.elestyle.workers.dev/openapi/charge/retrieveCharge **Endpoint**: GET /charges/{id} ```json { "openapi": "3.1.0", "info": { "version": "1.3.0", "title": "elepay API Reference", "description": "The elepay API is a REST-based payment API. It provides various capabilities for payment operations, such as processing payments and refunds.", "contact": { "name": "ELESTYLE, INC", "url": "https://elepay.io", "email": "support@elestyle.jp" } }, "servers": [ { "url": "https://api.elepay.io" } ], "security": [ { "bearerAuth": [] }, { "basicAuth": [] } ], "tags": [ { "name": "Charge" } ], "paths": { "/charges/{id}": { "get": { "tags": [ "Charge" ], "summary": "Retrieve charge", "description": "Retrieves detailed information about a charge.", "operationId": "retrieveCharge", "parameters": [ { "name": "id", "description": "Charge ID", "in": "path", "required": true, "schema": { "type": "string" } } ], "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ChargeDto" } } } } } } } }, "components": { "schemas": { "ChargeDto": { "type": "object", "description": "Payment object", "properties": { "id": { "description": "Charge ID", "type": "string", "maxLength": 32 }, "appId": { "description": "App ID", "type": "string", "maxLength": 32 }, "object": { "description": "Object type", "type": "string", "default": "charge" }, "liveMode": { "description": "Whether this is live mode\n- false Test mode\n- true Live mode\n", "type": "boolean" }, "amount": { "description": "Payment amount", "type": "integer" }, "authorizeAmount": { "description": "Pre-authorization amount", "type": "integer" }, "currency": { "description": "Currency code (ISO 4217)", "type": "string", "minLength": 3, "maxLength": 3, "default": "JPY" }, "authorize": { "description": "Pre-authorization flag", "type": "boolean" }, "paymentMethod": { "$ref": "#/components/schemas/PaymentMethodType" }, "resource": { "$ref": "#/components/schemas/ResourceType" }, "orderNo": { "description": "Merchant system order number, e.g., order number, payment ID, etc.", "type": "string", "maxLength": 50 }, "description": { "description": "Payment description", "type": "string", "maxLength": 1024 }, "location": { "$ref": "#/components/schemas/ChargeLocationDto" }, "extra": { "description": "Payment extra data", "type": "object", "maxProperties": 20, "propertyNames": { "type": "string", "maxLength": 20 }, "additionalProperties": { "type": "string" } }, "metadata": { "description": "Payment metadata", "type": "object", "maxProperties": 20, "propertyNames": { "type": "string", "maxLength": 20 }, "additionalProperties": { "type": "string" } }, "cardInfo": { "$ref": "#/components/schemas/CardInfo" }, "voucherNo": { "description": "Provider payment voucher number", "type": "string", "maxLength": 32 }, "clientIp": { "description": "Client IP address", "type": "string", "maxLength": 45 }, "paid": { "description": "Paid flag", "type": "boolean" }, "refunded": { "description": "Refunded flag", "type": "boolean" }, "disputed": { "description": "Disputed flag", "type": "boolean" }, "refunds": { "$ref": "#/components/schemas/RefundsDto" }, "status": { "$ref": "#/components/schemas/ChargeStatusType" }, "codeContent": { "description": "Merchant-presented QR code (only when resource is mpm)", "type": "string" }, "credential": { "description": "Client SDK credentials", "type": "string" }, "paidTime": { "description": "Payment time (epoch millisecond)", "type": "integer", "format": "int64" }, "refundTime": { "description": "Refund time (epoch millisecond)", "type": "integer", "format": "int64" }, "expiryTime": { "description": "Payment request expiry time (epoch millisecond)", "type": "integer", "format": "int64" }, "settleTime": { "description": "Payment settlement time (epoch millisecond)", "type": "integer", "format": "int64" }, "createTime": { "description": "Payment creation time (epoch millisecond)", "type": "integer", "format": "int64" } } }, "PaymentMethodType": { "description": "Payment method\n- auto Auto detection (available for CPM payments only)\n- alipay Alipay\n- alipayhk AlipayHK\n- alipayplus Alipay+\n- amazonpay Amazon Pay\n- applepay Apple Pay\n- applepay_cn Apple Pay (China)\n- atokara Atokara\n- atone atone (pay next month at convenience stores)\n- aupay au Pay\n- clicktopay Click To Pay\n- banktransfer Bank transfer\n- creditcard Credit card\n- dana DANA\n- docomopay d Payment\n- ezlink EZ-Link\n- felica E-money\n- felica_id iD\n- felica_quickpay QUICPay\n- felica_transport_ic Transit IC card\n- gcash GCash\n- ginkopay Bank Pay\n- googlepay Google Pay\n- jcoinpay J-Coin Pay\n- jkopay JKOPAY\n- kakaopay Kakao Pay\n- konbini Convenience store payment\n- linepay LINE Pay\n- merpay Merpay\n- origamipay Origami Pay\n- paidy Paidy (pay next month)\n- paypal PayPal\n- paypay PayPay\n- pxpayplus AllPay\n- rakutenpay Rakuten Pay\n- smartcode Smart Code\n- tng Touch 'n Go eWallet\n- truemoney TrueMoney\n- unionpay UnionPay QuickPass\n- wechatpay Wechat Pay\n- aeonpay AEON Pay\n- rabbitlinepay Rabbit LINE Pay\n- bpi BPI\n- boost Boost\n- hellomoney HelloMoney by AUB\n- tosspay Toss Pay\n- naverpay Naver Pay\n- wellwa WellWa Points\n- grabpay Grab Pay\n- momopay Momo Pay\n- promptpay Prompt Pay\n- wovenpay Woven City Pay\n- ezopay EZO Pay\n", "type": "string", "enum": [ "alipay", "alipayhk", "alipayplus", "amazonpay", "applepay", "applepay_cn", "atokara", "atone", "aupay", "clicktopay", "banktransfer", "creditcard", "dana", "docomopay", "ezlink", "felica", "felica_id", "felica_quickpay", "felica_transport_ic", "gcash", "ginkopay", "googlepay", "jcoinpay", "jkopay", "kakaopay", "konbini", "linepay", "merpay", "origamipay", "paidy", "paypal", "paypay", "pxpayplus", "rakutenpay", "smartcode", "tng", "truemoney", "unionpay", "wechatpay", "aeonpay", "rabbitlinepay", "bpi", "boost", "hellomoney", "tosspay", "naverpay", "wellwa", "grabpay", "momopay", "promptpay", "wovenpay", "ezopay", "auto" ] }, "ResourceType": { "description": "Payment resource\n- web Web browser\n- ios iOS native app\n- android Android native app\n- liff LINE LIFF app\n- mini WeChat Mini Program\n- cpm CPM payment (customer-presented QR code)\n- mpm MPM payment (merchant-presented QR code)\n- reader Card reader payment (reader device required)\n- posapp POS app payment (POS app integration required)\n", "type": "string", "enum": [ "web", "ios", "android", "liff", "mini", "cpm", "mpm", "reader", "posapp" ] }, "ChargeLocationDto": { "description": "Location object", "type": "object", "properties": { "id": { "description": "Location ID", "type": "string", "maxLength": 32 }, "name": { "$ref": "#/components/schemas/StringTransliterationDto" }, "tel": { "description": "Phone number", "type": "string", "maxLength": 20 }, "zip": { "description": "Postal code", "type": "string", "maxLength": 8 }, "address": { "$ref": "#/components/schemas/AddressTransliterationDto" }, "latitude": { "description": "Latitude", "type": "number", "format": "double" }, "longitude": { "description": "Longitude", "type": "number", "format": "double" }, "note": { "description": "Remarks", "type": "string" }, "status": { "$ref": "#/components/schemas/ChargeLocationStatusType" } } }, "CardInfo": { "type": "object", "description": "Card and wallet information", "properties": { "brand": { "$ref": "#/components/schemas/CardBrandType" }, "last4": { "description": "Last 4 digits of the card number", "type": "string" }, "expMonth": { "description": "Expiration month", "type": "integer" }, "expYear": { "description": "Expiration year", "type": "integer" }, "name": { "description": "Cardholder name", "type": "string" }, "issuerCode": { "description": "Card issuer code (GMO payment only)\nComplies with GMO-PG \"destination card company code\"\n", "type": "string" }, "issuerName": { "description": "Card issuer name (GMO payment only)\nCompany name corresponding to GMO-PG \"destination card company code\"\n", "type": "string" }, "wallet": { "description": "Wallet information", "type": "string" }, "walletApp": { "description": "Wallet app information (for paymentMethod alipayplus or smartcode, the actual app name used)", "type": "string" }, "repaymentType": { "description": "Repayment type\n- 1 One-time payment\n- revolving Revolving payment\n- bonus_one_time Bonus one-time payment\n- 2 Two-installment payment\n- 3 Three-installment payment\n", "type": "string" }, "approvalCode": { "description": "Authorization code", "type": "string" }, "threeDSecure": { "description": "3D Secure enabled", "type": "boolean" }, "threeDSecureVersion": { "description": "3D Secure version", "type": "string" }, "threeDSecureDetail": { "description": "3D Secure details", "type": "string" }, "businessType": { "description": "Business type", "type": "string" }, "konbiniScanTime": { "description": "Last scan time by the convenience store", "type": "integer", "format": "int64" }, "konbiniType": { "description": "Convenience store type used for the actual payment\n- unknown\n- seven_eleven\n- lawson\n- familymart\n- ministop\n- seicomart\n", "type": "string" }, "receivedAmount": { "description": "Actual amount received from the convenience store or bank", "type": "integer" }, "receivedTime": { "description": "Actual time received by the convenience store or bank; this value may contain only the date (midnight).", "type": "integer", "format": "int64" }, "bankUserCode": { "description": "Bank transfer user code", "type": "string" }, "bankUserName": { "description": "Bank transfer user name", "type": "string" }, "bankName": { "description": "Receiving bank name", "type": "string" }, "bankBranchName": { "description": "Receiving bank branch name", "type": "string" }, "bankAccountNo": { "description": "Receiving bank account number", "type": "string" }, "billingNo": { "description": "Billing number (for payment station)", "type": "string" } } }, "RefundsDto": { "description": "Refund summary. If multiple refunds are issued, refund details are summarized and returned.", "type": "object", "properties": { "amount": { "description": "Total refunded amount", "type": "integer" }, "totalCount": { "description": "Number of refunds", "type": "integer" }, "data": { "description": "Refund details", "type": "array", "items": { "$ref": "#/components/schemas/RefundDto" } } } }, "ChargeStatusType": { "description": "Payment status\n- pending Unpaid\n- waiting Waiting for payment (information entered)\n- notified Preparing for payment (notified)\n- uncaptured Authorized (not captured)\n- captured Paid\n- partially_refunded Partially refunded\n- refunded Refunded\n- amount_mismatch Amount mismatch\n- revoked Canceled\n- failed Payment failed\n", "type": "string", "enum": [ "pending", "waiting", "notified", "uncaptured", "captured", "partially_refunded", "refunded", "amount_mismatch", "revoked", "failed" ] }, "StringTransliterationDto": { "description": "Name transliteration object", "type": "object", "properties": { "kanji": { "description": "Kanji", "type": "string" }, "kana": { "description": "Kana", "type": "string" }, "romaji": { "description": "Romaji", "type": "string" } } }, "AddressTransliterationDto": { "description": "Address transliteration object", "type": "object", "properties": { "kanji": { "$ref": "#/components/schemas/AddressDto" }, "kana": { "$ref": "#/components/schemas/AddressDto" }, "romaji": { "$ref": "#/components/schemas/AddressDto" } } }, "ChargeLocationStatusType": { "description": "Location status\n- active Active\n- submitted Submitted\n", "type": "string", "enum": [ "active", "submitted" ] }, "CardBrandType": { "description": "- unknown\n- visa\n- mastercard\n- amex\n- jcb\n- diners\n- unionpay\n- discover\n- felica\n- seven_eleven\n- lawson\n- familymart\n- ministop\n- seicomart\n", "type": "string" }, "RefundDto": { "description": "Refund object", "type": "object", "properties": { "id": { "description": "Refund ID", "type": "string", "maxLength": 32 }, "object": { "description": "Object type", "type": "string", "default": "refund" }, "chargeId": { "description": "Charge ID", "type": "string", "maxLength": 32 }, "liveMode": { "description": "Whether this is live mode\n- false Test mode\n- true Live mode\n", "type": "boolean" }, "amount": { "description": "Refund amount. You can refund the full amount, or partially refund by specifying amount.", "type": "integer" }, "currency": { "description": "Currency code (ISO 4217)", "type": "string", "minLength": 3, "maxLength": 3 }, "metadata": { "description": "Refund metadata", "type": "object", "maxProperties": 20, "propertyNames": { "type": "string", "maxLength": 20 }, "additionalProperties": { "type": "string" } }, "reason": { "description": "Refund reason", "type": "string", "maxLength": 255 }, "status": { "$ref": "#/components/schemas/RefundStatusType" }, "refundedTime": { "description": "Refund processed time (epoch millisecond)", "type": "integer", "format": "int64" }, "createTime": { "description": "Refund creation time (epoch millisecond)", "type": "integer", "format": "int64" } } }, "AddressDto": { "description": "Address object", "type": "object", "properties": { "pref": { "description": "Prefecture", "type": "string" }, "city": { "description": "City/Municipality", "type": "string" }, "town": { "description": "Town", "type": "string" }, "address1": { "description": "Address line 1", "type": "string" }, "address2": { "description": "Address line 2", "type": "string" } } }, "RefundStatusType": { "description": "Refund status\n- pending Not refunded\n- refunded Refunded\n", "type": "string", "enum": [ "pending", "refunded" ] } }, "securitySchemes": { "bearerAuth": { "type": "http", "scheme": "bearer", "description": "API authentication is performed via Bearer auth using the secret key as the bearer token.\nThe secret key is a critical key that allows all API operations, so handle it with care.\n" }, "basicAuth": { "type": "http", "scheme": "basic", "description": "API authentication is performed via Basic auth using the secret key as the username and omitting the password.\nThe secret key is a critical key that allows all API operations, so handle it with care.\n" } } } } ``` # Retrieve charge's status (https://elepay-docs.elestyle.workers.dev/openapi/charge/retrieveChargeStatus) Retrieves detailed information about a charge's status. **Page URL**: https://elepay-docs.elestyle.workers.dev/openapi/charge/retrieveChargeStatus **Endpoint**: GET /charges/{id}/status ```json { "openapi": "3.1.0", "info": { "version": "1.3.0", "title": "elepay API Reference", "description": "The elepay API is a REST-based payment API. It provides various capabilities for payment operations, such as processing payments and refunds.", "contact": { "name": "ELESTYLE, INC", "url": "https://elepay.io", "email": "support@elestyle.jp" } }, "servers": [ { "url": "https://api.elepay.io" } ], "security": [ { "bearerAuth": [] }, { "basicAuth": [] } ], "tags": [ { "name": "Charge" } ], "paths": { "/charges/{id}/status": { "get": { "tags": [ "Charge" ], "summary": "Retrieve charge's status", "description": "Retrieves detailed information about a charge's status.", "operationId": "retrieveChargeStatus", "parameters": [ { "name": "id", "description": "Charge ID", "in": "path", "required": true, "schema": { "type": "string" } } ], "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ChargeStatusDto" } } } } } } } }, "components": { "schemas": { "ChargeStatusDto": { "type": "object", "description": "Payment status object", "properties": { "id": { "description": "Charge ID", "type": "string", "maxLength": 32 }, "appId": { "description": "App ID", "type": "string", "maxLength": 32 }, "liveMode": { "description": "Whether this is live mode\n- false Test mode\n- true Live mode\n", "type": "boolean" }, "status": { "$ref": "#/components/schemas/ChargeStatusType" } } }, "ChargeStatusType": { "description": "Payment status\n- pending Unpaid\n- waiting Waiting for payment (information entered)\n- notified Preparing for payment (notified)\n- uncaptured Authorized (not captured)\n- captured Paid\n- partially_refunded Partially refunded\n- refunded Refunded\n- amount_mismatch Amount mismatch\n- revoked Canceled\n- failed Payment failed\n", "type": "string", "enum": [ "pending", "waiting", "notified", "uncaptured", "captured", "partially_refunded", "refunded", "amount_mismatch", "revoked", "failed" ] } }, "securitySchemes": { "bearerAuth": { "type": "http", "scheme": "bearer", "description": "API authentication is performed via Bearer auth using the secret key as the bearer token.\nThe secret key is a critical key that allows all API operations, so handle it with care.\n" }, "basicAuth": { "type": "http", "scheme": "basic", "description": "API authentication is performed via Basic auth using the secret key as the username and omitting the password.\nThe secret key is a critical key that allows all API operations, so handle it with care.\n" } } } } ``` # Revoke charge (https://elepay-docs.elestyle.workers.dev/openapi/charge/revokeCharge) Cancels a charge. **Page URL**: https://elepay-docs.elestyle.workers.dev/openapi/charge/revokeCharge **Endpoint**: POST /charges/{id}/revoke ```json { "openapi": "3.1.0", "info": { "version": "1.3.0", "title": "elepay API Reference", "description": "The elepay API is a REST-based payment API. It provides various capabilities for payment operations, such as processing payments and refunds.", "contact": { "name": "ELESTYLE, INC", "url": "https://elepay.io", "email": "support@elestyle.jp" } }, "servers": [ { "url": "https://api.elepay.io" } ], "security": [ { "bearerAuth": [] }, { "basicAuth": [] } ], "tags": [ { "name": "Charge" } ], "paths": { "/charges/{id}/revoke": { "post": { "tags": [ "Charge" ], "summary": "Revoke charge", "description": "Cancels a charge.", "operationId": "revokeCharge", "parameters": [ { "name": "id", "description": "Charge ID", "in": "path", "required": true, "schema": { "type": "string" } } ], "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ChargeDto" } } } } } } } }, "components": { "schemas": { "ChargeDto": { "type": "object", "description": "Payment object", "properties": { "id": { "description": "Charge ID", "type": "string", "maxLength": 32 }, "appId": { "description": "App ID", "type": "string", "maxLength": 32 }, "object": { "description": "Object type", "type": "string", "default": "charge" }, "liveMode": { "description": "Whether this is live mode\n- false Test mode\n- true Live mode\n", "type": "boolean" }, "amount": { "description": "Payment amount", "type": "integer" }, "authorizeAmount": { "description": "Pre-authorization amount", "type": "integer" }, "currency": { "description": "Currency code (ISO 4217)", "type": "string", "minLength": 3, "maxLength": 3, "default": "JPY" }, "authorize": { "description": "Pre-authorization flag", "type": "boolean" }, "paymentMethod": { "$ref": "#/components/schemas/PaymentMethodType" }, "resource": { "$ref": "#/components/schemas/ResourceType" }, "orderNo": { "description": "Merchant system order number, e.g., order number, payment ID, etc.", "type": "string", "maxLength": 50 }, "description": { "description": "Payment description", "type": "string", "maxLength": 1024 }, "location": { "$ref": "#/components/schemas/ChargeLocationDto" }, "extra": { "description": "Payment extra data", "type": "object", "maxProperties": 20, "propertyNames": { "type": "string", "maxLength": 20 }, "additionalProperties": { "type": "string" } }, "metadata": { "description": "Payment metadata", "type": "object", "maxProperties": 20, "propertyNames": { "type": "string", "maxLength": 20 }, "additionalProperties": { "type": "string" } }, "cardInfo": { "$ref": "#/components/schemas/CardInfo" }, "voucherNo": { "description": "Provider payment voucher number", "type": "string", "maxLength": 32 }, "clientIp": { "description": "Client IP address", "type": "string", "maxLength": 45 }, "paid": { "description": "Paid flag", "type": "boolean" }, "refunded": { "description": "Refunded flag", "type": "boolean" }, "disputed": { "description": "Disputed flag", "type": "boolean" }, "refunds": { "$ref": "#/components/schemas/RefundsDto" }, "status": { "$ref": "#/components/schemas/ChargeStatusType" }, "codeContent": { "description": "Merchant-presented QR code (only when resource is mpm)", "type": "string" }, "credential": { "description": "Client SDK credentials", "type": "string" }, "paidTime": { "description": "Payment time (epoch millisecond)", "type": "integer", "format": "int64" }, "refundTime": { "description": "Refund time (epoch millisecond)", "type": "integer", "format": "int64" }, "expiryTime": { "description": "Payment request expiry time (epoch millisecond)", "type": "integer", "format": "int64" }, "settleTime": { "description": "Payment settlement time (epoch millisecond)", "type": "integer", "format": "int64" }, "createTime": { "description": "Payment creation time (epoch millisecond)", "type": "integer", "format": "int64" } } }, "PaymentMethodType": { "description": "Payment method\n- auto Auto detection (available for CPM payments only)\n- alipay Alipay\n- alipayhk AlipayHK\n- alipayplus Alipay+\n- amazonpay Amazon Pay\n- applepay Apple Pay\n- applepay_cn Apple Pay (China)\n- atokara Atokara\n- atone atone (pay next month at convenience stores)\n- aupay au Pay\n- clicktopay Click To Pay\n- banktransfer Bank transfer\n- creditcard Credit card\n- dana DANA\n- docomopay d Payment\n- ezlink EZ-Link\n- felica E-money\n- felica_id iD\n- felica_quickpay QUICPay\n- felica_transport_ic Transit IC card\n- gcash GCash\n- ginkopay Bank Pay\n- googlepay Google Pay\n- jcoinpay J-Coin Pay\n- jkopay JKOPAY\n- kakaopay Kakao Pay\n- konbini Convenience store payment\n- linepay LINE Pay\n- merpay Merpay\n- origamipay Origami Pay\n- paidy Paidy (pay next month)\n- paypal PayPal\n- paypay PayPay\n- pxpayplus AllPay\n- rakutenpay Rakuten Pay\n- smartcode Smart Code\n- tng Touch 'n Go eWallet\n- truemoney TrueMoney\n- unionpay UnionPay QuickPass\n- wechatpay Wechat Pay\n- aeonpay AEON Pay\n- rabbitlinepay Rabbit LINE Pay\n- bpi BPI\n- boost Boost\n- hellomoney HelloMoney by AUB\n- tosspay Toss Pay\n- naverpay Naver Pay\n- wellwa WellWa Points\n- grabpay Grab Pay\n- momopay Momo Pay\n- promptpay Prompt Pay\n- wovenpay Woven City Pay\n- ezopay EZO Pay\n", "type": "string", "enum": [ "alipay", "alipayhk", "alipayplus", "amazonpay", "applepay", "applepay_cn", "atokara", "atone", "aupay", "clicktopay", "banktransfer", "creditcard", "dana", "docomopay", "ezlink", "felica", "felica_id", "felica_quickpay", "felica_transport_ic", "gcash", "ginkopay", "googlepay", "jcoinpay", "jkopay", "kakaopay", "konbini", "linepay", "merpay", "origamipay", "paidy", "paypal", "paypay", "pxpayplus", "rakutenpay", "smartcode", "tng", "truemoney", "unionpay", "wechatpay", "aeonpay", "rabbitlinepay", "bpi", "boost", "hellomoney", "tosspay", "naverpay", "wellwa", "grabpay", "momopay", "promptpay", "wovenpay", "ezopay", "auto" ] }, "ResourceType": { "description": "Payment resource\n- web Web browser\n- ios iOS native app\n- android Android native app\n- liff LINE LIFF app\n- mini WeChat Mini Program\n- cpm CPM payment (customer-presented QR code)\n- mpm MPM payment (merchant-presented QR code)\n- reader Card reader payment (reader device required)\n- posapp POS app payment (POS app integration required)\n", "type": "string", "enum": [ "web", "ios", "android", "liff", "mini", "cpm", "mpm", "reader", "posapp" ] }, "ChargeLocationDto": { "description": "Location object", "type": "object", "properties": { "id": { "description": "Location ID", "type": "string", "maxLength": 32 }, "name": { "$ref": "#/components/schemas/StringTransliterationDto" }, "tel": { "description": "Phone number", "type": "string", "maxLength": 20 }, "zip": { "description": "Postal code", "type": "string", "maxLength": 8 }, "address": { "$ref": "#/components/schemas/AddressTransliterationDto" }, "latitude": { "description": "Latitude", "type": "number", "format": "double" }, "longitude": { "description": "Longitude", "type": "number", "format": "double" }, "note": { "description": "Remarks", "type": "string" }, "status": { "$ref": "#/components/schemas/ChargeLocationStatusType" } } }, "CardInfo": { "type": "object", "description": "Card and wallet information", "properties": { "brand": { "$ref": "#/components/schemas/CardBrandType" }, "last4": { "description": "Last 4 digits of the card number", "type": "string" }, "expMonth": { "description": "Expiration month", "type": "integer" }, "expYear": { "description": "Expiration year", "type": "integer" }, "name": { "description": "Cardholder name", "type": "string" }, "issuerCode": { "description": "Card issuer code (GMO payment only)\nComplies with GMO-PG \"destination card company code\"\n", "type": "string" }, "issuerName": { "description": "Card issuer name (GMO payment only)\nCompany name corresponding to GMO-PG \"destination card company code\"\n", "type": "string" }, "wallet": { "description": "Wallet information", "type": "string" }, "walletApp": { "description": "Wallet app information (for paymentMethod alipayplus or smartcode, the actual app name used)", "type": "string" }, "repaymentType": { "description": "Repayment type\n- 1 One-time payment\n- revolving Revolving payment\n- bonus_one_time Bonus one-time payment\n- 2 Two-installment payment\n- 3 Three-installment payment\n", "type": "string" }, "approvalCode": { "description": "Authorization code", "type": "string" }, "threeDSecure": { "description": "3D Secure enabled", "type": "boolean" }, "threeDSecureVersion": { "description": "3D Secure version", "type": "string" }, "threeDSecureDetail": { "description": "3D Secure details", "type": "string" }, "businessType": { "description": "Business type", "type": "string" }, "konbiniScanTime": { "description": "Last scan time by the convenience store", "type": "integer", "format": "int64" }, "konbiniType": { "description": "Convenience store type used for the actual payment\n- unknown\n- seven_eleven\n- lawson\n- familymart\n- ministop\n- seicomart\n", "type": "string" }, "receivedAmount": { "description": "Actual amount received from the convenience store or bank", "type": "integer" }, "receivedTime": { "description": "Actual time received by the convenience store or bank; this value may contain only the date (midnight).", "type": "integer", "format": "int64" }, "bankUserCode": { "description": "Bank transfer user code", "type": "string" }, "bankUserName": { "description": "Bank transfer user name", "type": "string" }, "bankName": { "description": "Receiving bank name", "type": "string" }, "bankBranchName": { "description": "Receiving bank branch name", "type": "string" }, "bankAccountNo": { "description": "Receiving bank account number", "type": "string" }, "billingNo": { "description": "Billing number (for payment station)", "type": "string" } } }, "RefundsDto": { "description": "Refund summary. If multiple refunds are issued, refund details are summarized and returned.", "type": "object", "properties": { "amount": { "description": "Total refunded amount", "type": "integer" }, "totalCount": { "description": "Number of refunds", "type": "integer" }, "data": { "description": "Refund details", "type": "array", "items": { "$ref": "#/components/schemas/RefundDto" } } } }, "ChargeStatusType": { "description": "Payment status\n- pending Unpaid\n- waiting Waiting for payment (information entered)\n- notified Preparing for payment (notified)\n- uncaptured Authorized (not captured)\n- captured Paid\n- partially_refunded Partially refunded\n- refunded Refunded\n- amount_mismatch Amount mismatch\n- revoked Canceled\n- failed Payment failed\n", "type": "string", "enum": [ "pending", "waiting", "notified", "uncaptured", "captured", "partially_refunded", "refunded", "amount_mismatch", "revoked", "failed" ] }, "StringTransliterationDto": { "description": "Name transliteration object", "type": "object", "properties": { "kanji": { "description": "Kanji", "type": "string" }, "kana": { "description": "Kana", "type": "string" }, "romaji": { "description": "Romaji", "type": "string" } } }, "AddressTransliterationDto": { "description": "Address transliteration object", "type": "object", "properties": { "kanji": { "$ref": "#/components/schemas/AddressDto" }, "kana": { "$ref": "#/components/schemas/AddressDto" }, "romaji": { "$ref": "#/components/schemas/AddressDto" } } }, "ChargeLocationStatusType": { "description": "Location status\n- active Active\n- submitted Submitted\n", "type": "string", "enum": [ "active", "submitted" ] }, "CardBrandType": { "description": "- unknown\n- visa\n- mastercard\n- amex\n- jcb\n- diners\n- unionpay\n- discover\n- felica\n- seven_eleven\n- lawson\n- familymart\n- ministop\n- seicomart\n", "type": "string" }, "RefundDto": { "description": "Refund object", "type": "object", "properties": { "id": { "description": "Refund ID", "type": "string", "maxLength": 32 }, "object": { "description": "Object type", "type": "string", "default": "refund" }, "chargeId": { "description": "Charge ID", "type": "string", "maxLength": 32 }, "liveMode": { "description": "Whether this is live mode\n- false Test mode\n- true Live mode\n", "type": "boolean" }, "amount": { "description": "Refund amount. You can refund the full amount, or partially refund by specifying amount.", "type": "integer" }, "currency": { "description": "Currency code (ISO 4217)", "type": "string", "minLength": 3, "maxLength": 3 }, "metadata": { "description": "Refund metadata", "type": "object", "maxProperties": 20, "propertyNames": { "type": "string", "maxLength": 20 }, "additionalProperties": { "type": "string" } }, "reason": { "description": "Refund reason", "type": "string", "maxLength": 255 }, "status": { "$ref": "#/components/schemas/RefundStatusType" }, "refundedTime": { "description": "Refund processed time (epoch millisecond)", "type": "integer", "format": "int64" }, "createTime": { "description": "Refund creation time (epoch millisecond)", "type": "integer", "format": "int64" } } }, "AddressDto": { "description": "Address object", "type": "object", "properties": { "pref": { "description": "Prefecture", "type": "string" }, "city": { "description": "City/Municipality", "type": "string" }, "town": { "description": "Town", "type": "string" }, "address1": { "description": "Address line 1", "type": "string" }, "address2": { "description": "Address line 2", "type": "string" } } }, "RefundStatusType": { "description": "Refund status\n- pending Not refunded\n- refunded Refunded\n", "type": "string", "enum": [ "pending", "refunded" ] } }, "securitySchemes": { "bearerAuth": { "type": "http", "scheme": "bearer", "description": "API authentication is performed via Bearer auth using the secret key as the bearer token.\nThe secret key is a critical key that allows all API operations, so handle it with care.\n" }, "basicAuth": { "type": "http", "scheme": "basic", "description": "API authentication is performed via Basic auth using the secret key as the username and omitting the password.\nThe secret key is a critical key that allows all API operations, so handle it with care.\n" } } } } ``` # Close EasyQR code (https://elepay-docs.elestyle.workers.dev/openapi/code/closeCode) Deletes an EasyQR code. **Page URL**: https://elepay-docs.elestyle.workers.dev/openapi/code/closeCode **Endpoint**: DELETE /codes/{codeId} ```json { "openapi": "3.1.0", "info": { "version": "1.3.0", "title": "elepay API Reference", "description": "The elepay API is a REST-based payment API. It provides various capabilities for payment operations, such as processing payments and refunds.", "contact": { "name": "ELESTYLE, INC", "url": "https://elepay.io", "email": "support@elestyle.jp" } }, "servers": [ { "url": "https://api.elepay.io" } ], "security": [ { "bearerAuth": [] }, { "basicAuth": [] } ], "tags": [ { "name": "Code" } ], "paths": { "/codes/{codeId}": { "delete": { "tags": [ "Code" ], "summary": "Close EasyQR code", "description": "Deletes an EasyQR code.", "operationId": "closeCode", "parameters": [ { "name": "codeId", "description": "EasyQR code", "in": "path", "required": true, "schema": { "type": "string" } } ], "responses": { "204": { "description": "Closed" } } } } }, "components": { "securitySchemes": { "bearerAuth": { "type": "http", "scheme": "bearer", "description": "API authentication is performed via Bearer auth using the secret key as the bearer token.\nThe secret key is a critical key that allows all API operations, so handle it with care.\n" }, "basicAuth": { "type": "http", "scheme": "basic", "description": "API authentication is performed via Basic auth using the secret key as the username and omitting the password.\nThe secret key is a critical key that allows all API operations, so handle it with care.\n" } } } } ``` # Create EasyQR code (https://elepay-docs.elestyle.workers.dev/openapi/code/createCode) Creates an EasyQR code. **Page URL**: https://elepay-docs.elestyle.workers.dev/openapi/code/createCode **Endpoint**: POST /codes ```json { "openapi": "3.1.0", "info": { "version": "1.3.0", "title": "elepay API Reference", "description": "The elepay API is a REST-based payment API. It provides various capabilities for payment operations, such as processing payments and refunds.", "contact": { "name": "ELESTYLE, INC", "url": "https://elepay.io", "email": "support@elestyle.jp" } }, "servers": [ { "url": "https://api.elepay.io" } ], "security": [ { "bearerAuth": [] }, { "basicAuth": [] } ], "tags": [ { "name": "Code" } ], "paths": { "/codes": { "post": { "tags": [ "Code" ], "summary": "Create EasyQR code", "description": "Creates an EasyQR code.", "operationId": "createCode", "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CodeReq" } } }, "description": "EasyQR code request", "required": true }, "responses": { "201": { "description": "Created", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CodeDto" } } } } } } } }, "components": { "schemas": { "CodeReq": { "type": "object", "description": "EasyQR code request", "required": [ "amount", "orderNo" ], "properties": { "amount": { "description": "Amount", "type": "integer" }, "currency": { "description": "Currency code (ISO 4217)", "type": "string", "minLength": 3, "maxLength": 3, "default": "JPY" }, "orderNo": { "description": "Merchant system order number (e.g., order number, payment ID, etc.).\nMaximum length is 50 characters.\n", "type": "string", "maxLength": 50 }, "description": { "description": "The payment object's 'Description of the payment'", "type": "string", "maxLength": 255 }, "extra": { "description": "Used when there is additional payment-related information. For details, refer to 'Developer Guide -> Payment Extra Information Settings'.\nWhen creating a payment object, the extra configured here takes precedence.\n", "type": "object", "maxProperties": 20, "propertyNames": { "type": "string", "maxLength": 20 }, "additionalProperties": { "type": "string" } }, "metadata": { "description": "The payment object's 'Metadata'", "type": "object", "maxProperties": 20, "propertyNames": { "type": "string", "maxLength": 20 }, "additionalProperties": { "type": "string" } }, "expiryDuration": { "description": "EasyQR code expiration duration (minutes)\nMinimum: 3 minutes, Maximum: 30 minutes, Default: 10 minutes\n", "type": "integer" }, "frontUrl": { "description": "Return URL after EasyCheckout payment is completed", "type": "string", "pattern": "https?://[-A-Za-z0-9+&@#/%?=~_|!:,.;]+[-A-Za-z0-9+&@#/%=~_|]" }, "items": { "description": "Product information", "type": "array", "items": { "$ref": "#/components/schemas/CodeItem" } }, "locationId": { "description": "Location ID", "type": "string", "maxLength": 32 }, "customerId": { "description": "Customer ID", "type": "string", "maxLength": 32 }, "sourceId": { "description": "Customer source ID", "type": "string", "maxLength": 32 }, "shouldCreateSource": { "description": "Whether a new customer source needs to be created with this code.\n", "type": "boolean", "default": false } } }, "CodeDto": { "type": "object", "description": "EasyQR code object", "properties": { "id": { "description": "EasyQR code ID", "type": "string", "maxLength": 32 }, "object": { "description": "Object type", "type": "string", "default": "code" }, "liveMode": { "description": "Whether this is live mode\n- false Test mode\n- true Live mode\n", "type": "boolean" }, "codeUrl": { "description": "EasyQR code URL", "type": "string", "maxLength": 255 }, "amount": { "description": "Payment amount", "type": "integer" }, "currency": { "description": "Currency code (ISO 4217)", "type": "string", "minLength": 3, "maxLength": 3, "default": "JPY" }, "orderNo": { "description": "Merchant system order number, e.g., order number, payment ID, etc.", "type": "string", "maxLength": 50 }, "description": { "description": "The payment object's 'Description of the payment'", "type": "string", "maxLength": 255 }, "extra": { "description": "Payment extra data", "type": "object", "maxProperties": 20, "propertyNames": { "type": "string", "maxLength": 20 }, "additionalProperties": { "type": "string" } }, "metadata": { "description": "The payment object's 'Metadata'", "type": "object", "maxProperties": 20, "propertyNames": { "type": "string", "maxLength": 20 }, "additionalProperties": { "type": "string" } }, "status": { "$ref": "#/components/schemas/CodeStatusType" }, "charge": { "$ref": "#/components/schemas/ChargeDto" }, "customer": { "$ref": "#/components/schemas/CustomerDto" }, "source": { "$ref": "#/components/schemas/SourceDto" }, "frontUrl": { "type": "string" }, "items": { "type": "array", "items": { "$ref": "#/components/schemas/CodeItem" } }, "locationId": { "description": "Location ID", "type": "string", "maxLength": 32 }, "expired": { "description": "Whether the EasyQR code is expired", "type": "boolean" }, "expiryTime": { "description": "EasyQR code expiry time (epoch millisecond)", "type": "integer", "format": "int64" }, "expiryPeriod": { "description": "Remaining milliseconds until EasyQR code expiry", "type": "integer", "format": "int64" }, "createTime": { "description": "Code creation time (epoch millisecond)", "type": "integer", "format": "int64" }, "shouldCreateSource": { "description": "Whether a new customer source needs to be created with this code.\n", "type": "boolean" }, "activeSources": { "description": "List of active customer sources", "type": "array", "items": { "$ref": "#/components/schemas/SourceDto" } }, "invoice": { "$ref": "#/components/schemas/InvoiceDto" } } }, "CodeItem": { "type": "object", "description": "Product information", "required": [ "name", "price", "count" ], "properties": { "name": { "description": "Product name", "type": "string" }, "image": { "description": "Product image URL", "type": "string", "pattern": "https?://[-A-Za-z0-9+&@#/%?=~_|!:,.;]+[-A-Za-z0-9+&@#/%=~_|]" }, "price": { "description": "Payment amount for each product item", "type": "integer" }, "count": { "description": "Quantity", "type": "integer" } } }, "CodeStatusType": { "description": "EasyQR code status\n- pending Unpaid\n- completed Payment information is ready\n- captured Paid\n- closed Expired or deleted\n", "type": "string", "enum": [ "pending", "completed", "captured", "closed" ] }, "ChargeDto": { "type": "object", "description": "Payment object", "properties": { "id": { "description": "Charge ID", "type": "string", "maxLength": 32 }, "appId": { "description": "App ID", "type": "string", "maxLength": 32 }, "object": { "description": "Object type", "type": "string", "default": "charge" }, "liveMode": { "description": "Whether this is live mode\n- false Test mode\n- true Live mode\n", "type": "boolean" }, "amount": { "description": "Payment amount", "type": "integer" }, "authorizeAmount": { "description": "Pre-authorization amount", "type": "integer" }, "currency": { "description": "Currency code (ISO 4217)", "type": "string", "minLength": 3, "maxLength": 3, "default": "JPY" }, "authorize": { "description": "Pre-authorization flag", "type": "boolean" }, "paymentMethod": { "$ref": "#/components/schemas/PaymentMethodType" }, "resource": { "$ref": "#/components/schemas/ResourceType" }, "orderNo": { "description": "Merchant system order number, e.g., order number, payment ID, etc.", "type": "string", "maxLength": 50 }, "description": { "description": "Payment description", "type": "string", "maxLength": 1024 }, "location": { "$ref": "#/components/schemas/ChargeLocationDto" }, "extra": { "description": "Payment extra data", "type": "object", "maxProperties": 20, "propertyNames": { "type": "string", "maxLength": 20 }, "additionalProperties": { "type": "string" } }, "metadata": { "description": "Payment metadata", "type": "object", "maxProperties": 20, "propertyNames": { "type": "string", "maxLength": 20 }, "additionalProperties": { "type": "string" } }, "cardInfo": { "$ref": "#/components/schemas/CardInfo" }, "voucherNo": { "description": "Provider payment voucher number", "type": "string", "maxLength": 32 }, "clientIp": { "description": "Client IP address", "type": "string", "maxLength": 45 }, "paid": { "description": "Paid flag", "type": "boolean" }, "refunded": { "description": "Refunded flag", "type": "boolean" }, "disputed": { "description": "Disputed flag", "type": "boolean" }, "refunds": { "$ref": "#/components/schemas/RefundsDto" }, "status": { "$ref": "#/components/schemas/ChargeStatusType" }, "codeContent": { "description": "Merchant-presented QR code (only when resource is mpm)", "type": "string" }, "credential": { "description": "Client SDK credentials", "type": "string" }, "paidTime": { "description": "Payment time (epoch millisecond)", "type": "integer", "format": "int64" }, "refundTime": { "description": "Refund time (epoch millisecond)", "type": "integer", "format": "int64" }, "expiryTime": { "description": "Payment request expiry time (epoch millisecond)", "type": "integer", "format": "int64" }, "settleTime": { "description": "Payment settlement time (epoch millisecond)", "type": "integer", "format": "int64" }, "createTime": { "description": "Payment creation time (epoch millisecond)", "type": "integer", "format": "int64" } } }, "CustomerDto": { "description": "Customer object", "properties": { "id": { "description": "Customer ID", "type": "string", "maxLength": 32 }, "object": { "description": "Object type", "type": "string", "default": "customer" }, "liveMode": { "description": "Whether this is live mode\n- false Test mode\n- true Live mode\n", "type": "boolean" }, "defaultSource": { "description": "Default customer source ID", "type": "string", "maxLength": 32 }, "name": { "description": "Name", "type": "string", "maxLength": 255 }, "description": { "description": "Description of the customer", "type": "string", "maxLength": 255 }, "email": { "description": "Email address", "type": "string", "maxLength": 255 }, "phone": { "description": "Phone number", "type": "string", "maxLength": 255 }, "remark": { "description": "Remarks", "type": "string" }, "operator": { "description": "Operator", "type": "string", "maxLength": 255 }, "status": { "$ref": "#/components/schemas/CustomerStatusType" }, "metadata": { "description": "Metadata", "type": "object", "maxProperties": 20, "propertyNames": { "type": "string", "maxLength": 20 }, "additionalProperties": { "type": "string" } }, "updateTime": { "description": "update time", "type": "integer", "format": "int64" } } }, "SourceDto": { "description": "Customer source object", "properties": { "id": { "description": "Source ID", "type": "string", "maxLength": 32 }, "object": { "description": "Object type", "type": "string", "default": "source" }, "liveMode": { "description": "Whether this is live mode\n- false Test mode\n- true Live mode\n", "type": "boolean" }, "paymentMethod": { "$ref": "#/components/schemas/PaymentMethodType" }, "resource": { "$ref": "#/components/schemas/ResourceType" }, "description": { "description": "Description of the customer source", "type": "string", "maxLength": 255 }, "extra": { "description": "Customer source extra data", "type": "object", "maxProperties": 20, "propertyNames": { "type": "string", "maxLength": 20 }, "additionalProperties": { "type": "string" } }, "info": { "description": "Customer source information", "type": "object", "additionalProperties": { "type": "object" } }, "cardInfo": { "$ref": "#/components/schemas/CardInfo" }, "metadata": { "description": "Metadata", "type": "object", "maxProperties": 20, "propertyNames": { "type": "string", "maxLength": 20 }, "additionalProperties": { "type": "string" } }, "credential": { "description": "Client SDK credentials", "type": "string" }, "status": { "$ref": "#/components/schemas/SourceStatusType" } } }, "InvoiceDto": { "description": "Invoice object", "properties": { "id": { "description": "Invoice ID", "type": "string", "maxLength": 32 }, "object": { "description": "Object type", "type": "string", "default": "invoice" }, "liveMode": { "description": "Whether this is live mode\n- false Test mode\n- true Live mode\n", "type": "boolean" }, "customer": { "$ref": "#/components/schemas/CustomerDto" }, "invoiceNo": { "description": "Invoice Number", "type": "string", "maxLength": 255 }, "name": { "description": "Invoice subject", "type": "string", "maxLength": 255 }, "memo": { "description": "Invoice memo", "type": "string", "maxLength": 255 }, "amount": { "description": "Payment amount", "type": "integer" }, "currency": { "description": "Currency code (ISO 4217)", "type": "string", "minLength": 3, "maxLength": 3, "default": "JPY" }, "status": { "$ref": "#/components/schemas/InvoiceStatusType" }, "operator": { "description": "Operator", "type": "string", "maxLength": 255 }, "invoiceTime": { "description": "Billing date (epoch millisecond)", "type": "integer", "format": "int64" }, "sendTime": { "description": "Send time (epoch millisecond)", "type": "integer", "format": "int64" }, "paidTime": { "description": "Payment time (epoch millisecond)", "type": "integer", "format": "int64" }, "expiryTime": { "description": "Payment request expiry time (epoch millisecond)", "type": "integer", "format": "int64" }, "createTime": { "description": "Creation time (epoch millisecond)", "type": "integer", "format": "int64" }, "fields": { "description": "Invoice field list", "type": "array", "items": { "type": "string" } }, "items": { "description": "Invoice item list", "type": "array", "items": { "$ref": "#/components/schemas/InvoiceItem" } }, "remark": { "description": "Additional description", "type": "string" }, "metadata": { "description": "Metadata", "type": "object", "maxProperties": 20, "propertyNames": { "type": "string", "maxLength": 20 }, "additionalProperties": { "type": "string" } }, "enableAutoCharge": { "description": "Whether to enable automatic payment.\ntrue Enabled, false Disabled\n", "type": "boolean" } } }, "PaymentMethodType": { "description": "Payment method\n- auto Auto detection (available for CPM payments only)\n- alipay Alipay\n- alipayhk AlipayHK\n- alipayplus Alipay+\n- amazonpay Amazon Pay\n- applepay Apple Pay\n- applepay_cn Apple Pay (China)\n- atokara Atokara\n- atone atone (pay next month at convenience stores)\n- aupay au Pay\n- clicktopay Click To Pay\n- banktransfer Bank transfer\n- creditcard Credit card\n- dana DANA\n- docomopay d Payment\n- ezlink EZ-Link\n- felica E-money\n- felica_id iD\n- felica_quickpay QUICPay\n- felica_transport_ic Transit IC card\n- gcash GCash\n- ginkopay Bank Pay\n- googlepay Google Pay\n- jcoinpay J-Coin Pay\n- jkopay JKOPAY\n- kakaopay Kakao Pay\n- konbini Convenience store payment\n- linepay LINE Pay\n- merpay Merpay\n- origamipay Origami Pay\n- paidy Paidy (pay next month)\n- paypal PayPal\n- paypay PayPay\n- pxpayplus AllPay\n- rakutenpay Rakuten Pay\n- smartcode Smart Code\n- tng Touch 'n Go eWallet\n- truemoney TrueMoney\n- unionpay UnionPay QuickPass\n- wechatpay Wechat Pay\n- aeonpay AEON Pay\n- rabbitlinepay Rabbit LINE Pay\n- bpi BPI\n- boost Boost\n- hellomoney HelloMoney by AUB\n- tosspay Toss Pay\n- naverpay Naver Pay\n- wellwa WellWa Points\n- grabpay Grab Pay\n- momopay Momo Pay\n- promptpay Prompt Pay\n- wovenpay Woven City Pay\n- ezopay EZO Pay\n", "type": "string", "enum": [ "alipay", "alipayhk", "alipayplus", "amazonpay", "applepay", "applepay_cn", "atokara", "atone", "aupay", "clicktopay", "banktransfer", "creditcard", "dana", "docomopay", "ezlink", "felica", "felica_id", "felica_quickpay", "felica_transport_ic", "gcash", "ginkopay", "googlepay", "jcoinpay", "jkopay", "kakaopay", "konbini", "linepay", "merpay", "origamipay", "paidy", "paypal", "paypay", "pxpayplus", "rakutenpay", "smartcode", "tng", "truemoney", "unionpay", "wechatpay", "aeonpay", "rabbitlinepay", "bpi", "boost", "hellomoney", "tosspay", "naverpay", "wellwa", "grabpay", "momopay", "promptpay", "wovenpay", "ezopay", "auto" ] }, "ResourceType": { "description": "Payment resource\n- web Web browser\n- ios iOS native app\n- android Android native app\n- liff LINE LIFF app\n- mini WeChat Mini Program\n- cpm CPM payment (customer-presented QR code)\n- mpm MPM payment (merchant-presented QR code)\n- reader Card reader payment (reader device required)\n- posapp POS app payment (POS app integration required)\n", "type": "string", "enum": [ "web", "ios", "android", "liff", "mini", "cpm", "mpm", "reader", "posapp" ] }, "ChargeLocationDto": { "description": "Location object", "type": "object", "properties": { "id": { "description": "Location ID", "type": "string", "maxLength": 32 }, "name": { "$ref": "#/components/schemas/StringTransliterationDto" }, "tel": { "description": "Phone number", "type": "string", "maxLength": 20 }, "zip": { "description": "Postal code", "type": "string", "maxLength": 8 }, "address": { "$ref": "#/components/schemas/AddressTransliterationDto" }, "latitude": { "description": "Latitude", "type": "number", "format": "double" }, "longitude": { "description": "Longitude", "type": "number", "format": "double" }, "note": { "description": "Remarks", "type": "string" }, "status": { "$ref": "#/components/schemas/ChargeLocationStatusType" } } }, "CardInfo": { "type": "object", "description": "Card and wallet information", "properties": { "brand": { "$ref": "#/components/schemas/CardBrandType" }, "last4": { "description": "Last 4 digits of the card number", "type": "string" }, "expMonth": { "description": "Expiration month", "type": "integer" }, "expYear": { "description": "Expiration year", "type": "integer" }, "name": { "description": "Cardholder name", "type": "string" }, "issuerCode": { "description": "Card issuer code (GMO payment only)\nComplies with GMO-PG \"destination card company code\"\n", "type": "string" }, "issuerName": { "description": "Card issuer name (GMO payment only)\nCompany name corresponding to GMO-PG \"destination card company code\"\n", "type": "string" }, "wallet": { "description": "Wallet information", "type": "string" }, "walletApp": { "description": "Wallet app information (for paymentMethod alipayplus or smartcode, the actual app name used)", "type": "string" }, "repaymentType": { "description": "Repayment type\n- 1 One-time payment\n- revolving Revolving payment\n- bonus_one_time Bonus one-time payment\n- 2 Two-installment payment\n- 3 Three-installment payment\n", "type": "string" }, "approvalCode": { "description": "Authorization code", "type": "string" }, "threeDSecure": { "description": "3D Secure enabled", "type": "boolean" }, "threeDSecureVersion": { "description": "3D Secure version", "type": "string" }, "threeDSecureDetail": { "description": "3D Secure details", "type": "string" }, "businessType": { "description": "Business type", "type": "string" }, "konbiniScanTime": { "description": "Last scan time by the convenience store", "type": "integer", "format": "int64" }, "konbiniType": { "description": "Convenience store type used for the actual payment\n- unknown\n- seven_eleven\n- lawson\n- familymart\n- ministop\n- seicomart\n", "type": "string" }, "receivedAmount": { "description": "Actual amount received from the convenience store or bank", "type": "integer" }, "receivedTime": { "description": "Actual time received by the convenience store or bank; this value may contain only the date (midnight).", "type": "integer", "format": "int64" }, "bankUserCode": { "description": "Bank transfer user code", "type": "string" }, "bankUserName": { "description": "Bank transfer user name", "type": "string" }, "bankName": { "description": "Receiving bank name", "type": "string" }, "bankBranchName": { "description": "Receiving bank branch name", "type": "string" }, "bankAccountNo": { "description": "Receiving bank account number", "type": "string" }, "billingNo": { "description": "Billing number (for payment station)", "type": "string" } } }, "RefundsDto": { "description": "Refund summary. If multiple refunds are issued, refund details are summarized and returned.", "type": "object", "properties": { "amount": { "description": "Total refunded amount", "type": "integer" }, "totalCount": { "description": "Number of refunds", "type": "integer" }, "data": { "description": "Refund details", "type": "array", "items": { "$ref": "#/components/schemas/RefundDto" } } } }, "ChargeStatusType": { "description": "Payment status\n- pending Unpaid\n- waiting Waiting for payment (information entered)\n- notified Preparing for payment (notified)\n- uncaptured Authorized (not captured)\n- captured Paid\n- partially_refunded Partially refunded\n- refunded Refunded\n- amount_mismatch Amount mismatch\n- revoked Canceled\n- failed Payment failed\n", "type": "string", "enum": [ "pending", "waiting", "notified", "uncaptured", "captured", "partially_refunded", "refunded", "amount_mismatch", "revoked", "failed" ] }, "CustomerStatusType": { "description": "Status\n", "type": "string", "enum": [ "active", "deleted" ] }, "SourceStatusType": { "description": "Customer source status\n- pending Not approved\n- active Approved\n- failed Approval failed\n- inactive Approved, but currently unavailable\n- deleted Deleted or expired\n", "type": "string", "enum": [ "pending", "active", "failed", "inactive", "deleted" ] }, "InvoiceStatusType": { "description": "Invoice status\n- draft Draft\n- submit Finalized\n- sent Sent\n- paid Paid\n- expired Expired\n- canceled Canceled\n", "type": "string", "enum": [ "draft", "submit", "sent", "paid", "expired", "canceled" ] }, "InvoiceItem": { "description": "Invoice item object", "properties": { "id": { "description": "Invoice Item ID", "type": "string", "maxLength": 32 }, "object": { "description": "Object type", "type": "string", "default": "invoiceItem" }, "name": { "description": "Product name", "type": "string", "maxLength": 255 }, "unitPrice": { "description": "Unit price", "type": "integer" }, "currency": { "description": "Currency code (ISO 4217)", "type": "string", "minLength": 3, "maxLength": 3, "default": "JPY" }, "quantity": { "description": "Count", "type": "integer" }, "unit": { "description": "Unit", "type": "string" }, "taxRateType": { "$ref": "#/components/schemas/TaxRateType" }, "transactionTime": { "description": "Transaction time (epoch millisecond)", "type": "integer", "format": "int64" } } }, "StringTransliterationDto": { "description": "Name transliteration object", "type": "object", "properties": { "kanji": { "description": "Kanji", "type": "string" }, "kana": { "description": "Kana", "type": "string" }, "romaji": { "description": "Romaji", "type": "string" } } }, "AddressTransliterationDto": { "description": "Address transliteration object", "type": "object", "properties": { "kanji": { "$ref": "#/components/schemas/AddressDto" }, "kana": { "$ref": "#/components/schemas/AddressDto" }, "romaji": { "$ref": "#/components/schemas/AddressDto" } } }, "ChargeLocationStatusType": { "description": "Location status\n- active Active\n- submitted Submitted\n", "type": "string", "enum": [ "active", "submitted" ] }, "CardBrandType": { "description": "- unknown\n- visa\n- mastercard\n- amex\n- jcb\n- diners\n- unionpay\n- discover\n- felica\n- seven_eleven\n- lawson\n- familymart\n- ministop\n- seicomart\n", "type": "string" }, "RefundDto": { "description": "Refund object", "type": "object", "properties": { "id": { "description": "Refund ID", "type": "string", "maxLength": 32 }, "object": { "description": "Object type", "type": "string", "default": "refund" }, "chargeId": { "description": "Charge ID", "type": "string", "maxLength": 32 }, "liveMode": { "description": "Whether this is live mode\n- false Test mode\n- true Live mode\n", "type": "boolean" }, "amount": { "description": "Refund amount. You can refund the full amount, or partially refund by specifying amount.", "type": "integer" }, "currency": { "description": "Currency code (ISO 4217)", "type": "string", "minLength": 3, "maxLength": 3 }, "metadata": { "description": "Refund metadata", "type": "object", "maxProperties": 20, "propertyNames": { "type": "string", "maxLength": 20 }, "additionalProperties": { "type": "string" } }, "reason": { "description": "Refund reason", "type": "string", "maxLength": 255 }, "status": { "$ref": "#/components/schemas/RefundStatusType" }, "refundedTime": { "description": "Refund processed time (epoch millisecond)", "type": "integer", "format": "int64" }, "createTime": { "description": "Refund creation time (epoch millisecond)", "type": "integer", "format": "int64" } } }, "TaxRateType": { "description": "Tax rate type\n- standard Standard rate (10%)\n- reduced Reduced rate (8%)\n- free Tax-free (0%)\n", "type": "string", "enum": [ "standard", "reduced", "free" ] }, "AddressDto": { "description": "Address object", "type": "object", "properties": { "pref": { "description": "Prefecture", "type": "string" }, "city": { "description": "City/Municipality", "type": "string" }, "town": { "description": "Town", "type": "string" }, "address1": { "description": "Address line 1", "type": "string" }, "address2": { "description": "Address line 2", "type": "string" } } }, "RefundStatusType": { "description": "Refund status\n- pending Not refunded\n- refunded Refunded\n", "type": "string", "enum": [ "pending", "refunded" ] } }, "securitySchemes": { "bearerAuth": { "type": "http", "scheme": "bearer", "description": "API authentication is performed via Bearer auth using the secret key as the bearer token.\nThe secret key is a critical key that allows all API operations, so handle it with care.\n" }, "basicAuth": { "type": "http", "scheme": "basic", "description": "API authentication is performed via Basic auth using the secret key as the username and omitting the password.\nThe secret key is a critical key that allows all API operations, so handle it with care.\n" } } } } ``` # Retrieve EasyQR code (https://elepay-docs.elestyle.workers.dev/openapi/code/retrieveCode) Retrieves an EasyQR code object. **Page URL**: https://elepay-docs.elestyle.workers.dev/openapi/code/retrieveCode **Endpoint**: GET /codes/{codeId} ```json { "openapi": "3.1.0", "info": { "version": "1.3.0", "title": "elepay API Reference", "description": "The elepay API is a REST-based payment API. It provides various capabilities for payment operations, such as processing payments and refunds.", "contact": { "name": "ELESTYLE, INC", "url": "https://elepay.io", "email": "support@elestyle.jp" } }, "servers": [ { "url": "https://api.elepay.io" } ], "security": [ { "bearerAuth": [] }, { "basicAuth": [] } ], "tags": [ { "name": "Code" } ], "paths": { "/codes/{codeId}": { "get": { "tags": [ "Code" ], "summary": "Retrieve EasyQR code", "description": "Retrieves an EasyQR code object.", "operationId": "retrieveCode", "parameters": [ { "name": "codeId", "description": "EasyQR code", "in": "path", "required": true, "schema": { "type": "string" } } ], "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CodeDto" } } } } } } } }, "components": { "schemas": { "CodeDto": { "type": "object", "description": "EasyQR code object", "properties": { "id": { "description": "EasyQR code ID", "type": "string", "maxLength": 32 }, "object": { "description": "Object type", "type": "string", "default": "code" }, "liveMode": { "description": "Whether this is live mode\n- false Test mode\n- true Live mode\n", "type": "boolean" }, "codeUrl": { "description": "EasyQR code URL", "type": "string", "maxLength": 255 }, "amount": { "description": "Payment amount", "type": "integer" }, "currency": { "description": "Currency code (ISO 4217)", "type": "string", "minLength": 3, "maxLength": 3, "default": "JPY" }, "orderNo": { "description": "Merchant system order number, e.g., order number, payment ID, etc.", "type": "string", "maxLength": 50 }, "description": { "description": "The payment object's 'Description of the payment'", "type": "string", "maxLength": 255 }, "extra": { "description": "Payment extra data", "type": "object", "maxProperties": 20, "propertyNames": { "type": "string", "maxLength": 20 }, "additionalProperties": { "type": "string" } }, "metadata": { "description": "The payment object's 'Metadata'", "type": "object", "maxProperties": 20, "propertyNames": { "type": "string", "maxLength": 20 }, "additionalProperties": { "type": "string" } }, "status": { "$ref": "#/components/schemas/CodeStatusType" }, "charge": { "$ref": "#/components/schemas/ChargeDto" }, "customer": { "$ref": "#/components/schemas/CustomerDto" }, "source": { "$ref": "#/components/schemas/SourceDto" }, "frontUrl": { "type": "string" }, "items": { "type": "array", "items": { "$ref": "#/components/schemas/CodeItem" } }, "locationId": { "description": "Location ID", "type": "string", "maxLength": 32 }, "expired": { "description": "Whether the EasyQR code is expired", "type": "boolean" }, "expiryTime": { "description": "EasyQR code expiry time (epoch millisecond)", "type": "integer", "format": "int64" }, "expiryPeriod": { "description": "Remaining milliseconds until EasyQR code expiry", "type": "integer", "format": "int64" }, "createTime": { "description": "Code creation time (epoch millisecond)", "type": "integer", "format": "int64" }, "shouldCreateSource": { "description": "Whether a new customer source needs to be created with this code.\n", "type": "boolean" }, "activeSources": { "description": "List of active customer sources", "type": "array", "items": { "$ref": "#/components/schemas/SourceDto" } }, "invoice": { "$ref": "#/components/schemas/InvoiceDto" } } }, "CodeStatusType": { "description": "EasyQR code status\n- pending Unpaid\n- completed Payment information is ready\n- captured Paid\n- closed Expired or deleted\n", "type": "string", "enum": [ "pending", "completed", "captured", "closed" ] }, "ChargeDto": { "type": "object", "description": "Payment object", "properties": { "id": { "description": "Charge ID", "type": "string", "maxLength": 32 }, "appId": { "description": "App ID", "type": "string", "maxLength": 32 }, "object": { "description": "Object type", "type": "string", "default": "charge" }, "liveMode": { "description": "Whether this is live mode\n- false Test mode\n- true Live mode\n", "type": "boolean" }, "amount": { "description": "Payment amount", "type": "integer" }, "authorizeAmount": { "description": "Pre-authorization amount", "type": "integer" }, "currency": { "description": "Currency code (ISO 4217)", "type": "string", "minLength": 3, "maxLength": 3, "default": "JPY" }, "authorize": { "description": "Pre-authorization flag", "type": "boolean" }, "paymentMethod": { "$ref": "#/components/schemas/PaymentMethodType" }, "resource": { "$ref": "#/components/schemas/ResourceType" }, "orderNo": { "description": "Merchant system order number, e.g., order number, payment ID, etc.", "type": "string", "maxLength": 50 }, "description": { "description": "Payment description", "type": "string", "maxLength": 1024 }, "location": { "$ref": "#/components/schemas/ChargeLocationDto" }, "extra": { "description": "Payment extra data", "type": "object", "maxProperties": 20, "propertyNames": { "type": "string", "maxLength": 20 }, "additionalProperties": { "type": "string" } }, "metadata": { "description": "Payment metadata", "type": "object", "maxProperties": 20, "propertyNames": { "type": "string", "maxLength": 20 }, "additionalProperties": { "type": "string" } }, "cardInfo": { "$ref": "#/components/schemas/CardInfo" }, "voucherNo": { "description": "Provider payment voucher number", "type": "string", "maxLength": 32 }, "clientIp": { "description": "Client IP address", "type": "string", "maxLength": 45 }, "paid": { "description": "Paid flag", "type": "boolean" }, "refunded": { "description": "Refunded flag", "type": "boolean" }, "disputed": { "description": "Disputed flag", "type": "boolean" }, "refunds": { "$ref": "#/components/schemas/RefundsDto" }, "status": { "$ref": "#/components/schemas/ChargeStatusType" }, "codeContent": { "description": "Merchant-presented QR code (only when resource is mpm)", "type": "string" }, "credential": { "description": "Client SDK credentials", "type": "string" }, "paidTime": { "description": "Payment time (epoch millisecond)", "type": "integer", "format": "int64" }, "refundTime": { "description": "Refund time (epoch millisecond)", "type": "integer", "format": "int64" }, "expiryTime": { "description": "Payment request expiry time (epoch millisecond)", "type": "integer", "format": "int64" }, "settleTime": { "description": "Payment settlement time (epoch millisecond)", "type": "integer", "format": "int64" }, "createTime": { "description": "Payment creation time (epoch millisecond)", "type": "integer", "format": "int64" } } }, "CustomerDto": { "description": "Customer object", "properties": { "id": { "description": "Customer ID", "type": "string", "maxLength": 32 }, "object": { "description": "Object type", "type": "string", "default": "customer" }, "liveMode": { "description": "Whether this is live mode\n- false Test mode\n- true Live mode\n", "type": "boolean" }, "defaultSource": { "description": "Default customer source ID", "type": "string", "maxLength": 32 }, "name": { "description": "Name", "type": "string", "maxLength": 255 }, "description": { "description": "Description of the customer", "type": "string", "maxLength": 255 }, "email": { "description": "Email address", "type": "string", "maxLength": 255 }, "phone": { "description": "Phone number", "type": "string", "maxLength": 255 }, "remark": { "description": "Remarks", "type": "string" }, "operator": { "description": "Operator", "type": "string", "maxLength": 255 }, "status": { "$ref": "#/components/schemas/CustomerStatusType" }, "metadata": { "description": "Metadata", "type": "object", "maxProperties": 20, "propertyNames": { "type": "string", "maxLength": 20 }, "additionalProperties": { "type": "string" } }, "updateTime": { "description": "update time", "type": "integer", "format": "int64" } } }, "SourceDto": { "description": "Customer source object", "properties": { "id": { "description": "Source ID", "type": "string", "maxLength": 32 }, "object": { "description": "Object type", "type": "string", "default": "source" }, "liveMode": { "description": "Whether this is live mode\n- false Test mode\n- true Live mode\n", "type": "boolean" }, "paymentMethod": { "$ref": "#/components/schemas/PaymentMethodType" }, "resource": { "$ref": "#/components/schemas/ResourceType" }, "description": { "description": "Description of the customer source", "type": "string", "maxLength": 255 }, "extra": { "description": "Customer source extra data", "type": "object", "maxProperties": 20, "propertyNames": { "type": "string", "maxLength": 20 }, "additionalProperties": { "type": "string" } }, "info": { "description": "Customer source information", "type": "object", "additionalProperties": { "type": "object" } }, "cardInfo": { "$ref": "#/components/schemas/CardInfo" }, "metadata": { "description": "Metadata", "type": "object", "maxProperties": 20, "propertyNames": { "type": "string", "maxLength": 20 }, "additionalProperties": { "type": "string" } }, "credential": { "description": "Client SDK credentials", "type": "string" }, "status": { "$ref": "#/components/schemas/SourceStatusType" } } }, "CodeItem": { "type": "object", "description": "Product information", "required": [ "name", "price", "count" ], "properties": { "name": { "description": "Product name", "type": "string" }, "image": { "description": "Product image URL", "type": "string", "pattern": "https?://[-A-Za-z0-9+&@#/%?=~_|!:,.;]+[-A-Za-z0-9+&@#/%=~_|]" }, "price": { "description": "Payment amount for each product item", "type": "integer" }, "count": { "description": "Quantity", "type": "integer" } } }, "InvoiceDto": { "description": "Invoice object", "properties": { "id": { "description": "Invoice ID", "type": "string", "maxLength": 32 }, "object": { "description": "Object type", "type": "string", "default": "invoice" }, "liveMode": { "description": "Whether this is live mode\n- false Test mode\n- true Live mode\n", "type": "boolean" }, "customer": { "$ref": "#/components/schemas/CustomerDto" }, "invoiceNo": { "description": "Invoice Number", "type": "string", "maxLength": 255 }, "name": { "description": "Invoice subject", "type": "string", "maxLength": 255 }, "memo": { "description": "Invoice memo", "type": "string", "maxLength": 255 }, "amount": { "description": "Payment amount", "type": "integer" }, "currency": { "description": "Currency code (ISO 4217)", "type": "string", "minLength": 3, "maxLength": 3, "default": "JPY" }, "status": { "$ref": "#/components/schemas/InvoiceStatusType" }, "operator": { "description": "Operator", "type": "string", "maxLength": 255 }, "invoiceTime": { "description": "Billing date (epoch millisecond)", "type": "integer", "format": "int64" }, "sendTime": { "description": "Send time (epoch millisecond)", "type": "integer", "format": "int64" }, "paidTime": { "description": "Payment time (epoch millisecond)", "type": "integer", "format": "int64" }, "expiryTime": { "description": "Payment request expiry time (epoch millisecond)", "type": "integer", "format": "int64" }, "createTime": { "description": "Creation time (epoch millisecond)", "type": "integer", "format": "int64" }, "fields": { "description": "Invoice field list", "type": "array", "items": { "type": "string" } }, "items": { "description": "Invoice item list", "type": "array", "items": { "$ref": "#/components/schemas/InvoiceItem" } }, "remark": { "description": "Additional description", "type": "string" }, "metadata": { "description": "Metadata", "type": "object", "maxProperties": 20, "propertyNames": { "type": "string", "maxLength": 20 }, "additionalProperties": { "type": "string" } }, "enableAutoCharge": { "description": "Whether to enable automatic payment.\ntrue Enabled, false Disabled\n", "type": "boolean" } } }, "PaymentMethodType": { "description": "Payment method\n- auto Auto detection (available for CPM payments only)\n- alipay Alipay\n- alipayhk AlipayHK\n- alipayplus Alipay+\n- amazonpay Amazon Pay\n- applepay Apple Pay\n- applepay_cn Apple Pay (China)\n- atokara Atokara\n- atone atone (pay next month at convenience stores)\n- aupay au Pay\n- clicktopay Click To Pay\n- banktransfer Bank transfer\n- creditcard Credit card\n- dana DANA\n- docomopay d Payment\n- ezlink EZ-Link\n- felica E-money\n- felica_id iD\n- felica_quickpay QUICPay\n- felica_transport_ic Transit IC card\n- gcash GCash\n- ginkopay Bank Pay\n- googlepay Google Pay\n- jcoinpay J-Coin Pay\n- jkopay JKOPAY\n- kakaopay Kakao Pay\n- konbini Convenience store payment\n- linepay LINE Pay\n- merpay Merpay\n- origamipay Origami Pay\n- paidy Paidy (pay next month)\n- paypal PayPal\n- paypay PayPay\n- pxpayplus AllPay\n- rakutenpay Rakuten Pay\n- smartcode Smart Code\n- tng Touch 'n Go eWallet\n- truemoney TrueMoney\n- unionpay UnionPay QuickPass\n- wechatpay Wechat Pay\n- aeonpay AEON Pay\n- rabbitlinepay Rabbit LINE Pay\n- bpi BPI\n- boost Boost\n- hellomoney HelloMoney by AUB\n- tosspay Toss Pay\n- naverpay Naver Pay\n- wellwa WellWa Points\n- grabpay Grab Pay\n- momopay Momo Pay\n- promptpay Prompt Pay\n- wovenpay Woven City Pay\n- ezopay EZO Pay\n", "type": "string", "enum": [ "alipay", "alipayhk", "alipayplus", "amazonpay", "applepay", "applepay_cn", "atokara", "atone", "aupay", "clicktopay", "banktransfer", "creditcard", "dana", "docomopay", "ezlink", "felica", "felica_id", "felica_quickpay", "felica_transport_ic", "gcash", "ginkopay", "googlepay", "jcoinpay", "jkopay", "kakaopay", "konbini", "linepay", "merpay", "origamipay", "paidy", "paypal", "paypay", "pxpayplus", "rakutenpay", "smartcode", "tng", "truemoney", "unionpay", "wechatpay", "aeonpay", "rabbitlinepay", "bpi", "boost", "hellomoney", "tosspay", "naverpay", "wellwa", "grabpay", "momopay", "promptpay", "wovenpay", "ezopay", "auto" ] }, "ResourceType": { "description": "Payment resource\n- web Web browser\n- ios iOS native app\n- android Android native app\n- liff LINE LIFF app\n- mini WeChat Mini Program\n- cpm CPM payment (customer-presented QR code)\n- mpm MPM payment (merchant-presented QR code)\n- reader Card reader payment (reader device required)\n- posapp POS app payment (POS app integration required)\n", "type": "string", "enum": [ "web", "ios", "android", "liff", "mini", "cpm", "mpm", "reader", "posapp" ] }, "ChargeLocationDto": { "description": "Location object", "type": "object", "properties": { "id": { "description": "Location ID", "type": "string", "maxLength": 32 }, "name": { "$ref": "#/components/schemas/StringTransliterationDto" }, "tel": { "description": "Phone number", "type": "string", "maxLength": 20 }, "zip": { "description": "Postal code", "type": "string", "maxLength": 8 }, "address": { "$ref": "#/components/schemas/AddressTransliterationDto" }, "latitude": { "description": "Latitude", "type": "number", "format": "double" }, "longitude": { "description": "Longitude", "type": "number", "format": "double" }, "note": { "description": "Remarks", "type": "string" }, "status": { "$ref": "#/components/schemas/ChargeLocationStatusType" } } }, "CardInfo": { "type": "object", "description": "Card and wallet information", "properties": { "brand": { "$ref": "#/components/schemas/CardBrandType" }, "last4": { "description": "Last 4 digits of the card number", "type": "string" }, "expMonth": { "description": "Expiration month", "type": "integer" }, "expYear": { "description": "Expiration year", "type": "integer" }, "name": { "description": "Cardholder name", "type": "string" }, "issuerCode": { "description": "Card issuer code (GMO payment only)\nComplies with GMO-PG \"destination card company code\"\n", "type": "string" }, "issuerName": { "description": "Card issuer name (GMO payment only)\nCompany name corresponding to GMO-PG \"destination card company code\"\n", "type": "string" }, "wallet": { "description": "Wallet information", "type": "string" }, "walletApp": { "description": "Wallet app information (for paymentMethod alipayplus or smartcode, the actual app name used)", "type": "string" }, "repaymentType": { "description": "Repayment type\n- 1 One-time payment\n- revolving Revolving payment\n- bonus_one_time Bonus one-time payment\n- 2 Two-installment payment\n- 3 Three-installment payment\n", "type": "string" }, "approvalCode": { "description": "Authorization code", "type": "string" }, "threeDSecure": { "description": "3D Secure enabled", "type": "boolean" }, "threeDSecureVersion": { "description": "3D Secure version", "type": "string" }, "threeDSecureDetail": { "description": "3D Secure details", "type": "string" }, "businessType": { "description": "Business type", "type": "string" }, "konbiniScanTime": { "description": "Last scan time by the convenience store", "type": "integer", "format": "int64" }, "konbiniType": { "description": "Convenience store type used for the actual payment\n- unknown\n- seven_eleven\n- lawson\n- familymart\n- ministop\n- seicomart\n", "type": "string" }, "receivedAmount": { "description": "Actual amount received from the convenience store or bank", "type": "integer" }, "receivedTime": { "description": "Actual time received by the convenience store or bank; this value may contain only the date (midnight).", "type": "integer", "format": "int64" }, "bankUserCode": { "description": "Bank transfer user code", "type": "string" }, "bankUserName": { "description": "Bank transfer user name", "type": "string" }, "bankName": { "description": "Receiving bank name", "type": "string" }, "bankBranchName": { "description": "Receiving bank branch name", "type": "string" }, "bankAccountNo": { "description": "Receiving bank account number", "type": "string" }, "billingNo": { "description": "Billing number (for payment station)", "type": "string" } } }, "RefundsDto": { "description": "Refund summary. If multiple refunds are issued, refund details are summarized and returned.", "type": "object", "properties": { "amount": { "description": "Total refunded amount", "type": "integer" }, "totalCount": { "description": "Number of refunds", "type": "integer" }, "data": { "description": "Refund details", "type": "array", "items": { "$ref": "#/components/schemas/RefundDto" } } } }, "ChargeStatusType": { "description": "Payment status\n- pending Unpaid\n- waiting Waiting for payment (information entered)\n- notified Preparing for payment (notified)\n- uncaptured Authorized (not captured)\n- captured Paid\n- partially_refunded Partially refunded\n- refunded Refunded\n- amount_mismatch Amount mismatch\n- revoked Canceled\n- failed Payment failed\n", "type": "string", "enum": [ "pending", "waiting", "notified", "uncaptured", "captured", "partially_refunded", "refunded", "amount_mismatch", "revoked", "failed" ] }, "CustomerStatusType": { "description": "Status\n", "type": "string", "enum": [ "active", "deleted" ] }, "SourceStatusType": { "description": "Customer source status\n- pending Not approved\n- active Approved\n- failed Approval failed\n- inactive Approved, but currently unavailable\n- deleted Deleted or expired\n", "type": "string", "enum": [ "pending", "active", "failed", "inactive", "deleted" ] }, "InvoiceStatusType": { "description": "Invoice status\n- draft Draft\n- submit Finalized\n- sent Sent\n- paid Paid\n- expired Expired\n- canceled Canceled\n", "type": "string", "enum": [ "draft", "submit", "sent", "paid", "expired", "canceled" ] }, "InvoiceItem": { "description": "Invoice item object", "properties": { "id": { "description": "Invoice Item ID", "type": "string", "maxLength": 32 }, "object": { "description": "Object type", "type": "string", "default": "invoiceItem" }, "name": { "description": "Product name", "type": "string", "maxLength": 255 }, "unitPrice": { "description": "Unit price", "type": "integer" }, "currency": { "description": "Currency code (ISO 4217)", "type": "string", "minLength": 3, "maxLength": 3, "default": "JPY" }, "quantity": { "description": "Count", "type": "integer" }, "unit": { "description": "Unit", "type": "string" }, "taxRateType": { "$ref": "#/components/schemas/TaxRateType" }, "transactionTime": { "description": "Transaction time (epoch millisecond)", "type": "integer", "format": "int64" } } }, "StringTransliterationDto": { "description": "Name transliteration object", "type": "object", "properties": { "kanji": { "description": "Kanji", "type": "string" }, "kana": { "description": "Kana", "type": "string" }, "romaji": { "description": "Romaji", "type": "string" } } }, "AddressTransliterationDto": { "description": "Address transliteration object", "type": "object", "properties": { "kanji": { "$ref": "#/components/schemas/AddressDto" }, "kana": { "$ref": "#/components/schemas/AddressDto" }, "romaji": { "$ref": "#/components/schemas/AddressDto" } } }, "ChargeLocationStatusType": { "description": "Location status\n- active Active\n- submitted Submitted\n", "type": "string", "enum": [ "active", "submitted" ] }, "CardBrandType": { "description": "- unknown\n- visa\n- mastercard\n- amex\n- jcb\n- diners\n- unionpay\n- discover\n- felica\n- seven_eleven\n- lawson\n- familymart\n- ministop\n- seicomart\n", "type": "string" }, "RefundDto": { "description": "Refund object", "type": "object", "properties": { "id": { "description": "Refund ID", "type": "string", "maxLength": 32 }, "object": { "description": "Object type", "type": "string", "default": "refund" }, "chargeId": { "description": "Charge ID", "type": "string", "maxLength": 32 }, "liveMode": { "description": "Whether this is live mode\n- false Test mode\n- true Live mode\n", "type": "boolean" }, "amount": { "description": "Refund amount. You can refund the full amount, or partially refund by specifying amount.", "type": "integer" }, "currency": { "description": "Currency code (ISO 4217)", "type": "string", "minLength": 3, "maxLength": 3 }, "metadata": { "description": "Refund metadata", "type": "object", "maxProperties": 20, "propertyNames": { "type": "string", "maxLength": 20 }, "additionalProperties": { "type": "string" } }, "reason": { "description": "Refund reason", "type": "string", "maxLength": 255 }, "status": { "$ref": "#/components/schemas/RefundStatusType" }, "refundedTime": { "description": "Refund processed time (epoch millisecond)", "type": "integer", "format": "int64" }, "createTime": { "description": "Refund creation time (epoch millisecond)", "type": "integer", "format": "int64" } } }, "TaxRateType": { "description": "Tax rate type\n- standard Standard rate (10%)\n- reduced Reduced rate (8%)\n- free Tax-free (0%)\n", "type": "string", "enum": [ "standard", "reduced", "free" ] }, "AddressDto": { "description": "Address object", "type": "object", "properties": { "pref": { "description": "Prefecture", "type": "string" }, "city": { "description": "City/Municipality", "type": "string" }, "town": { "description": "Town", "type": "string" }, "address1": { "description": "Address line 1", "type": "string" }, "address2": { "description": "Address line 2", "type": "string" } } }, "RefundStatusType": { "description": "Refund status\n- pending Not refunded\n- refunded Refunded\n", "type": "string", "enum": [ "pending", "refunded" ] } }, "securitySchemes": { "bearerAuth": { "type": "http", "scheme": "bearer", "description": "API authentication is performed via Bearer auth using the secret key as the bearer token.\nThe secret key is a critical key that allows all API operations, so handle it with care.\n" }, "basicAuth": { "type": "http", "scheme": "basic", "description": "API authentication is performed via Basic auth using the secret key as the username and omitting the password.\nThe secret key is a critical key that allows all API operations, so handle it with care.\n" } } } } ``` # List all enabled EasyQR payment methods (https://elepay-docs.elestyle.workers.dev/openapi/codesetting/listCodePaymentMethods) Retrieves the payment methods available for EasyQR. **Page URL**: https://elepay-docs.elestyle.workers.dev/openapi/codesetting/listCodePaymentMethods **Endpoint**: GET /code-setting/payment-methods ```json { "openapi": "3.1.0", "info": { "version": "1.3.0", "title": "elepay API Reference", "description": "The elepay API is a REST-based payment API. It provides various capabilities for payment operations, such as processing payments and refunds.", "contact": { "name": "ELESTYLE, INC", "url": "https://elepay.io", "email": "support@elestyle.jp" } }, "servers": [ { "url": "https://api.elepay.io" } ], "security": [ { "bearerAuth": [] }, { "basicAuth": [] } ], "tags": [ { "name": "CodeSetting" } ], "paths": { "/code-setting/payment-methods": { "get": { "tags": [ "CodeSetting" ], "summary": "List all enabled EasyQR payment methods", "description": "Retrieves the payment methods available for EasyQR.", "operationId": "listCodePaymentMethods", "responses": { "200": { "description": "List of payment methods available for EasyQR.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CodePaymentMethodResponse" } } } } } } } }, "components": { "schemas": { "CodePaymentMethodResponse": { "description": "List of payment methods available for EasyQR.", "type": "object", "properties": { "total": { "description": "Count", "type": "integer" }, "paymentMethods": { "description": "Payment method details", "type": "array", "items": { "$ref": "#/components/schemas/PaymentMethodDto" } } } }, "PaymentMethodDto": { "description": "Payment method details", "type": "object", "properties": { "paymentMethod": { "$ref": "#/components/schemas/PaymentMethodType" }, "resources": { "type": "array", "items": { "$ref": "#/components/schemas/ResourceType" } }, "brand": { "description": "For credit cards, the available card brands", "type": "array", "items": { "description": "Card brand", "type": "string" } }, "ua": { "description": "Available browser user agent", "type": "string" }, "channelProperties": { "$ref": "#/components/schemas/ChannelPropertiesDto" }, "customerProperties": { "$ref": "#/components/schemas/CustomerPropertiesDto" } } }, "PaymentMethodType": { "description": "Payment method\n- auto Auto detection (available for CPM payments only)\n- alipay Alipay\n- alipayhk AlipayHK\n- alipayplus Alipay+\n- amazonpay Amazon Pay\n- applepay Apple Pay\n- applepay_cn Apple Pay (China)\n- atokara Atokara\n- atone atone (pay next month at convenience stores)\n- aupay au Pay\n- clicktopay Click To Pay\n- banktransfer Bank transfer\n- creditcard Credit card\n- dana DANA\n- docomopay d Payment\n- ezlink EZ-Link\n- felica E-money\n- felica_id iD\n- felica_quickpay QUICPay\n- felica_transport_ic Transit IC card\n- gcash GCash\n- ginkopay Bank Pay\n- googlepay Google Pay\n- jcoinpay J-Coin Pay\n- jkopay JKOPAY\n- kakaopay Kakao Pay\n- konbini Convenience store payment\n- linepay LINE Pay\n- merpay Merpay\n- origamipay Origami Pay\n- paidy Paidy (pay next month)\n- paypal PayPal\n- paypay PayPay\n- pxpayplus AllPay\n- rakutenpay Rakuten Pay\n- smartcode Smart Code\n- tng Touch 'n Go eWallet\n- truemoney TrueMoney\n- unionpay UnionPay QuickPass\n- wechatpay Wechat Pay\n- aeonpay AEON Pay\n- rabbitlinepay Rabbit LINE Pay\n- bpi BPI\n- boost Boost\n- hellomoney HelloMoney by AUB\n- tosspay Toss Pay\n- naverpay Naver Pay\n- wellwa WellWa Points\n- grabpay Grab Pay\n- momopay Momo Pay\n- promptpay Prompt Pay\n- wovenpay Woven City Pay\n- ezopay EZO Pay\n", "type": "string", "enum": [ "alipay", "alipayhk", "alipayplus", "amazonpay", "applepay", "applepay_cn", "atokara", "atone", "aupay", "clicktopay", "banktransfer", "creditcard", "dana", "docomopay", "ezlink", "felica", "felica_id", "felica_quickpay", "felica_transport_ic", "gcash", "ginkopay", "googlepay", "jcoinpay", "jkopay", "kakaopay", "konbini", "linepay", "merpay", "origamipay", "paidy", "paypal", "paypay", "pxpayplus", "rakutenpay", "smartcode", "tng", "truemoney", "unionpay", "wechatpay", "aeonpay", "rabbitlinepay", "bpi", "boost", "hellomoney", "tosspay", "naverpay", "wellwa", "grabpay", "momopay", "promptpay", "wovenpay", "ezopay", "auto" ] }, "ResourceType": { "description": "Payment resource\n- web Web browser\n- ios iOS native app\n- android Android native app\n- liff LINE LIFF app\n- mini WeChat Mini Program\n- cpm CPM payment (customer-presented QR code)\n- mpm MPM payment (merchant-presented QR code)\n- reader Card reader payment (reader device required)\n- posapp POS app payment (POS app integration required)\n", "type": "string", "enum": [ "web", "ios", "android", "liff", "mini", "cpm", "mpm", "reader", "posapp" ] }, "ChannelPropertiesDto": { "description": "Information about the payment method", "type": "object", "properties": { "isSupportRefund": { "type": "boolean", "description": "Refunds: true supported, false not supported" }, "isSupportPartialRefund": { "type": "boolean", "description": "Partial refunds: true supported, false not supported" }, "isSupportMultipleRefund": { "type": "boolean", "description": "Multiple refunds: true supported, false only once" }, "isSupportSource": { "type": "boolean", "description": "Customer & source: true supported, false not supported" }, "isSupportMultipleSource": { "type": "boolean", "description": "Multiple sources: true can be bound, false cannot be bound" }, "maxAmount": { "type": "integer", "description": "Maximum amount" }, "minAmount": { "type": "integer", "description": "Minimum amount" }, "resourceWebEnv": { "$ref": "#/components/schemas/ResourceWebEnvType" } } }, "CustomerPropertiesDto": { "deprecated": true, "description": "Customer-related information for payment methods. Deprecated. Use ChannelPropertiesDto instead.\n", "type": "object", "properties": { "isSupportCustomer": { "type": "boolean", "description": "Deprecated. Use ChannelPropertiesDto.isSupportSource.\nCustomer feature: true supported, false not supported.\n" }, "isSupportMultipleSource": { "type": "boolean", "description": "Deprecated. Use ChannelPropertiesDto.isSupportMultipleSource.\nMultiple sources: true can be bound, false cannot be bound\n" } } }, "ResourceWebEnvType": { "description": "When the resource is Web: supported environments\n- all All environments\n- wallet_app Only embedded browsers inside wallet apps\n- web Web only; not available inside wallet apps\n", "type": "string", "enum": [ "all", "wallet_app", "web" ] } }, "securitySchemes": { "bearerAuth": { "type": "http", "scheme": "bearer", "description": "API authentication is performed via Bearer auth using the secret key as the bearer token.\nThe secret key is a critical key that allows all API operations, so handle it with care.\n" }, "basicAuth": { "type": "http", "scheme": "basic", "description": "API authentication is performed via Basic auth using the secret key as the username and omitting the password.\nThe secret key is a critical key that allows all API operations, so handle it with care.\n" } } } } ``` # Create customer (https://elepay-docs.elestyle.workers.dev/openapi/customer/createCustomer) Creates a customer. **Page URL**: https://elepay-docs.elestyle.workers.dev/openapi/customer/createCustomer **Endpoint**: POST /customers ```json { "openapi": "3.1.0", "info": { "version": "1.3.0", "title": "elepay API Reference", "description": "The elepay API is a REST-based payment API. It provides various capabilities for payment operations, such as processing payments and refunds.", "contact": { "name": "ELESTYLE, INC", "url": "https://elepay.io", "email": "support@elestyle.jp" } }, "servers": [ { "url": "https://api.elepay.io" } ], "security": [ { "bearerAuth": [] }, { "basicAuth": [] } ], "tags": [ { "name": "Customer" } ], "paths": { "/customers": { "post": { "tags": [ "Customer" ], "summary": "Create customer", "description": "Creates a customer.", "operationId": "createCustomer", "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CustomerReq" } } }, "description": "Customer request", "required": true }, "responses": { "201": { "description": "Created", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CustomerDto" } } } } } } } }, "components": { "schemas": { "CustomerReq": { "description": "Customer request", "type": "object", "properties": { "name": { "description": "Name", "type": "string", "maxLength": 255 }, "description": { "description": "Description of the customer", "type": "string", "maxLength": 255 }, "email": { "description": "Email address", "type": "string", "maxLength": 255 }, "phone": { "description": "Phone number", "type": "string", "maxLength": 255 }, "remark": { "description": "Remarks", "type": "string" }, "metadata": { "description": "Metadata", "type": "object", "maxProperties": 20, "propertyNames": { "type": "string", "maxLength": 20 }, "additionalProperties": { "type": "string" } } } }, "CustomerDto": { "description": "Customer object", "properties": { "id": { "description": "Customer ID", "type": "string", "maxLength": 32 }, "object": { "description": "Object type", "type": "string", "default": "customer" }, "liveMode": { "description": "Whether this is live mode\n- false Test mode\n- true Live mode\n", "type": "boolean" }, "defaultSource": { "description": "Default customer source ID", "type": "string", "maxLength": 32 }, "name": { "description": "Name", "type": "string", "maxLength": 255 }, "description": { "description": "Description of the customer", "type": "string", "maxLength": 255 }, "email": { "description": "Email address", "type": "string", "maxLength": 255 }, "phone": { "description": "Phone number", "type": "string", "maxLength": 255 }, "remark": { "description": "Remarks", "type": "string" }, "operator": { "description": "Operator", "type": "string", "maxLength": 255 }, "status": { "$ref": "#/components/schemas/CustomerStatusType" }, "metadata": { "description": "Metadata", "type": "object", "maxProperties": 20, "propertyNames": { "type": "string", "maxLength": 20 }, "additionalProperties": { "type": "string" } }, "updateTime": { "description": "update time", "type": "integer", "format": "int64" } } }, "CustomerStatusType": { "description": "Status\n", "type": "string", "enum": [ "active", "deleted" ] } }, "securitySchemes": { "bearerAuth": { "type": "http", "scheme": "bearer", "description": "API authentication is performed via Bearer auth using the secret key as the bearer token.\nThe secret key is a critical key that allows all API operations, so handle it with care.\n" }, "basicAuth": { "type": "http", "scheme": "basic", "description": "API authentication is performed via Basic auth using the secret key as the username and omitting the password.\nThe secret key is a critical key that allows all API operations, so handle it with care.\n" } } } } ``` # Create source (https://elepay-docs.elestyle.workers.dev/openapi/customer/createSource) Creates a customer source. **Page URL**: https://elepay-docs.elestyle.workers.dev/openapi/customer/createSource **Endpoint**: POST /customers/{customerId}/sources ```json { "openapi": "3.1.0", "info": { "version": "1.3.0", "title": "elepay API Reference", "description": "The elepay API is a REST-based payment API. It provides various capabilities for payment operations, such as processing payments and refunds.", "contact": { "name": "ELESTYLE, INC", "url": "https://elepay.io", "email": "support@elestyle.jp" } }, "servers": [ { "url": "https://api.elepay.io" } ], "security": [ { "bearerAuth": [] }, { "basicAuth": [] } ], "tags": [ { "name": "Customer" } ], "paths": { "/customers/{customerId}/sources": { "post": { "tags": [ "Customer" ], "summary": "Create source", "description": "Creates a customer source.", "operationId": "createSource", "parameters": [ { "name": "customerId", "description": "Customer ID", "in": "path", "required": true, "schema": { "type": "string" } } ], "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/SourceReq" } } }, "description": "Customer source request", "required": true }, "responses": { "201": { "description": "OK", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/SourceDto" } } } } } } } }, "components": { "schemas": { "SourceReq": { "description": "Customer source request", "type": "object", "required": [ "paymentMethod", "resource" ], "properties": { "paymentMethod": { "$ref": "#/components/schemas/PaymentMethodType" }, "resource": { "$ref": "#/components/schemas/ResourceType" }, "description": { "description": "Description of the customer source", "type": "string", "maxLength": 255 }, "extra": { "description": "Used when there is additional payment-related information. For details, refer to 'Developer Guide -> Source Extra Information Settings'.", "type": "object", "maxProperties": 20, "propertyNames": { "type": "string", "maxLength": 20 }, "additionalProperties": { "type": "string" } }, "metadata": { "description": "Metadata", "type": "object", "maxProperties": 20, "propertyNames": { "type": "string", "maxLength": 20 }, "additionalProperties": { "type": "string" } } } }, "SourceDto": { "description": "Customer source object", "properties": { "id": { "description": "Source ID", "type": "string", "maxLength": 32 }, "object": { "description": "Object type", "type": "string", "default": "source" }, "liveMode": { "description": "Whether this is live mode\n- false Test mode\n- true Live mode\n", "type": "boolean" }, "paymentMethod": { "$ref": "#/components/schemas/PaymentMethodType" }, "resource": { "$ref": "#/components/schemas/ResourceType" }, "description": { "description": "Description of the customer source", "type": "string", "maxLength": 255 }, "extra": { "description": "Customer source extra data", "type": "object", "maxProperties": 20, "propertyNames": { "type": "string", "maxLength": 20 }, "additionalProperties": { "type": "string" } }, "info": { "description": "Customer source information", "type": "object", "additionalProperties": { "type": "object" } }, "cardInfo": { "$ref": "#/components/schemas/CardInfo" }, "metadata": { "description": "Metadata", "type": "object", "maxProperties": 20, "propertyNames": { "type": "string", "maxLength": 20 }, "additionalProperties": { "type": "string" } }, "credential": { "description": "Client SDK credentials", "type": "string" }, "status": { "$ref": "#/components/schemas/SourceStatusType" } } }, "PaymentMethodType": { "description": "Payment method\n- auto Auto detection (available for CPM payments only)\n- alipay Alipay\n- alipayhk AlipayHK\n- alipayplus Alipay+\n- amazonpay Amazon Pay\n- applepay Apple Pay\n- applepay_cn Apple Pay (China)\n- atokara Atokara\n- atone atone (pay next month at convenience stores)\n- aupay au Pay\n- clicktopay Click To Pay\n- banktransfer Bank transfer\n- creditcard Credit card\n- dana DANA\n- docomopay d Payment\n- ezlink EZ-Link\n- felica E-money\n- felica_id iD\n- felica_quickpay QUICPay\n- felica_transport_ic Transit IC card\n- gcash GCash\n- ginkopay Bank Pay\n- googlepay Google Pay\n- jcoinpay J-Coin Pay\n- jkopay JKOPAY\n- kakaopay Kakao Pay\n- konbini Convenience store payment\n- linepay LINE Pay\n- merpay Merpay\n- origamipay Origami Pay\n- paidy Paidy (pay next month)\n- paypal PayPal\n- paypay PayPay\n- pxpayplus AllPay\n- rakutenpay Rakuten Pay\n- smartcode Smart Code\n- tng Touch 'n Go eWallet\n- truemoney TrueMoney\n- unionpay UnionPay QuickPass\n- wechatpay Wechat Pay\n- aeonpay AEON Pay\n- rabbitlinepay Rabbit LINE Pay\n- bpi BPI\n- boost Boost\n- hellomoney HelloMoney by AUB\n- tosspay Toss Pay\n- naverpay Naver Pay\n- wellwa WellWa Points\n- grabpay Grab Pay\n- momopay Momo Pay\n- promptpay Prompt Pay\n- wovenpay Woven City Pay\n- ezopay EZO Pay\n", "type": "string", "enum": [ "alipay", "alipayhk", "alipayplus", "amazonpay", "applepay", "applepay_cn", "atokara", "atone", "aupay", "clicktopay", "banktransfer", "creditcard", "dana", "docomopay", "ezlink", "felica", "felica_id", "felica_quickpay", "felica_transport_ic", "gcash", "ginkopay", "googlepay", "jcoinpay", "jkopay", "kakaopay", "konbini", "linepay", "merpay", "origamipay", "paidy", "paypal", "paypay", "pxpayplus", "rakutenpay", "smartcode", "tng", "truemoney", "unionpay", "wechatpay", "aeonpay", "rabbitlinepay", "bpi", "boost", "hellomoney", "tosspay", "naverpay", "wellwa", "grabpay", "momopay", "promptpay", "wovenpay", "ezopay", "auto" ] }, "ResourceType": { "description": "Payment resource\n- web Web browser\n- ios iOS native app\n- android Android native app\n- liff LINE LIFF app\n- mini WeChat Mini Program\n- cpm CPM payment (customer-presented QR code)\n- mpm MPM payment (merchant-presented QR code)\n- reader Card reader payment (reader device required)\n- posapp POS app payment (POS app integration required)\n", "type": "string", "enum": [ "web", "ios", "android", "liff", "mini", "cpm", "mpm", "reader", "posapp" ] }, "CardInfo": { "type": "object", "description": "Card and wallet information", "properties": { "brand": { "$ref": "#/components/schemas/CardBrandType" }, "last4": { "description": "Last 4 digits of the card number", "type": "string" }, "expMonth": { "description": "Expiration month", "type": "integer" }, "expYear": { "description": "Expiration year", "type": "integer" }, "name": { "description": "Cardholder name", "type": "string" }, "issuerCode": { "description": "Card issuer code (GMO payment only)\nComplies with GMO-PG \"destination card company code\"\n", "type": "string" }, "issuerName": { "description": "Card issuer name (GMO payment only)\nCompany name corresponding to GMO-PG \"destination card company code\"\n", "type": "string" }, "wallet": { "description": "Wallet information", "type": "string" }, "walletApp": { "description": "Wallet app information (for paymentMethod alipayplus or smartcode, the actual app name used)", "type": "string" }, "repaymentType": { "description": "Repayment type\n- 1 One-time payment\n- revolving Revolving payment\n- bonus_one_time Bonus one-time payment\n- 2 Two-installment payment\n- 3 Three-installment payment\n", "type": "string" }, "approvalCode": { "description": "Authorization code", "type": "string" }, "threeDSecure": { "description": "3D Secure enabled", "type": "boolean" }, "threeDSecureVersion": { "description": "3D Secure version", "type": "string" }, "threeDSecureDetail": { "description": "3D Secure details", "type": "string" }, "businessType": { "description": "Business type", "type": "string" }, "konbiniScanTime": { "description": "Last scan time by the convenience store", "type": "integer", "format": "int64" }, "konbiniType": { "description": "Convenience store type used for the actual payment\n- unknown\n- seven_eleven\n- lawson\n- familymart\n- ministop\n- seicomart\n", "type": "string" }, "receivedAmount": { "description": "Actual amount received from the convenience store or bank", "type": "integer" }, "receivedTime": { "description": "Actual time received by the convenience store or bank; this value may contain only the date (midnight).", "type": "integer", "format": "int64" }, "bankUserCode": { "description": "Bank transfer user code", "type": "string" }, "bankUserName": { "description": "Bank transfer user name", "type": "string" }, "bankName": { "description": "Receiving bank name", "type": "string" }, "bankBranchName": { "description": "Receiving bank branch name", "type": "string" }, "bankAccountNo": { "description": "Receiving bank account number", "type": "string" }, "billingNo": { "description": "Billing number (for payment station)", "type": "string" } } }, "SourceStatusType": { "description": "Customer source status\n- pending Not approved\n- active Approved\n- failed Approval failed\n- inactive Approved, but currently unavailable\n- deleted Deleted or expired\n", "type": "string", "enum": [ "pending", "active", "failed", "inactive", "deleted" ] }, "CardBrandType": { "description": "- unknown\n- visa\n- mastercard\n- amex\n- jcb\n- diners\n- unionpay\n- discover\n- felica\n- seven_eleven\n- lawson\n- familymart\n- ministop\n- seicomart\n", "type": "string" } }, "securitySchemes": { "bearerAuth": { "type": "http", "scheme": "bearer", "description": "API authentication is performed via Bearer auth using the secret key as the bearer token.\nThe secret key is a critical key that allows all API operations, so handle it with care.\n" }, "basicAuth": { "type": "http", "scheme": "basic", "description": "API authentication is performed via Basic auth using the secret key as the username and omitting the password.\nThe secret key is a critical key that allows all API operations, so handle it with care.\n" } } } } ``` # Delete customer (https://elepay-docs.elestyle.workers.dev/openapi/customer/deleteCustomer) Deletes a customer. **Page URL**: https://elepay-docs.elestyle.workers.dev/openapi/customer/deleteCustomer **Endpoint**: DELETE /customers/{customerId} ```json { "openapi": "3.1.0", "info": { "version": "1.3.0", "title": "elepay API Reference", "description": "The elepay API is a REST-based payment API. It provides various capabilities for payment operations, such as processing payments and refunds.", "contact": { "name": "ELESTYLE, INC", "url": "https://elepay.io", "email": "support@elestyle.jp" } }, "servers": [ { "url": "https://api.elepay.io" } ], "security": [ { "bearerAuth": [] }, { "basicAuth": [] } ], "tags": [ { "name": "Customer" } ], "paths": { "/customers/{customerId}": { "delete": { "tags": [ "Customer" ], "summary": "Delete customer", "description": "Deletes a customer.", "operationId": "deleteCustomer", "parameters": [ { "name": "customerId", "description": "Customer ID", "in": "path", "required": true, "schema": { "type": "string" } } ], "responses": { "204": { "description": "Deleted" } } } } }, "components": { "securitySchemes": { "bearerAuth": { "type": "http", "scheme": "bearer", "description": "API authentication is performed via Bearer auth using the secret key as the bearer token.\nThe secret key is a critical key that allows all API operations, so handle it with care.\n" }, "basicAuth": { "type": "http", "scheme": "basic", "description": "API authentication is performed via Basic auth using the secret key as the username and omitting the password.\nThe secret key is a critical key that allows all API operations, so handle it with care.\n" } } } } ``` # Delete source (https://elepay-docs.elestyle.workers.dev/openapi/customer/deleteSource) Deletes a customer source. **Page URL**: https://elepay-docs.elestyle.workers.dev/openapi/customer/deleteSource **Endpoint**: DELETE /customers/{customerId}/sources/{sourceId} ```json { "openapi": "3.1.0", "info": { "version": "1.3.0", "title": "elepay API Reference", "description": "The elepay API is a REST-based payment API. It provides various capabilities for payment operations, such as processing payments and refunds.", "contact": { "name": "ELESTYLE, INC", "url": "https://elepay.io", "email": "support@elestyle.jp" } }, "servers": [ { "url": "https://api.elepay.io" } ], "security": [ { "bearerAuth": [] }, { "basicAuth": [] } ], "tags": [ { "name": "Customer" } ], "paths": { "/customers/{customerId}/sources/{sourceId}": { "delete": { "tags": [ "Customer" ], "summary": "Delete source", "description": "Deletes a customer source.", "operationId": "deleteSource", "parameters": [ { "name": "customerId", "description": "Customer ID", "in": "path", "required": true, "schema": { "type": "string" } }, { "name": "sourceId", "description": "Source ID", "in": "path", "required": true, "schema": { "type": "string" } } ], "responses": { "204": { "description": "Deleted" } } } } }, "components": { "securitySchemes": { "bearerAuth": { "type": "http", "scheme": "bearer", "description": "API authentication is performed via Bearer auth using the secret key as the bearer token.\nThe secret key is a critical key that allows all API operations, so handle it with care.\n" }, "basicAuth": { "type": "http", "scheme": "basic", "description": "API authentication is performed via Basic auth using the secret key as the username and omitting the password.\nThe secret key is a critical key that allows all API operations, so handle it with care.\n" } } } } ``` # List customers (https://elepay-docs.elestyle.workers.dev/openapi/customer/listCustomers) Retrieves a list of customer information. **Page URL**: https://elepay-docs.elestyle.workers.dev/openapi/customer/listCustomers **Endpoint**: GET /customers ```json { "openapi": "3.1.0", "info": { "version": "1.3.0", "title": "elepay API Reference", "description": "The elepay API is a REST-based payment API. It provides various capabilities for payment operations, such as processing payments and refunds.", "contact": { "name": "ELESTYLE, INC", "url": "https://elepay.io", "email": "support@elestyle.jp" } }, "servers": [ { "url": "https://api.elepay.io" } ], "security": [ { "bearerAuth": [] }, { "basicAuth": [] } ], "tags": [ { "name": "Customer" } ], "paths": { "/customers": { "get": { "tags": [ "Customer" ], "summary": "List customers", "description": "Retrieves a list of customer information.", "operationId": "listCustomers", "parameters": [ { "name": "keyword", "description": "Keyword", "in": "query", "required": false, "schema": { "type": "string" } }, { "name": "limit", "description": "Maximum number of items", "in": "query", "required": false, "schema": { "type": "integer", "maximum": 100, "default": 20 } }, { "name": "offset", "description": "Starting offset", "in": "query", "schema": { "type": "integer", "default": 0 } } ], "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CustomerResponse" } } } } } } } }, "components": { "schemas": { "CustomerResponse": { "description": "Customer list", "type": "object", "properties": { "total": { "description": "Count", "type": "integer" }, "customers": { "description": "Customer details", "type": "array", "items": { "$ref": "#/components/schemas/CustomerDto" } } } }, "CustomerDto": { "description": "Customer object", "properties": { "id": { "description": "Customer ID", "type": "string", "maxLength": 32 }, "object": { "description": "Object type", "type": "string", "default": "customer" }, "liveMode": { "description": "Whether this is live mode\n- false Test mode\n- true Live mode\n", "type": "boolean" }, "defaultSource": { "description": "Default customer source ID", "type": "string", "maxLength": 32 }, "name": { "description": "Name", "type": "string", "maxLength": 255 }, "description": { "description": "Description of the customer", "type": "string", "maxLength": 255 }, "email": { "description": "Email address", "type": "string", "maxLength": 255 }, "phone": { "description": "Phone number", "type": "string", "maxLength": 255 }, "remark": { "description": "Remarks", "type": "string" }, "operator": { "description": "Operator", "type": "string", "maxLength": 255 }, "status": { "$ref": "#/components/schemas/CustomerStatusType" }, "metadata": { "description": "Metadata", "type": "object", "maxProperties": 20, "propertyNames": { "type": "string", "maxLength": 20 }, "additionalProperties": { "type": "string" } }, "updateTime": { "description": "update time", "type": "integer", "format": "int64" } } }, "CustomerStatusType": { "description": "Status\n", "type": "string", "enum": [ "active", "deleted" ] } }, "securitySchemes": { "bearerAuth": { "type": "http", "scheme": "bearer", "description": "API authentication is performed via Bearer auth using the secret key as the bearer token.\nThe secret key is a critical key that allows all API operations, so handle it with care.\n" }, "basicAuth": { "type": "http", "scheme": "basic", "description": "API authentication is performed via Basic auth using the secret key as the username and omitting the password.\nThe secret key is a critical key that allows all API operations, so handle it with care.\n" } } } } ``` # List sources by customer ID (https://elepay-docs.elestyle.workers.dev/openapi/customer/listSources) Retrieves a list of customer source information. **Page URL**: https://elepay-docs.elestyle.workers.dev/openapi/customer/listSources **Endpoint**: GET /customers/{customerId}/sources ```json { "openapi": "3.1.0", "info": { "version": "1.3.0", "title": "elepay API Reference", "description": "The elepay API is a REST-based payment API. It provides various capabilities for payment operations, such as processing payments and refunds.", "contact": { "name": "ELESTYLE, INC", "url": "https://elepay.io", "email": "support@elestyle.jp" } }, "servers": [ { "url": "https://api.elepay.io" } ], "security": [ { "bearerAuth": [] }, { "basicAuth": [] } ], "tags": [ { "name": "Customer" } ], "paths": { "/customers/{customerId}/sources": { "get": { "tags": [ "Customer" ], "summary": "List sources by customer ID", "description": "Retrieves a list of customer source information.", "operationId": "listSources", "parameters": [ { "name": "customerId", "description": "Customer ID", "in": "path", "required": true, "schema": { "type": "string" } }, { "name": "paymentMethod", "description": "Payment method", "in": "query", "required": false, "schema": { "$ref": "#/components/schemas/PaymentMethodType" } } ], "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/SourceResponse" } } } } } } } }, "components": { "schemas": { "PaymentMethodType": { "description": "Payment method\n- auto Auto detection (available for CPM payments only)\n- alipay Alipay\n- alipayhk AlipayHK\n- alipayplus Alipay+\n- amazonpay Amazon Pay\n- applepay Apple Pay\n- applepay_cn Apple Pay (China)\n- atokara Atokara\n- atone atone (pay next month at convenience stores)\n- aupay au Pay\n- clicktopay Click To Pay\n- banktransfer Bank transfer\n- creditcard Credit card\n- dana DANA\n- docomopay d Payment\n- ezlink EZ-Link\n- felica E-money\n- felica_id iD\n- felica_quickpay QUICPay\n- felica_transport_ic Transit IC card\n- gcash GCash\n- ginkopay Bank Pay\n- googlepay Google Pay\n- jcoinpay J-Coin Pay\n- jkopay JKOPAY\n- kakaopay Kakao Pay\n- konbini Convenience store payment\n- linepay LINE Pay\n- merpay Merpay\n- origamipay Origami Pay\n- paidy Paidy (pay next month)\n- paypal PayPal\n- paypay PayPay\n- pxpayplus AllPay\n- rakutenpay Rakuten Pay\n- smartcode Smart Code\n- tng Touch 'n Go eWallet\n- truemoney TrueMoney\n- unionpay UnionPay QuickPass\n- wechatpay Wechat Pay\n- aeonpay AEON Pay\n- rabbitlinepay Rabbit LINE Pay\n- bpi BPI\n- boost Boost\n- hellomoney HelloMoney by AUB\n- tosspay Toss Pay\n- naverpay Naver Pay\n- wellwa WellWa Points\n- grabpay Grab Pay\n- momopay Momo Pay\n- promptpay Prompt Pay\n- wovenpay Woven City Pay\n- ezopay EZO Pay\n", "type": "string", "enum": [ "alipay", "alipayhk", "alipayplus", "amazonpay", "applepay", "applepay_cn", "atokara", "atone", "aupay", "clicktopay", "banktransfer", "creditcard", "dana", "docomopay", "ezlink", "felica", "felica_id", "felica_quickpay", "felica_transport_ic", "gcash", "ginkopay", "googlepay", "jcoinpay", "jkopay", "kakaopay", "konbini", "linepay", "merpay", "origamipay", "paidy", "paypal", "paypay", "pxpayplus", "rakutenpay", "smartcode", "tng", "truemoney", "unionpay", "wechatpay", "aeonpay", "rabbitlinepay", "bpi", "boost", "hellomoney", "tosspay", "naverpay", "wellwa", "grabpay", "momopay", "promptpay", "wovenpay", "ezopay", "auto" ] }, "SourceResponse": { "description": "Customer source list", "type": "object", "properties": { "total": { "description": "Count", "type": "integer" }, "sources": { "description": "Customer source details", "type": "array", "items": { "$ref": "#/components/schemas/SourceDto" } } } }, "SourceDto": { "description": "Customer source object", "properties": { "id": { "description": "Source ID", "type": "string", "maxLength": 32 }, "object": { "description": "Object type", "type": "string", "default": "source" }, "liveMode": { "description": "Whether this is live mode\n- false Test mode\n- true Live mode\n", "type": "boolean" }, "paymentMethod": { "$ref": "#/components/schemas/PaymentMethodType" }, "resource": { "$ref": "#/components/schemas/ResourceType" }, "description": { "description": "Description of the customer source", "type": "string", "maxLength": 255 }, "extra": { "description": "Customer source extra data", "type": "object", "maxProperties": 20, "propertyNames": { "type": "string", "maxLength": 20 }, "additionalProperties": { "type": "string" } }, "info": { "description": "Customer source information", "type": "object", "additionalProperties": { "type": "object" } }, "cardInfo": { "$ref": "#/components/schemas/CardInfo" }, "metadata": { "description": "Metadata", "type": "object", "maxProperties": 20, "propertyNames": { "type": "string", "maxLength": 20 }, "additionalProperties": { "type": "string" } }, "credential": { "description": "Client SDK credentials", "type": "string" }, "status": { "$ref": "#/components/schemas/SourceStatusType" } } }, "ResourceType": { "description": "Payment resource\n- web Web browser\n- ios iOS native app\n- android Android native app\n- liff LINE LIFF app\n- mini WeChat Mini Program\n- cpm CPM payment (customer-presented QR code)\n- mpm MPM payment (merchant-presented QR code)\n- reader Card reader payment (reader device required)\n- posapp POS app payment (POS app integration required)\n", "type": "string", "enum": [ "web", "ios", "android", "liff", "mini", "cpm", "mpm", "reader", "posapp" ] }, "CardInfo": { "type": "object", "description": "Card and wallet information", "properties": { "brand": { "$ref": "#/components/schemas/CardBrandType" }, "last4": { "description": "Last 4 digits of the card number", "type": "string" }, "expMonth": { "description": "Expiration month", "type": "integer" }, "expYear": { "description": "Expiration year", "type": "integer" }, "name": { "description": "Cardholder name", "type": "string" }, "issuerCode": { "description": "Card issuer code (GMO payment only)\nComplies with GMO-PG \"destination card company code\"\n", "type": "string" }, "issuerName": { "description": "Card issuer name (GMO payment only)\nCompany name corresponding to GMO-PG \"destination card company code\"\n", "type": "string" }, "wallet": { "description": "Wallet information", "type": "string" }, "walletApp": { "description": "Wallet app information (for paymentMethod alipayplus or smartcode, the actual app name used)", "type": "string" }, "repaymentType": { "description": "Repayment type\n- 1 One-time payment\n- revolving Revolving payment\n- bonus_one_time Bonus one-time payment\n- 2 Two-installment payment\n- 3 Three-installment payment\n", "type": "string" }, "approvalCode": { "description": "Authorization code", "type": "string" }, "threeDSecure": { "description": "3D Secure enabled", "type": "boolean" }, "threeDSecureVersion": { "description": "3D Secure version", "type": "string" }, "threeDSecureDetail": { "description": "3D Secure details", "type": "string" }, "businessType": { "description": "Business type", "type": "string" }, "konbiniScanTime": { "description": "Last scan time by the convenience store", "type": "integer", "format": "int64" }, "konbiniType": { "description": "Convenience store type used for the actual payment\n- unknown\n- seven_eleven\n- lawson\n- familymart\n- ministop\n- seicomart\n", "type": "string" }, "receivedAmount": { "description": "Actual amount received from the convenience store or bank", "type": "integer" }, "receivedTime": { "description": "Actual time received by the convenience store or bank; this value may contain only the date (midnight).", "type": "integer", "format": "int64" }, "bankUserCode": { "description": "Bank transfer user code", "type": "string" }, "bankUserName": { "description": "Bank transfer user name", "type": "string" }, "bankName": { "description": "Receiving bank name", "type": "string" }, "bankBranchName": { "description": "Receiving bank branch name", "type": "string" }, "bankAccountNo": { "description": "Receiving bank account number", "type": "string" }, "billingNo": { "description": "Billing number (for payment station)", "type": "string" } } }, "SourceStatusType": { "description": "Customer source status\n- pending Not approved\n- active Approved\n- failed Approval failed\n- inactive Approved, but currently unavailable\n- deleted Deleted or expired\n", "type": "string", "enum": [ "pending", "active", "failed", "inactive", "deleted" ] }, "CardBrandType": { "description": "- unknown\n- visa\n- mastercard\n- amex\n- jcb\n- diners\n- unionpay\n- discover\n- felica\n- seven_eleven\n- lawson\n- familymart\n- ministop\n- seicomart\n", "type": "string" } }, "securitySchemes": { "bearerAuth": { "type": "http", "scheme": "bearer", "description": "API authentication is performed via Bearer auth using the secret key as the bearer token.\nThe secret key is a critical key that allows all API operations, so handle it with care.\n" }, "basicAuth": { "type": "http", "scheme": "basic", "description": "API authentication is performed via Basic auth using the secret key as the username and omitting the password.\nThe secret key is a critical key that allows all API operations, so handle it with care.\n" } } } } ``` # Retrieve customer (https://elepay-docs.elestyle.workers.dev/openapi/customer/retrieveCustomer) Retrieves customer information. **Page URL**: https://elepay-docs.elestyle.workers.dev/openapi/customer/retrieveCustomer **Endpoint**: GET /customers/{customerId} ```json { "openapi": "3.1.0", "info": { "version": "1.3.0", "title": "elepay API Reference", "description": "The elepay API is a REST-based payment API. It provides various capabilities for payment operations, such as processing payments and refunds.", "contact": { "name": "ELESTYLE, INC", "url": "https://elepay.io", "email": "support@elestyle.jp" } }, "servers": [ { "url": "https://api.elepay.io" } ], "security": [ { "bearerAuth": [] }, { "basicAuth": [] } ], "tags": [ { "name": "Customer" } ], "paths": { "/customers/{customerId}": { "get": { "tags": [ "Customer" ], "summary": "Retrieve customer", "description": "Retrieves customer information.", "operationId": "retrieveCustomer", "parameters": [ { "name": "customerId", "description": "Customer ID", "in": "path", "required": true, "schema": { "type": "string" } } ], "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CustomerDto" } } } } } } } }, "components": { "schemas": { "CustomerDto": { "description": "Customer object", "properties": { "id": { "description": "Customer ID", "type": "string", "maxLength": 32 }, "object": { "description": "Object type", "type": "string", "default": "customer" }, "liveMode": { "description": "Whether this is live mode\n- false Test mode\n- true Live mode\n", "type": "boolean" }, "defaultSource": { "description": "Default customer source ID", "type": "string", "maxLength": 32 }, "name": { "description": "Name", "type": "string", "maxLength": 255 }, "description": { "description": "Description of the customer", "type": "string", "maxLength": 255 }, "email": { "description": "Email address", "type": "string", "maxLength": 255 }, "phone": { "description": "Phone number", "type": "string", "maxLength": 255 }, "remark": { "description": "Remarks", "type": "string" }, "operator": { "description": "Operator", "type": "string", "maxLength": 255 }, "status": { "$ref": "#/components/schemas/CustomerStatusType" }, "metadata": { "description": "Metadata", "type": "object", "maxProperties": 20, "propertyNames": { "type": "string", "maxLength": 20 }, "additionalProperties": { "type": "string" } }, "updateTime": { "description": "update time", "type": "integer", "format": "int64" } } }, "CustomerStatusType": { "description": "Status\n", "type": "string", "enum": [ "active", "deleted" ] } }, "securitySchemes": { "bearerAuth": { "type": "http", "scheme": "bearer", "description": "API authentication is performed via Bearer auth using the secret key as the bearer token.\nThe secret key is a critical key that allows all API operations, so handle it with care.\n" }, "basicAuth": { "type": "http", "scheme": "basic", "description": "API authentication is performed via Basic auth using the secret key as the username and omitting the password.\nThe secret key is a critical key that allows all API operations, so handle it with care.\n" } } } } ``` # Retrieve source (https://elepay-docs.elestyle.workers.dev/openapi/customer/retrieveSource) Retrieves customer information. **Page URL**: https://elepay-docs.elestyle.workers.dev/openapi/customer/retrieveSource **Endpoint**: GET /customers/{customerId}/sources/{sourceId} ```json { "openapi": "3.1.0", "info": { "version": "1.3.0", "title": "elepay API Reference", "description": "The elepay API is a REST-based payment API. It provides various capabilities for payment operations, such as processing payments and refunds.", "contact": { "name": "ELESTYLE, INC", "url": "https://elepay.io", "email": "support@elestyle.jp" } }, "servers": [ { "url": "https://api.elepay.io" } ], "security": [ { "bearerAuth": [] }, { "basicAuth": [] } ], "tags": [ { "name": "Customer" } ], "paths": { "/customers/{customerId}/sources/{sourceId}": { "get": { "tags": [ "Customer" ], "summary": "Retrieve source", "description": "Retrieves customer information.", "operationId": "retrieveSource", "parameters": [ { "name": "customerId", "description": "Customer ID", "in": "path", "required": true, "schema": { "type": "string" } }, { "name": "sourceId", "description": "Source ID", "in": "path", "required": true, "schema": { "type": "string" } } ], "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/SourceDto" } } } } } } } }, "components": { "schemas": { "SourceDto": { "description": "Customer source object", "properties": { "id": { "description": "Source ID", "type": "string", "maxLength": 32 }, "object": { "description": "Object type", "type": "string", "default": "source" }, "liveMode": { "description": "Whether this is live mode\n- false Test mode\n- true Live mode\n", "type": "boolean" }, "paymentMethod": { "$ref": "#/components/schemas/PaymentMethodType" }, "resource": { "$ref": "#/components/schemas/ResourceType" }, "description": { "description": "Description of the customer source", "type": "string", "maxLength": 255 }, "extra": { "description": "Customer source extra data", "type": "object", "maxProperties": 20, "propertyNames": { "type": "string", "maxLength": 20 }, "additionalProperties": { "type": "string" } }, "info": { "description": "Customer source information", "type": "object", "additionalProperties": { "type": "object" } }, "cardInfo": { "$ref": "#/components/schemas/CardInfo" }, "metadata": { "description": "Metadata", "type": "object", "maxProperties": 20, "propertyNames": { "type": "string", "maxLength": 20 }, "additionalProperties": { "type": "string" } }, "credential": { "description": "Client SDK credentials", "type": "string" }, "status": { "$ref": "#/components/schemas/SourceStatusType" } } }, "PaymentMethodType": { "description": "Payment method\n- auto Auto detection (available for CPM payments only)\n- alipay Alipay\n- alipayhk AlipayHK\n- alipayplus Alipay+\n- amazonpay Amazon Pay\n- applepay Apple Pay\n- applepay_cn Apple Pay (China)\n- atokara Atokara\n- atone atone (pay next month at convenience stores)\n- aupay au Pay\n- clicktopay Click To Pay\n- banktransfer Bank transfer\n- creditcard Credit card\n- dana DANA\n- docomopay d Payment\n- ezlink EZ-Link\n- felica E-money\n- felica_id iD\n- felica_quickpay QUICPay\n- felica_transport_ic Transit IC card\n- gcash GCash\n- ginkopay Bank Pay\n- googlepay Google Pay\n- jcoinpay J-Coin Pay\n- jkopay JKOPAY\n- kakaopay Kakao Pay\n- konbini Convenience store payment\n- linepay LINE Pay\n- merpay Merpay\n- origamipay Origami Pay\n- paidy Paidy (pay next month)\n- paypal PayPal\n- paypay PayPay\n- pxpayplus AllPay\n- rakutenpay Rakuten Pay\n- smartcode Smart Code\n- tng Touch 'n Go eWallet\n- truemoney TrueMoney\n- unionpay UnionPay QuickPass\n- wechatpay Wechat Pay\n- aeonpay AEON Pay\n- rabbitlinepay Rabbit LINE Pay\n- bpi BPI\n- boost Boost\n- hellomoney HelloMoney by AUB\n- tosspay Toss Pay\n- naverpay Naver Pay\n- wellwa WellWa Points\n- grabpay Grab Pay\n- momopay Momo Pay\n- promptpay Prompt Pay\n- wovenpay Woven City Pay\n- ezopay EZO Pay\n", "type": "string", "enum": [ "alipay", "alipayhk", "alipayplus", "amazonpay", "applepay", "applepay_cn", "atokara", "atone", "aupay", "clicktopay", "banktransfer", "creditcard", "dana", "docomopay", "ezlink", "felica", "felica_id", "felica_quickpay", "felica_transport_ic", "gcash", "ginkopay", "googlepay", "jcoinpay", "jkopay", "kakaopay", "konbini", "linepay", "merpay", "origamipay", "paidy", "paypal", "paypay", "pxpayplus", "rakutenpay", "smartcode", "tng", "truemoney", "unionpay", "wechatpay", "aeonpay", "rabbitlinepay", "bpi", "boost", "hellomoney", "tosspay", "naverpay", "wellwa", "grabpay", "momopay", "promptpay", "wovenpay", "ezopay", "auto" ] }, "ResourceType": { "description": "Payment resource\n- web Web browser\n- ios iOS native app\n- android Android native app\n- liff LINE LIFF app\n- mini WeChat Mini Program\n- cpm CPM payment (customer-presented QR code)\n- mpm MPM payment (merchant-presented QR code)\n- reader Card reader payment (reader device required)\n- posapp POS app payment (POS app integration required)\n", "type": "string", "enum": [ "web", "ios", "android", "liff", "mini", "cpm", "mpm", "reader", "posapp" ] }, "CardInfo": { "type": "object", "description": "Card and wallet information", "properties": { "brand": { "$ref": "#/components/schemas/CardBrandType" }, "last4": { "description": "Last 4 digits of the card number", "type": "string" }, "expMonth": { "description": "Expiration month", "type": "integer" }, "expYear": { "description": "Expiration year", "type": "integer" }, "name": { "description": "Cardholder name", "type": "string" }, "issuerCode": { "description": "Card issuer code (GMO payment only)\nComplies with GMO-PG \"destination card company code\"\n", "type": "string" }, "issuerName": { "description": "Card issuer name (GMO payment only)\nCompany name corresponding to GMO-PG \"destination card company code\"\n", "type": "string" }, "wallet": { "description": "Wallet information", "type": "string" }, "walletApp": { "description": "Wallet app information (for paymentMethod alipayplus or smartcode, the actual app name used)", "type": "string" }, "repaymentType": { "description": "Repayment type\n- 1 One-time payment\n- revolving Revolving payment\n- bonus_one_time Bonus one-time payment\n- 2 Two-installment payment\n- 3 Three-installment payment\n", "type": "string" }, "approvalCode": { "description": "Authorization code", "type": "string" }, "threeDSecure": { "description": "3D Secure enabled", "type": "boolean" }, "threeDSecureVersion": { "description": "3D Secure version", "type": "string" }, "threeDSecureDetail": { "description": "3D Secure details", "type": "string" }, "businessType": { "description": "Business type", "type": "string" }, "konbiniScanTime": { "description": "Last scan time by the convenience store", "type": "integer", "format": "int64" }, "konbiniType": { "description": "Convenience store type used for the actual payment\n- unknown\n- seven_eleven\n- lawson\n- familymart\n- ministop\n- seicomart\n", "type": "string" }, "receivedAmount": { "description": "Actual amount received from the convenience store or bank", "type": "integer" }, "receivedTime": { "description": "Actual time received by the convenience store or bank; this value may contain only the date (midnight).", "type": "integer", "format": "int64" }, "bankUserCode": { "description": "Bank transfer user code", "type": "string" }, "bankUserName": { "description": "Bank transfer user name", "type": "string" }, "bankName": { "description": "Receiving bank name", "type": "string" }, "bankBranchName": { "description": "Receiving bank branch name", "type": "string" }, "bankAccountNo": { "description": "Receiving bank account number", "type": "string" }, "billingNo": { "description": "Billing number (for payment station)", "type": "string" } } }, "SourceStatusType": { "description": "Customer source status\n- pending Not approved\n- active Approved\n- failed Approval failed\n- inactive Approved, but currently unavailable\n- deleted Deleted or expired\n", "type": "string", "enum": [ "pending", "active", "failed", "inactive", "deleted" ] }, "CardBrandType": { "description": "- unknown\n- visa\n- mastercard\n- amex\n- jcb\n- diners\n- unionpay\n- discover\n- felica\n- seven_eleven\n- lawson\n- familymart\n- ministop\n- seicomart\n", "type": "string" } }, "securitySchemes": { "bearerAuth": { "type": "http", "scheme": "bearer", "description": "API authentication is performed via Bearer auth using the secret key as the bearer token.\nThe secret key is a critical key that allows all API operations, so handle it with care.\n" }, "basicAuth": { "type": "http", "scheme": "basic", "description": "API authentication is performed via Basic auth using the secret key as the username and omitting the password.\nThe secret key is a critical key that allows all API operations, so handle it with care.\n" } } } } ``` # Retrieve source's status (https://elepay-docs.elestyle.workers.dev/openapi/customer/retrieveSourceStatus) Retrieves detailed information about a customer source's status. **Page URL**: https://elepay-docs.elestyle.workers.dev/openapi/customer/retrieveSourceStatus **Endpoint**: GET /sources/{sourceId}/status ```json { "openapi": "3.1.0", "info": { "version": "1.3.0", "title": "elepay API Reference", "description": "The elepay API is a REST-based payment API. It provides various capabilities for payment operations, such as processing payments and refunds.", "contact": { "name": "ELESTYLE, INC", "url": "https://elepay.io", "email": "support@elestyle.jp" } }, "servers": [ { "url": "https://api.elepay.io" } ], "security": [ { "bearerAuth": [] }, { "basicAuth": [] } ], "tags": [ { "name": "Customer" } ], "paths": { "/sources/{sourceId}/status": { "get": { "tags": [ "Customer" ], "summary": "Retrieve source's status", "description": "Retrieves detailed information about a customer source's status.", "operationId": "retrieveSourceStatus", "parameters": [ { "name": "sourceId", "description": "Source ID", "in": "path", "required": true, "schema": { "type": "string" } } ], "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/SourceStatusDto" } } } } } } } }, "components": { "schemas": { "SourceStatusDto": { "type": "object", "description": "Customer source status object", "properties": { "id": { "description": "Source ID", "type": "string", "maxLength": 32 }, "appId": { "description": "App ID", "type": "string", "maxLength": 32 }, "liveMode": { "description": "Whether this is live mode\n- false Test mode\n- true Live mode\n", "type": "boolean" }, "status": { "$ref": "#/components/schemas/SourceStatusType" } } }, "SourceStatusType": { "description": "Customer source status\n- pending Not approved\n- active Approved\n- failed Approval failed\n- inactive Approved, but currently unavailable\n- deleted Deleted or expired\n", "type": "string", "enum": [ "pending", "active", "failed", "inactive", "deleted" ] } }, "securitySchemes": { "bearerAuth": { "type": "http", "scheme": "bearer", "description": "API authentication is performed via Bearer auth using the secret key as the bearer token.\nThe secret key is a critical key that allows all API operations, so handle it with care.\n" }, "basicAuth": { "type": "http", "scheme": "basic", "description": "API authentication is performed via Basic auth using the secret key as the username and omitting the password.\nThe secret key is a critical key that allows all API operations, so handle it with care.\n" } } } } ``` # Update customer (https://elepay-docs.elestyle.workers.dev/openapi/customer/updateCustomer) Updates a customer. **Page URL**: https://elepay-docs.elestyle.workers.dev/openapi/customer/updateCustomer **Endpoint**: POST /customers/{customerId} ```json { "openapi": "3.1.0", "info": { "version": "1.3.0", "title": "elepay API Reference", "description": "The elepay API is a REST-based payment API. It provides various capabilities for payment operations, such as processing payments and refunds.", "contact": { "name": "ELESTYLE, INC", "url": "https://elepay.io", "email": "support@elestyle.jp" } }, "servers": [ { "url": "https://api.elepay.io" } ], "security": [ { "bearerAuth": [] }, { "basicAuth": [] } ], "tags": [ { "name": "Customer" } ], "paths": { "/customers/{customerId}": { "post": { "tags": [ "Customer" ], "summary": "Update customer", "description": "Updates a customer.", "operationId": "updateCustomer", "parameters": [ { "name": "customerId", "description": "Customer ID", "in": "path", "required": true, "schema": { "type": "string" } } ], "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CustomerUpdateReq" } } }, "description": "Customer request", "required": true }, "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CustomerDto" } } } } } } } }, "components": { "schemas": { "CustomerUpdateReq": { "description": "Update customer request", "type": "object", "properties": { "defaultSource": { "description": "Default customer source ID", "type": "string", "maxLength": 32 }, "name": { "description": "Name", "type": "string", "maxLength": 255 }, "description": { "description": "Description of the customer", "type": "string", "maxLength": 255 }, "email": { "description": "Email address", "type": "string", "maxLength": 255 }, "phone": { "description": "Phone number", "type": "string", "maxLength": 255 }, "remark": { "description": "Remarks", "type": "string" }, "metadata": { "description": "Metadata", "type": "object", "maxProperties": 20, "propertyNames": { "type": "string", "maxLength": 20 }, "additionalProperties": { "type": "string" } } } }, "CustomerDto": { "description": "Customer object", "properties": { "id": { "description": "Customer ID", "type": "string", "maxLength": 32 }, "object": { "description": "Object type", "type": "string", "default": "customer" }, "liveMode": { "description": "Whether this is live mode\n- false Test mode\n- true Live mode\n", "type": "boolean" }, "defaultSource": { "description": "Default customer source ID", "type": "string", "maxLength": 32 }, "name": { "description": "Name", "type": "string", "maxLength": 255 }, "description": { "description": "Description of the customer", "type": "string", "maxLength": 255 }, "email": { "description": "Email address", "type": "string", "maxLength": 255 }, "phone": { "description": "Phone number", "type": "string", "maxLength": 255 }, "remark": { "description": "Remarks", "type": "string" }, "operator": { "description": "Operator", "type": "string", "maxLength": 255 }, "status": { "$ref": "#/components/schemas/CustomerStatusType" }, "metadata": { "description": "Metadata", "type": "object", "maxProperties": 20, "propertyNames": { "type": "string", "maxLength": 20 }, "additionalProperties": { "type": "string" } }, "updateTime": { "description": "update time", "type": "integer", "format": "int64" } } }, "CustomerStatusType": { "description": "Status\n", "type": "string", "enum": [ "active", "deleted" ] } }, "securitySchemes": { "bearerAuth": { "type": "http", "scheme": "bearer", "description": "API authentication is performed via Bearer auth using the secret key as the bearer token.\nThe secret key is a critical key that allows all API operations, so handle it with care.\n" }, "basicAuth": { "type": "http", "scheme": "basic", "description": "API authentication is performed via Basic auth using the secret key as the username and omitting the password.\nThe secret key is a critical key that allows all API operations, so handle it with care.\n" } } } } ``` # List disputes (https://elepay-docs.elestyle.workers.dev/openapi/dispute/listDisputes) Retrieves a list of dispute information. **Page URL**: https://elepay-docs.elestyle.workers.dev/openapi/dispute/listDisputes **Endpoint**: GET /disputes ```json { "openapi": "3.1.0", "info": { "version": "1.3.0", "title": "elepay API Reference", "description": "The elepay API is a REST-based payment API. It provides various capabilities for payment operations, such as processing payments and refunds.", "contact": { "name": "ELESTYLE, INC", "url": "https://elepay.io", "email": "support@elestyle.jp" } }, "servers": [ { "url": "https://api.elepay.io" } ], "security": [ { "bearerAuth": [] }, { "basicAuth": [] } ], "tags": [ { "name": "Dispute" } ], "paths": { "/disputes": { "get": { "tags": [ "Dispute" ], "summary": "List disputes", "description": "Retrieves a list of dispute information.", "operationId": "listDisputes", "parameters": [ { "name": "chargeId", "description": "Charge ID", "in": "query", "required": false, "schema": { "type": "string" } }, { "name": "from", "description": "Start time (epoch millisecond). Retrieves data created on or after the specified time.", "in": "query", "schema": { "type": "integer", "format": "int64" } }, { "name": "to", "description": "End time (epoch millisecond). Retrieves data created on or before the specified time.", "in": "query", "schema": { "type": "integer", "format": "int64" } }, { "name": "dateField", "description": "Specifies which fields are used for the start and end times.\n- resolved_time Dispute resolution time\n- create_time Dispute occurrence time\n", "in": "query", "required": false, "schema": { "$ref": "#/components/schemas/DisputeDateTimeType" } }, { "name": "status", "description": "Dispute status", "in": "query", "required": false, "schema": { "$ref": "#/components/schemas/DisputeStatusType" } }, { "name": "limit", "description": "Maximum number of items", "in": "query", "required": false, "schema": { "type": "integer", "maximum": 100, "default": 20 } }, { "name": "offset", "description": "Starting offset", "in": "query", "schema": { "type": "integer", "default": 0 } }, { "name": "sort", "description": "Sort field\n- resolved_time Dispute resolution time\n- create_time Charge creation time\n", "in": "query", "required": false, "schema": { "$ref": "#/components/schemas/DisputeDateTimeType" } }, { "name": "order", "description": "Sort order\n- desc Descending\n- asc Ascending\n", "in": "query", "required": false, "schema": { "$ref": "#/components/schemas/SortOrderType" } } ], "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/DisputesResponse" } } } } } } } }, "components": { "schemas": { "DisputeDateTimeType": { "description": "Time field", "type": "string", "enum": [ "resolved_time", "create_time" ], "default": "create_time" }, "DisputeStatusType": { "description": "Dispute status\n- new In progress\n- won Claim accepted\n- lost Claim rejected\n", "type": "string", "enum": [ "new", "won", "lost" ] }, "SortOrderType": { "description": "Sort order", "type": "string", "enum": [ "desc", "asc" ], "default": "desc" }, "DisputesResponse": { "description": "Dispute list", "type": "object", "properties": { "total": { "description": "Count", "type": "integer" }, "disputes": { "description": "Dispute details", "type": "array", "items": { "$ref": "#/components/schemas/DisputeDto" } } } }, "DisputeDto": { "description": "Dispute object", "type": "object", "properties": { "id": { "description": "Dispute ID", "type": "string", "maxLength": 32 }, "object": { "description": "Object type", "type": "string", "default": "dispute" }, "chargeId": { "description": "Charge ID", "type": "string", "maxLength": 32 }, "liveMode": { "description": "Whether this is live mode\n- false Test mode\n- true Live mode\n", "type": "boolean" }, "amount": { "description": "Dispute amount", "type": "integer" }, "currency": { "description": "Currency code (ISO 4217)", "type": "string", "minLength": 3, "maxLength": 3 }, "metadata": { "description": "Metadata", "type": "object", "maxProperties": 20, "propertyNames": { "type": "string", "maxLength": 20 }, "additionalProperties": { "type": "string" } }, "reason": { "description": "Dispute reason", "type": "string", "maxLength": 255 }, "status": { "$ref": "#/components/schemas/DisputeStatusType" }, "resolvedTime": { "description": "Resolution time (epoch millisecond)", "type": "integer", "format": "int64" }, "createTime": { "description": "Occurrence time (epoch millisecond)", "type": "integer", "format": "int64" } } } }, "securitySchemes": { "bearerAuth": { "type": "http", "scheme": "bearer", "description": "API authentication is performed via Bearer auth using the secret key as the bearer token.\nThe secret key is a critical key that allows all API operations, so handle it with care.\n" }, "basicAuth": { "type": "http", "scheme": "basic", "description": "API authentication is performed via Basic auth using the secret key as the username and omitting the password.\nThe secret key is a critical key that allows all API operations, so handle it with care.\n" } } } } ``` # Retrieve dispute (https://elepay-docs.elestyle.workers.dev/openapi/dispute/retrieveDispute) Retrieves detailed information about a dispute. **Page URL**: https://elepay-docs.elestyle.workers.dev/openapi/dispute/retrieveDispute **Endpoint**: GET /disputes/{id} ```json { "openapi": "3.1.0", "info": { "version": "1.3.0", "title": "elepay API Reference", "description": "The elepay API is a REST-based payment API. It provides various capabilities for payment operations, such as processing payments and refunds.", "contact": { "name": "ELESTYLE, INC", "url": "https://elepay.io", "email": "support@elestyle.jp" } }, "servers": [ { "url": "https://api.elepay.io" } ], "security": [ { "bearerAuth": [] }, { "basicAuth": [] } ], "tags": [ { "name": "Dispute" } ], "paths": { "/disputes/{id}": { "get": { "tags": [ "Dispute" ], "summary": "Retrieve dispute", "description": "Retrieves detailed information about a dispute.", "operationId": "retrieveDispute", "parameters": [ { "name": "id", "description": "Dispute ID", "in": "path", "required": true, "schema": { "type": "string" } } ], "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/DisputeDto" } } } } } } } }, "components": { "schemas": { "DisputeDto": { "description": "Dispute object", "type": "object", "properties": { "id": { "description": "Dispute ID", "type": "string", "maxLength": 32 }, "object": { "description": "Object type", "type": "string", "default": "dispute" }, "chargeId": { "description": "Charge ID", "type": "string", "maxLength": 32 }, "liveMode": { "description": "Whether this is live mode\n- false Test mode\n- true Live mode\n", "type": "boolean" }, "amount": { "description": "Dispute amount", "type": "integer" }, "currency": { "description": "Currency code (ISO 4217)", "type": "string", "minLength": 3, "maxLength": 3 }, "metadata": { "description": "Metadata", "type": "object", "maxProperties": 20, "propertyNames": { "type": "string", "maxLength": 20 }, "additionalProperties": { "type": "string" } }, "reason": { "description": "Dispute reason", "type": "string", "maxLength": 255 }, "status": { "$ref": "#/components/schemas/DisputeStatusType" }, "resolvedTime": { "description": "Resolution time (epoch millisecond)", "type": "integer", "format": "int64" }, "createTime": { "description": "Occurrence time (epoch millisecond)", "type": "integer", "format": "int64" } } }, "DisputeStatusType": { "description": "Dispute status\n- new In progress\n- won Claim accepted\n- lost Claim rejected\n", "type": "string", "enum": [ "new", "won", "lost" ] } }, "securitySchemes": { "bearerAuth": { "type": "http", "scheme": "bearer", "description": "API authentication is performed via Bearer auth using the secret key as the bearer token.\nThe secret key is a critical key that allows all API operations, so handle it with care.\n" }, "basicAuth": { "type": "http", "scheme": "basic", "description": "API authentication is performed via Basic auth using the secret key as the username and omitting the password.\nThe secret key is a critical key that allows all API operations, so handle it with care.\n" } } } } ``` # Cancel invoice (https://elepay-docs.elestyle.workers.dev/openapi/invoice/cancelInvoice) Cancels an invoice. **Page URL**: https://elepay-docs.elestyle.workers.dev/openapi/invoice/cancelInvoice **Endpoint**: POST /invoices/{invoiceId}/cancel ```json { "openapi": "3.1.0", "info": { "version": "1.3.0", "title": "elepay API Reference", "description": "The elepay API is a REST-based payment API. It provides various capabilities for payment operations, such as processing payments and refunds.", "contact": { "name": "ELESTYLE, INC", "url": "https://elepay.io", "email": "support@elestyle.jp" } }, "servers": [ { "url": "https://api.elepay.io" } ], "security": [ { "bearerAuth": [] }, { "basicAuth": [] } ], "tags": [ { "name": "Invoice" } ], "paths": { "/invoices/{invoiceId}/cancel": { "post": { "tags": [ "Invoice" ], "summary": "Cancel invoice", "description": "Cancels an invoice.", "operationId": "cancelInvoice", "parameters": [ { "name": "invoiceId", "description": "Invoice ID", "in": "path", "required": true, "schema": { "type": "string" } } ], "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/InvoiceDto" } } } } } } } }, "components": { "schemas": { "InvoiceDto": { "description": "Invoice object", "properties": { "id": { "description": "Invoice ID", "type": "string", "maxLength": 32 }, "object": { "description": "Object type", "type": "string", "default": "invoice" }, "liveMode": { "description": "Whether this is live mode\n- false Test mode\n- true Live mode\n", "type": "boolean" }, "customer": { "$ref": "#/components/schemas/CustomerDto" }, "invoiceNo": { "description": "Invoice Number", "type": "string", "maxLength": 255 }, "name": { "description": "Invoice subject", "type": "string", "maxLength": 255 }, "memo": { "description": "Invoice memo", "type": "string", "maxLength": 255 }, "amount": { "description": "Payment amount", "type": "integer" }, "currency": { "description": "Currency code (ISO 4217)", "type": "string", "minLength": 3, "maxLength": 3, "default": "JPY" }, "status": { "$ref": "#/components/schemas/InvoiceStatusType" }, "operator": { "description": "Operator", "type": "string", "maxLength": 255 }, "invoiceTime": { "description": "Billing date (epoch millisecond)", "type": "integer", "format": "int64" }, "sendTime": { "description": "Send time (epoch millisecond)", "type": "integer", "format": "int64" }, "paidTime": { "description": "Payment time (epoch millisecond)", "type": "integer", "format": "int64" }, "expiryTime": { "description": "Payment request expiry time (epoch millisecond)", "type": "integer", "format": "int64" }, "createTime": { "description": "Creation time (epoch millisecond)", "type": "integer", "format": "int64" }, "fields": { "description": "Invoice field list", "type": "array", "items": { "type": "string" } }, "items": { "description": "Invoice item list", "type": "array", "items": { "$ref": "#/components/schemas/InvoiceItem" } }, "remark": { "description": "Additional description", "type": "string" }, "metadata": { "description": "Metadata", "type": "object", "maxProperties": 20, "propertyNames": { "type": "string", "maxLength": 20 }, "additionalProperties": { "type": "string" } }, "enableAutoCharge": { "description": "Whether to enable automatic payment.\ntrue Enabled, false Disabled\n", "type": "boolean" } } }, "CustomerDto": { "description": "Customer object", "properties": { "id": { "description": "Customer ID", "type": "string", "maxLength": 32 }, "object": { "description": "Object type", "type": "string", "default": "customer" }, "liveMode": { "description": "Whether this is live mode\n- false Test mode\n- true Live mode\n", "type": "boolean" }, "defaultSource": { "description": "Default customer source ID", "type": "string", "maxLength": 32 }, "name": { "description": "Name", "type": "string", "maxLength": 255 }, "description": { "description": "Description of the customer", "type": "string", "maxLength": 255 }, "email": { "description": "Email address", "type": "string", "maxLength": 255 }, "phone": { "description": "Phone number", "type": "string", "maxLength": 255 }, "remark": { "description": "Remarks", "type": "string" }, "operator": { "description": "Operator", "type": "string", "maxLength": 255 }, "status": { "$ref": "#/components/schemas/CustomerStatusType" }, "metadata": { "description": "Metadata", "type": "object", "maxProperties": 20, "propertyNames": { "type": "string", "maxLength": 20 }, "additionalProperties": { "type": "string" } }, "updateTime": { "description": "update time", "type": "integer", "format": "int64" } } }, "InvoiceStatusType": { "description": "Invoice status\n- draft Draft\n- submit Finalized\n- sent Sent\n- paid Paid\n- expired Expired\n- canceled Canceled\n", "type": "string", "enum": [ "draft", "submit", "sent", "paid", "expired", "canceled" ] }, "InvoiceItem": { "description": "Invoice item object", "properties": { "id": { "description": "Invoice Item ID", "type": "string", "maxLength": 32 }, "object": { "description": "Object type", "type": "string", "default": "invoiceItem" }, "name": { "description": "Product name", "type": "string", "maxLength": 255 }, "unitPrice": { "description": "Unit price", "type": "integer" }, "currency": { "description": "Currency code (ISO 4217)", "type": "string", "minLength": 3, "maxLength": 3, "default": "JPY" }, "quantity": { "description": "Count", "type": "integer" }, "unit": { "description": "Unit", "type": "string" }, "taxRateType": { "$ref": "#/components/schemas/TaxRateType" }, "transactionTime": { "description": "Transaction time (epoch millisecond)", "type": "integer", "format": "int64" } } }, "CustomerStatusType": { "description": "Status\n", "type": "string", "enum": [ "active", "deleted" ] }, "TaxRateType": { "description": "Tax rate type\n- standard Standard rate (10%)\n- reduced Reduced rate (8%)\n- free Tax-free (0%)\n", "type": "string", "enum": [ "standard", "reduced", "free" ] } }, "securitySchemes": { "bearerAuth": { "type": "http", "scheme": "bearer", "description": "API authentication is performed via Bearer auth using the secret key as the bearer token.\nThe secret key is a critical key that allows all API operations, so handle it with care.\n" }, "basicAuth": { "type": "http", "scheme": "basic", "description": "API authentication is performed via Basic auth using the secret key as the username and omitting the password.\nThe secret key is a critical key that allows all API operations, so handle it with care.\n" } } } } ``` # Create invoice (https://elepay-docs.elestyle.workers.dev/openapi/invoice/createInvoice) Creates an invoice. **Page URL**: https://elepay-docs.elestyle.workers.dev/openapi/invoice/createInvoice **Endpoint**: POST /invoices ```json { "openapi": "3.1.0", "info": { "version": "1.3.0", "title": "elepay API Reference", "description": "The elepay API is a REST-based payment API. It provides various capabilities for payment operations, such as processing payments and refunds.", "contact": { "name": "ELESTYLE, INC", "url": "https://elepay.io", "email": "support@elestyle.jp" } }, "servers": [ { "url": "https://api.elepay.io" } ], "security": [ { "bearerAuth": [] }, { "basicAuth": [] } ], "tags": [ { "name": "Invoice" } ], "paths": { "/invoices": { "post": { "tags": [ "Invoice" ], "summary": "Create invoice", "description": "Creates an invoice.", "operationId": "createInvoice", "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/InvoiceReq" } } }, "description": "Invoice request", "required": true }, "responses": { "201": { "description": "Created", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/InvoiceDto" } } } } } } } }, "components": { "schemas": { "InvoiceReq": { "description": "Invoice request", "type": "object", "required": [ "customerId", "amount" ], "properties": { "name": { "description": "Invoice subject", "type": "string" }, "memo": { "description": "Invoice memo", "type": "string" }, "customerId": { "description": "Customer ID", "type": "string", "maxLength": 32 }, "amount": { "description": "Payment amount", "type": "integer" }, "currency": { "description": "Currency code (ISO 4217)", "type": "string", "minLength": 3, "maxLength": 3, "default": "JPY" }, "taxType": { "$ref": "#/components/schemas/TaxType" }, "taxCalcType": { "$ref": "#/components/schemas/TaxCalcType" }, "invoiceTime": { "description": "Billing date (epoch millisecond)", "type": "integer", "format": "int64" }, "expiryTime": { "description": "Payment request expiry time (epoch millisecond)", "type": "integer", "format": "int64" }, "fields": { "description": "Invoice field list", "type": "array", "items": { "type": "string" } }, "items": { "type": "array", "items": { "$ref": "#/components/schemas/InvoiceItem" } }, "remark": { "description": "Additional description", "type": "string" }, "metadata": { "description": "Metadata", "type": "object", "maxProperties": 20, "propertyNames": { "type": "string", "maxLength": 20 }, "additionalProperties": { "type": "string" } }, "enableAutoCharge": { "description": "Whether to enable automatic payment.\ntrue Enabled, false Disabled\n", "type": "boolean", "default": false }, "autoChargeTime": { "description": "Automatic payment time (epoch millisecond)", "type": "integer", "format": "int64" } } }, "InvoiceDto": { "description": "Invoice object", "properties": { "id": { "description": "Invoice ID", "type": "string", "maxLength": 32 }, "object": { "description": "Object type", "type": "string", "default": "invoice" }, "liveMode": { "description": "Whether this is live mode\n- false Test mode\n- true Live mode\n", "type": "boolean" }, "customer": { "$ref": "#/components/schemas/CustomerDto" }, "invoiceNo": { "description": "Invoice Number", "type": "string", "maxLength": 255 }, "name": { "description": "Invoice subject", "type": "string", "maxLength": 255 }, "memo": { "description": "Invoice memo", "type": "string", "maxLength": 255 }, "amount": { "description": "Payment amount", "type": "integer" }, "currency": { "description": "Currency code (ISO 4217)", "type": "string", "minLength": 3, "maxLength": 3, "default": "JPY" }, "status": { "$ref": "#/components/schemas/InvoiceStatusType" }, "operator": { "description": "Operator", "type": "string", "maxLength": 255 }, "invoiceTime": { "description": "Billing date (epoch millisecond)", "type": "integer", "format": "int64" }, "sendTime": { "description": "Send time (epoch millisecond)", "type": "integer", "format": "int64" }, "paidTime": { "description": "Payment time (epoch millisecond)", "type": "integer", "format": "int64" }, "expiryTime": { "description": "Payment request expiry time (epoch millisecond)", "type": "integer", "format": "int64" }, "createTime": { "description": "Creation time (epoch millisecond)", "type": "integer", "format": "int64" }, "fields": { "description": "Invoice field list", "type": "array", "items": { "type": "string" } }, "items": { "description": "Invoice item list", "type": "array", "items": { "$ref": "#/components/schemas/InvoiceItem" } }, "remark": { "description": "Additional description", "type": "string" }, "metadata": { "description": "Metadata", "type": "object", "maxProperties": 20, "propertyNames": { "type": "string", "maxLength": 20 }, "additionalProperties": { "type": "string" } }, "enableAutoCharge": { "description": "Whether to enable automatic payment.\ntrue Enabled, false Disabled\n", "type": "boolean" } } }, "TaxType": { "description": "Tax type\n- included Tax included\n- excluded Tax excluded\n", "type": "string", "enum": [ "included", "excluded" ] }, "TaxCalcType": { "description": "Tax calculation method\n- floor Round down\n- ceil Round up\n- round5 Round half up\n", "type": "string", "enum": [ "floor", "ceil", "round5" ] }, "InvoiceItem": { "description": "Invoice item object", "properties": { "id": { "description": "Invoice Item ID", "type": "string", "maxLength": 32 }, "object": { "description": "Object type", "type": "string", "default": "invoiceItem" }, "name": { "description": "Product name", "type": "string", "maxLength": 255 }, "unitPrice": { "description": "Unit price", "type": "integer" }, "currency": { "description": "Currency code (ISO 4217)", "type": "string", "minLength": 3, "maxLength": 3, "default": "JPY" }, "quantity": { "description": "Count", "type": "integer" }, "unit": { "description": "Unit", "type": "string" }, "taxRateType": { "$ref": "#/components/schemas/TaxRateType" }, "transactionTime": { "description": "Transaction time (epoch millisecond)", "type": "integer", "format": "int64" } } }, "CustomerDto": { "description": "Customer object", "properties": { "id": { "description": "Customer ID", "type": "string", "maxLength": 32 }, "object": { "description": "Object type", "type": "string", "default": "customer" }, "liveMode": { "description": "Whether this is live mode\n- false Test mode\n- true Live mode\n", "type": "boolean" }, "defaultSource": { "description": "Default customer source ID", "type": "string", "maxLength": 32 }, "name": { "description": "Name", "type": "string", "maxLength": 255 }, "description": { "description": "Description of the customer", "type": "string", "maxLength": 255 }, "email": { "description": "Email address", "type": "string", "maxLength": 255 }, "phone": { "description": "Phone number", "type": "string", "maxLength": 255 }, "remark": { "description": "Remarks", "type": "string" }, "operator": { "description": "Operator", "type": "string", "maxLength": 255 }, "status": { "$ref": "#/components/schemas/CustomerStatusType" }, "metadata": { "description": "Metadata", "type": "object", "maxProperties": 20, "propertyNames": { "type": "string", "maxLength": 20 }, "additionalProperties": { "type": "string" } }, "updateTime": { "description": "update time", "type": "integer", "format": "int64" } } }, "InvoiceStatusType": { "description": "Invoice status\n- draft Draft\n- submit Finalized\n- sent Sent\n- paid Paid\n- expired Expired\n- canceled Canceled\n", "type": "string", "enum": [ "draft", "submit", "sent", "paid", "expired", "canceled" ] }, "TaxRateType": { "description": "Tax rate type\n- standard Standard rate (10%)\n- reduced Reduced rate (8%)\n- free Tax-free (0%)\n", "type": "string", "enum": [ "standard", "reduced", "free" ] }, "CustomerStatusType": { "description": "Status\n", "type": "string", "enum": [ "active", "deleted" ] } }, "securitySchemes": { "bearerAuth": { "type": "http", "scheme": "bearer", "description": "API authentication is performed via Bearer auth using the secret key as the bearer token.\nThe secret key is a critical key that allows all API operations, so handle it with care.\n" }, "basicAuth": { "type": "http", "scheme": "basic", "description": "API authentication is performed via Basic auth using the secret key as the username and omitting the password.\nThe secret key is a critical key that allows all API operations, so handle it with care.\n" } } } } ``` # List invoices (https://elepay-docs.elestyle.workers.dev/openapi/invoice/listInvoices) Retrieves a list of invoice information. **Page URL**: https://elepay-docs.elestyle.workers.dev/openapi/invoice/listInvoices **Endpoint**: GET /invoices ```json { "openapi": "3.1.0", "info": { "version": "1.3.0", "title": "elepay API Reference", "description": "The elepay API is a REST-based payment API. It provides various capabilities for payment operations, such as processing payments and refunds.", "contact": { "name": "ELESTYLE, INC", "url": "https://elepay.io", "email": "support@elestyle.jp" } }, "servers": [ { "url": "https://api.elepay.io" } ], "security": [ { "bearerAuth": [] }, { "basicAuth": [] } ], "tags": [ { "name": "Invoice" } ], "paths": { "/invoices": { "get": { "tags": [ "Invoice" ], "summary": "List invoices", "description": "Retrieves a list of invoice information.", "operationId": "listInvoices", "parameters": [ { "name": "keyword", "description": "Keyword", "in": "query", "required": false, "schema": { "type": "string" } }, { "name": "from", "description": "Start time (epoch millisecond). Retrieves data created on or after the specified time.", "in": "query", "required": false, "schema": { "type": "integer", "format": "int64" } }, { "name": "to", "description": "End time (epoch millisecond). Retrieves data created on or before the specified time.", "in": "query", "required": false, "schema": { "type": "integer", "format": "int64" } }, { "name": "status", "description": "status", "in": "query", "required": false, "schema": { "type": "array", "items": { "$ref": "#/components/schemas/InvoiceStatusType" } } }, { "name": "limit", "description": "Maximum number of items", "in": "query", "required": false, "schema": { "type": "integer", "maximum": 100, "default": 20 } }, { "name": "offset", "description": "Starting offset", "in": "query", "schema": { "type": "integer", "default": 0 } } ], "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/InvoicesResponse" } } } } } } } }, "components": { "schemas": { "InvoiceStatusType": { "description": "Invoice status\n- draft Draft\n- submit Finalized\n- sent Sent\n- paid Paid\n- expired Expired\n- canceled Canceled\n", "type": "string", "enum": [ "draft", "submit", "sent", "paid", "expired", "canceled" ] }, "InvoicesResponse": { "description": "Invoice list", "type": "object", "properties": { "total": { "description": "Count", "type": "integer" }, "invoices": { "description": "Invoice details", "type": "array", "items": { "$ref": "#/components/schemas/InvoiceDto" } } } }, "InvoiceDto": { "description": "Invoice object", "properties": { "id": { "description": "Invoice ID", "type": "string", "maxLength": 32 }, "object": { "description": "Object type", "type": "string", "default": "invoice" }, "liveMode": { "description": "Whether this is live mode\n- false Test mode\n- true Live mode\n", "type": "boolean" }, "customer": { "$ref": "#/components/schemas/CustomerDto" }, "invoiceNo": { "description": "Invoice Number", "type": "string", "maxLength": 255 }, "name": { "description": "Invoice subject", "type": "string", "maxLength": 255 }, "memo": { "description": "Invoice memo", "type": "string", "maxLength": 255 }, "amount": { "description": "Payment amount", "type": "integer" }, "currency": { "description": "Currency code (ISO 4217)", "type": "string", "minLength": 3, "maxLength": 3, "default": "JPY" }, "status": { "$ref": "#/components/schemas/InvoiceStatusType" }, "operator": { "description": "Operator", "type": "string", "maxLength": 255 }, "invoiceTime": { "description": "Billing date (epoch millisecond)", "type": "integer", "format": "int64" }, "sendTime": { "description": "Send time (epoch millisecond)", "type": "integer", "format": "int64" }, "paidTime": { "description": "Payment time (epoch millisecond)", "type": "integer", "format": "int64" }, "expiryTime": { "description": "Payment request expiry time (epoch millisecond)", "type": "integer", "format": "int64" }, "createTime": { "description": "Creation time (epoch millisecond)", "type": "integer", "format": "int64" }, "fields": { "description": "Invoice field list", "type": "array", "items": { "type": "string" } }, "items": { "description": "Invoice item list", "type": "array", "items": { "$ref": "#/components/schemas/InvoiceItem" } }, "remark": { "description": "Additional description", "type": "string" }, "metadata": { "description": "Metadata", "type": "object", "maxProperties": 20, "propertyNames": { "type": "string", "maxLength": 20 }, "additionalProperties": { "type": "string" } }, "enableAutoCharge": { "description": "Whether to enable automatic payment.\ntrue Enabled, false Disabled\n", "type": "boolean" } } }, "CustomerDto": { "description": "Customer object", "properties": { "id": { "description": "Customer ID", "type": "string", "maxLength": 32 }, "object": { "description": "Object type", "type": "string", "default": "customer" }, "liveMode": { "description": "Whether this is live mode\n- false Test mode\n- true Live mode\n", "type": "boolean" }, "defaultSource": { "description": "Default customer source ID", "type": "string", "maxLength": 32 }, "name": { "description": "Name", "type": "string", "maxLength": 255 }, "description": { "description": "Description of the customer", "type": "string", "maxLength": 255 }, "email": { "description": "Email address", "type": "string", "maxLength": 255 }, "phone": { "description": "Phone number", "type": "string", "maxLength": 255 }, "remark": { "description": "Remarks", "type": "string" }, "operator": { "description": "Operator", "type": "string", "maxLength": 255 }, "status": { "$ref": "#/components/schemas/CustomerStatusType" }, "metadata": { "description": "Metadata", "type": "object", "maxProperties": 20, "propertyNames": { "type": "string", "maxLength": 20 }, "additionalProperties": { "type": "string" } }, "updateTime": { "description": "update time", "type": "integer", "format": "int64" } } }, "InvoiceItem": { "description": "Invoice item object", "properties": { "id": { "description": "Invoice Item ID", "type": "string", "maxLength": 32 }, "object": { "description": "Object type", "type": "string", "default": "invoiceItem" }, "name": { "description": "Product name", "type": "string", "maxLength": 255 }, "unitPrice": { "description": "Unit price", "type": "integer" }, "currency": { "description": "Currency code (ISO 4217)", "type": "string", "minLength": 3, "maxLength": 3, "default": "JPY" }, "quantity": { "description": "Count", "type": "integer" }, "unit": { "description": "Unit", "type": "string" }, "taxRateType": { "$ref": "#/components/schemas/TaxRateType" }, "transactionTime": { "description": "Transaction time (epoch millisecond)", "type": "integer", "format": "int64" } } }, "CustomerStatusType": { "description": "Status\n", "type": "string", "enum": [ "active", "deleted" ] }, "TaxRateType": { "description": "Tax rate type\n- standard Standard rate (10%)\n- reduced Reduced rate (8%)\n- free Tax-free (0%)\n", "type": "string", "enum": [ "standard", "reduced", "free" ] } }, "securitySchemes": { "bearerAuth": { "type": "http", "scheme": "bearer", "description": "API authentication is performed via Bearer auth using the secret key as the bearer token.\nThe secret key is a critical key that allows all API operations, so handle it with care.\n" }, "basicAuth": { "type": "http", "scheme": "basic", "description": "API authentication is performed via Basic auth using the secret key as the username and omitting the password.\nThe secret key is a critical key that allows all API operations, so handle it with care.\n" } } } } ``` # Retrieve invoice (https://elepay-docs.elestyle.workers.dev/openapi/invoice/retrieveInvoice) Retrieves invoice information. **Page URL**: https://elepay-docs.elestyle.workers.dev/openapi/invoice/retrieveInvoice **Endpoint**: GET /invoices/{invoiceId} ```json { "openapi": "3.1.0", "info": { "version": "1.3.0", "title": "elepay API Reference", "description": "The elepay API is a REST-based payment API. It provides various capabilities for payment operations, such as processing payments and refunds.", "contact": { "name": "ELESTYLE, INC", "url": "https://elepay.io", "email": "support@elestyle.jp" } }, "servers": [ { "url": "https://api.elepay.io" } ], "security": [ { "bearerAuth": [] }, { "basicAuth": [] } ], "tags": [ { "name": "Invoice" } ], "paths": { "/invoices/{invoiceId}": { "get": { "tags": [ "Invoice" ], "summary": "Retrieve invoice", "description": "Retrieves invoice information.", "operationId": "retrieveInvoice", "parameters": [ { "name": "invoiceId", "description": "Invoice ID", "in": "path", "required": true, "schema": { "type": "string" } } ], "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/InvoiceDto" } } } } } } } }, "components": { "schemas": { "InvoiceDto": { "description": "Invoice object", "properties": { "id": { "description": "Invoice ID", "type": "string", "maxLength": 32 }, "object": { "description": "Object type", "type": "string", "default": "invoice" }, "liveMode": { "description": "Whether this is live mode\n- false Test mode\n- true Live mode\n", "type": "boolean" }, "customer": { "$ref": "#/components/schemas/CustomerDto" }, "invoiceNo": { "description": "Invoice Number", "type": "string", "maxLength": 255 }, "name": { "description": "Invoice subject", "type": "string", "maxLength": 255 }, "memo": { "description": "Invoice memo", "type": "string", "maxLength": 255 }, "amount": { "description": "Payment amount", "type": "integer" }, "currency": { "description": "Currency code (ISO 4217)", "type": "string", "minLength": 3, "maxLength": 3, "default": "JPY" }, "status": { "$ref": "#/components/schemas/InvoiceStatusType" }, "operator": { "description": "Operator", "type": "string", "maxLength": 255 }, "invoiceTime": { "description": "Billing date (epoch millisecond)", "type": "integer", "format": "int64" }, "sendTime": { "description": "Send time (epoch millisecond)", "type": "integer", "format": "int64" }, "paidTime": { "description": "Payment time (epoch millisecond)", "type": "integer", "format": "int64" }, "expiryTime": { "description": "Payment request expiry time (epoch millisecond)", "type": "integer", "format": "int64" }, "createTime": { "description": "Creation time (epoch millisecond)", "type": "integer", "format": "int64" }, "fields": { "description": "Invoice field list", "type": "array", "items": { "type": "string" } }, "items": { "description": "Invoice item list", "type": "array", "items": { "$ref": "#/components/schemas/InvoiceItem" } }, "remark": { "description": "Additional description", "type": "string" }, "metadata": { "description": "Metadata", "type": "object", "maxProperties": 20, "propertyNames": { "type": "string", "maxLength": 20 }, "additionalProperties": { "type": "string" } }, "enableAutoCharge": { "description": "Whether to enable automatic payment.\ntrue Enabled, false Disabled\n", "type": "boolean" } } }, "CustomerDto": { "description": "Customer object", "properties": { "id": { "description": "Customer ID", "type": "string", "maxLength": 32 }, "object": { "description": "Object type", "type": "string", "default": "customer" }, "liveMode": { "description": "Whether this is live mode\n- false Test mode\n- true Live mode\n", "type": "boolean" }, "defaultSource": { "description": "Default customer source ID", "type": "string", "maxLength": 32 }, "name": { "description": "Name", "type": "string", "maxLength": 255 }, "description": { "description": "Description of the customer", "type": "string", "maxLength": 255 }, "email": { "description": "Email address", "type": "string", "maxLength": 255 }, "phone": { "description": "Phone number", "type": "string", "maxLength": 255 }, "remark": { "description": "Remarks", "type": "string" }, "operator": { "description": "Operator", "type": "string", "maxLength": 255 }, "status": { "$ref": "#/components/schemas/CustomerStatusType" }, "metadata": { "description": "Metadata", "type": "object", "maxProperties": 20, "propertyNames": { "type": "string", "maxLength": 20 }, "additionalProperties": { "type": "string" } }, "updateTime": { "description": "update time", "type": "integer", "format": "int64" } } }, "InvoiceStatusType": { "description": "Invoice status\n- draft Draft\n- submit Finalized\n- sent Sent\n- paid Paid\n- expired Expired\n- canceled Canceled\n", "type": "string", "enum": [ "draft", "submit", "sent", "paid", "expired", "canceled" ] }, "InvoiceItem": { "description": "Invoice item object", "properties": { "id": { "description": "Invoice Item ID", "type": "string", "maxLength": 32 }, "object": { "description": "Object type", "type": "string", "default": "invoiceItem" }, "name": { "description": "Product name", "type": "string", "maxLength": 255 }, "unitPrice": { "description": "Unit price", "type": "integer" }, "currency": { "description": "Currency code (ISO 4217)", "type": "string", "minLength": 3, "maxLength": 3, "default": "JPY" }, "quantity": { "description": "Count", "type": "integer" }, "unit": { "description": "Unit", "type": "string" }, "taxRateType": { "$ref": "#/components/schemas/TaxRateType" }, "transactionTime": { "description": "Transaction time (epoch millisecond)", "type": "integer", "format": "int64" } } }, "CustomerStatusType": { "description": "Status\n", "type": "string", "enum": [ "active", "deleted" ] }, "TaxRateType": { "description": "Tax rate type\n- standard Standard rate (10%)\n- reduced Reduced rate (8%)\n- free Tax-free (0%)\n", "type": "string", "enum": [ "standard", "reduced", "free" ] } }, "securitySchemes": { "bearerAuth": { "type": "http", "scheme": "bearer", "description": "API authentication is performed via Bearer auth using the secret key as the bearer token.\nThe secret key is a critical key that allows all API operations, so handle it with care.\n" }, "basicAuth": { "type": "http", "scheme": "basic", "description": "API authentication is performed via Basic auth using the secret key as the username and omitting the password.\nThe secret key is a critical key that allows all API operations, so handle it with care.\n" } } } } ``` # Send invoice (https://elepay-docs.elestyle.workers.dev/openapi/invoice/sendInvoice) Sends an invoice. **Page URL**: https://elepay-docs.elestyle.workers.dev/openapi/invoice/sendInvoice **Endpoint**: POST /invoices/{invoiceId}/send ```json { "openapi": "3.1.0", "info": { "version": "1.3.0", "title": "elepay API Reference", "description": "The elepay API is a REST-based payment API. It provides various capabilities for payment operations, such as processing payments and refunds.", "contact": { "name": "ELESTYLE, INC", "url": "https://elepay.io", "email": "support@elestyle.jp" } }, "servers": [ { "url": "https://api.elepay.io" } ], "security": [ { "bearerAuth": [] }, { "basicAuth": [] } ], "tags": [ { "name": "Invoice" } ], "paths": { "/invoices/{invoiceId}/send": { "post": { "tags": [ "Invoice" ], "summary": "Send invoice", "description": "Sends an invoice.", "operationId": "sendInvoice", "parameters": [ { "name": "invoiceId", "description": "Invoice ID", "in": "path", "required": true, "schema": { "type": "string" } } ], "responses": { "202": { "description": "Accept", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/InvoiceDto" } } } } } } } }, "components": { "schemas": { "InvoiceDto": { "description": "Invoice object", "properties": { "id": { "description": "Invoice ID", "type": "string", "maxLength": 32 }, "object": { "description": "Object type", "type": "string", "default": "invoice" }, "liveMode": { "description": "Whether this is live mode\n- false Test mode\n- true Live mode\n", "type": "boolean" }, "customer": { "$ref": "#/components/schemas/CustomerDto" }, "invoiceNo": { "description": "Invoice Number", "type": "string", "maxLength": 255 }, "name": { "description": "Invoice subject", "type": "string", "maxLength": 255 }, "memo": { "description": "Invoice memo", "type": "string", "maxLength": 255 }, "amount": { "description": "Payment amount", "type": "integer" }, "currency": { "description": "Currency code (ISO 4217)", "type": "string", "minLength": 3, "maxLength": 3, "default": "JPY" }, "status": { "$ref": "#/components/schemas/InvoiceStatusType" }, "operator": { "description": "Operator", "type": "string", "maxLength": 255 }, "invoiceTime": { "description": "Billing date (epoch millisecond)", "type": "integer", "format": "int64" }, "sendTime": { "description": "Send time (epoch millisecond)", "type": "integer", "format": "int64" }, "paidTime": { "description": "Payment time (epoch millisecond)", "type": "integer", "format": "int64" }, "expiryTime": { "description": "Payment request expiry time (epoch millisecond)", "type": "integer", "format": "int64" }, "createTime": { "description": "Creation time (epoch millisecond)", "type": "integer", "format": "int64" }, "fields": { "description": "Invoice field list", "type": "array", "items": { "type": "string" } }, "items": { "description": "Invoice item list", "type": "array", "items": { "$ref": "#/components/schemas/InvoiceItem" } }, "remark": { "description": "Additional description", "type": "string" }, "metadata": { "description": "Metadata", "type": "object", "maxProperties": 20, "propertyNames": { "type": "string", "maxLength": 20 }, "additionalProperties": { "type": "string" } }, "enableAutoCharge": { "description": "Whether to enable automatic payment.\ntrue Enabled, false Disabled\n", "type": "boolean" } } }, "CustomerDto": { "description": "Customer object", "properties": { "id": { "description": "Customer ID", "type": "string", "maxLength": 32 }, "object": { "description": "Object type", "type": "string", "default": "customer" }, "liveMode": { "description": "Whether this is live mode\n- false Test mode\n- true Live mode\n", "type": "boolean" }, "defaultSource": { "description": "Default customer source ID", "type": "string", "maxLength": 32 }, "name": { "description": "Name", "type": "string", "maxLength": 255 }, "description": { "description": "Description of the customer", "type": "string", "maxLength": 255 }, "email": { "description": "Email address", "type": "string", "maxLength": 255 }, "phone": { "description": "Phone number", "type": "string", "maxLength": 255 }, "remark": { "description": "Remarks", "type": "string" }, "operator": { "description": "Operator", "type": "string", "maxLength": 255 }, "status": { "$ref": "#/components/schemas/CustomerStatusType" }, "metadata": { "description": "Metadata", "type": "object", "maxProperties": 20, "propertyNames": { "type": "string", "maxLength": 20 }, "additionalProperties": { "type": "string" } }, "updateTime": { "description": "update time", "type": "integer", "format": "int64" } } }, "InvoiceStatusType": { "description": "Invoice status\n- draft Draft\n- submit Finalized\n- sent Sent\n- paid Paid\n- expired Expired\n- canceled Canceled\n", "type": "string", "enum": [ "draft", "submit", "sent", "paid", "expired", "canceled" ] }, "InvoiceItem": { "description": "Invoice item object", "properties": { "id": { "description": "Invoice Item ID", "type": "string", "maxLength": 32 }, "object": { "description": "Object type", "type": "string", "default": "invoiceItem" }, "name": { "description": "Product name", "type": "string", "maxLength": 255 }, "unitPrice": { "description": "Unit price", "type": "integer" }, "currency": { "description": "Currency code (ISO 4217)", "type": "string", "minLength": 3, "maxLength": 3, "default": "JPY" }, "quantity": { "description": "Count", "type": "integer" }, "unit": { "description": "Unit", "type": "string" }, "taxRateType": { "$ref": "#/components/schemas/TaxRateType" }, "transactionTime": { "description": "Transaction time (epoch millisecond)", "type": "integer", "format": "int64" } } }, "CustomerStatusType": { "description": "Status\n", "type": "string", "enum": [ "active", "deleted" ] }, "TaxRateType": { "description": "Tax rate type\n- standard Standard rate (10%)\n- reduced Reduced rate (8%)\n- free Tax-free (0%)\n", "type": "string", "enum": [ "standard", "reduced", "free" ] } }, "securitySchemes": { "bearerAuth": { "type": "http", "scheme": "bearer", "description": "API authentication is performed via Bearer auth using the secret key as the bearer token.\nThe secret key is a critical key that allows all API operations, so handle it with care.\n" }, "basicAuth": { "type": "http", "scheme": "basic", "description": "API authentication is performed via Basic auth using the secret key as the username and omitting the password.\nThe secret key is a critical key that allows all API operations, so handle it with care.\n" } } } } ``` # Submit invoice (https://elepay-docs.elestyle.workers.dev/openapi/invoice/submitInvoice) Finalizes an invoice. **Page URL**: https://elepay-docs.elestyle.workers.dev/openapi/invoice/submitInvoice **Endpoint**: POST /invoices/{invoiceId}/submit ```json { "openapi": "3.1.0", "info": { "version": "1.3.0", "title": "elepay API Reference", "description": "The elepay API is a REST-based payment API. It provides various capabilities for payment operations, such as processing payments and refunds.", "contact": { "name": "ELESTYLE, INC", "url": "https://elepay.io", "email": "support@elestyle.jp" } }, "servers": [ { "url": "https://api.elepay.io" } ], "security": [ { "bearerAuth": [] }, { "basicAuth": [] } ], "tags": [ { "name": "Invoice" } ], "paths": { "/invoices/{invoiceId}/submit": { "post": { "tags": [ "Invoice" ], "summary": "Submit invoice", "description": "Finalizes an invoice.", "operationId": "submitInvoice", "parameters": [ { "name": "invoiceId", "description": "Invoice ID", "in": "path", "required": true, "schema": { "type": "string" } } ], "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/InvoiceDto" } } } } } } } }, "components": { "schemas": { "InvoiceDto": { "description": "Invoice object", "properties": { "id": { "description": "Invoice ID", "type": "string", "maxLength": 32 }, "object": { "description": "Object type", "type": "string", "default": "invoice" }, "liveMode": { "description": "Whether this is live mode\n- false Test mode\n- true Live mode\n", "type": "boolean" }, "customer": { "$ref": "#/components/schemas/CustomerDto" }, "invoiceNo": { "description": "Invoice Number", "type": "string", "maxLength": 255 }, "name": { "description": "Invoice subject", "type": "string", "maxLength": 255 }, "memo": { "description": "Invoice memo", "type": "string", "maxLength": 255 }, "amount": { "description": "Payment amount", "type": "integer" }, "currency": { "description": "Currency code (ISO 4217)", "type": "string", "minLength": 3, "maxLength": 3, "default": "JPY" }, "status": { "$ref": "#/components/schemas/InvoiceStatusType" }, "operator": { "description": "Operator", "type": "string", "maxLength": 255 }, "invoiceTime": { "description": "Billing date (epoch millisecond)", "type": "integer", "format": "int64" }, "sendTime": { "description": "Send time (epoch millisecond)", "type": "integer", "format": "int64" }, "paidTime": { "description": "Payment time (epoch millisecond)", "type": "integer", "format": "int64" }, "expiryTime": { "description": "Payment request expiry time (epoch millisecond)", "type": "integer", "format": "int64" }, "createTime": { "description": "Creation time (epoch millisecond)", "type": "integer", "format": "int64" }, "fields": { "description": "Invoice field list", "type": "array", "items": { "type": "string" } }, "items": { "description": "Invoice item list", "type": "array", "items": { "$ref": "#/components/schemas/InvoiceItem" } }, "remark": { "description": "Additional description", "type": "string" }, "metadata": { "description": "Metadata", "type": "object", "maxProperties": 20, "propertyNames": { "type": "string", "maxLength": 20 }, "additionalProperties": { "type": "string" } }, "enableAutoCharge": { "description": "Whether to enable automatic payment.\ntrue Enabled, false Disabled\n", "type": "boolean" } } }, "CustomerDto": { "description": "Customer object", "properties": { "id": { "description": "Customer ID", "type": "string", "maxLength": 32 }, "object": { "description": "Object type", "type": "string", "default": "customer" }, "liveMode": { "description": "Whether this is live mode\n- false Test mode\n- true Live mode\n", "type": "boolean" }, "defaultSource": { "description": "Default customer source ID", "type": "string", "maxLength": 32 }, "name": { "description": "Name", "type": "string", "maxLength": 255 }, "description": { "description": "Description of the customer", "type": "string", "maxLength": 255 }, "email": { "description": "Email address", "type": "string", "maxLength": 255 }, "phone": { "description": "Phone number", "type": "string", "maxLength": 255 }, "remark": { "description": "Remarks", "type": "string" }, "operator": { "description": "Operator", "type": "string", "maxLength": 255 }, "status": { "$ref": "#/components/schemas/CustomerStatusType" }, "metadata": { "description": "Metadata", "type": "object", "maxProperties": 20, "propertyNames": { "type": "string", "maxLength": 20 }, "additionalProperties": { "type": "string" } }, "updateTime": { "description": "update time", "type": "integer", "format": "int64" } } }, "InvoiceStatusType": { "description": "Invoice status\n- draft Draft\n- submit Finalized\n- sent Sent\n- paid Paid\n- expired Expired\n- canceled Canceled\n", "type": "string", "enum": [ "draft", "submit", "sent", "paid", "expired", "canceled" ] }, "InvoiceItem": { "description": "Invoice item object", "properties": { "id": { "description": "Invoice Item ID", "type": "string", "maxLength": 32 }, "object": { "description": "Object type", "type": "string", "default": "invoiceItem" }, "name": { "description": "Product name", "type": "string", "maxLength": 255 }, "unitPrice": { "description": "Unit price", "type": "integer" }, "currency": { "description": "Currency code (ISO 4217)", "type": "string", "minLength": 3, "maxLength": 3, "default": "JPY" }, "quantity": { "description": "Count", "type": "integer" }, "unit": { "description": "Unit", "type": "string" }, "taxRateType": { "$ref": "#/components/schemas/TaxRateType" }, "transactionTime": { "description": "Transaction time (epoch millisecond)", "type": "integer", "format": "int64" } } }, "CustomerStatusType": { "description": "Status\n", "type": "string", "enum": [ "active", "deleted" ] }, "TaxRateType": { "description": "Tax rate type\n- standard Standard rate (10%)\n- reduced Reduced rate (8%)\n- free Tax-free (0%)\n", "type": "string", "enum": [ "standard", "reduced", "free" ] } }, "securitySchemes": { "bearerAuth": { "type": "http", "scheme": "bearer", "description": "API authentication is performed via Bearer auth using the secret key as the bearer token.\nThe secret key is a critical key that allows all API operations, so handle it with care.\n" }, "basicAuth": { "type": "http", "scheme": "basic", "description": "API authentication is performed via Basic auth using the secret key as the username and omitting the password.\nThe secret key is a critical key that allows all API operations, so handle it with care.\n" } } } } ``` # Update invoice (https://elepay-docs.elestyle.workers.dev/openapi/invoice/updateInvoice) Updates invoice information. **Page URL**: https://elepay-docs.elestyle.workers.dev/openapi/invoice/updateInvoice **Endpoint**: POST /invoices/{invoiceId} ```json { "openapi": "3.1.0", "info": { "version": "1.3.0", "title": "elepay API Reference", "description": "The elepay API is a REST-based payment API. It provides various capabilities for payment operations, such as processing payments and refunds.", "contact": { "name": "ELESTYLE, INC", "url": "https://elepay.io", "email": "support@elestyle.jp" } }, "servers": [ { "url": "https://api.elepay.io" } ], "security": [ { "bearerAuth": [] }, { "basicAuth": [] } ], "tags": [ { "name": "Invoice" } ], "paths": { "/invoices/{invoiceId}": { "post": { "tags": [ "Invoice" ], "summary": "Update invoice", "description": "Updates invoice information.", "operationId": "updateInvoice", "parameters": [ { "name": "invoiceId", "description": "Invoice ID", "in": "path", "required": true, "schema": { "type": "string" } } ], "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/InvoiceReq" } } }, "description": "Invoice request", "required": true }, "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/InvoiceDto" } } } } } } } }, "components": { "schemas": { "InvoiceReq": { "description": "Invoice request", "type": "object", "required": [ "customerId", "amount" ], "properties": { "name": { "description": "Invoice subject", "type": "string" }, "memo": { "description": "Invoice memo", "type": "string" }, "customerId": { "description": "Customer ID", "type": "string", "maxLength": 32 }, "amount": { "description": "Payment amount", "type": "integer" }, "currency": { "description": "Currency code (ISO 4217)", "type": "string", "minLength": 3, "maxLength": 3, "default": "JPY" }, "taxType": { "$ref": "#/components/schemas/TaxType" }, "taxCalcType": { "$ref": "#/components/schemas/TaxCalcType" }, "invoiceTime": { "description": "Billing date (epoch millisecond)", "type": "integer", "format": "int64" }, "expiryTime": { "description": "Payment request expiry time (epoch millisecond)", "type": "integer", "format": "int64" }, "fields": { "description": "Invoice field list", "type": "array", "items": { "type": "string" } }, "items": { "type": "array", "items": { "$ref": "#/components/schemas/InvoiceItem" } }, "remark": { "description": "Additional description", "type": "string" }, "metadata": { "description": "Metadata", "type": "object", "maxProperties": 20, "propertyNames": { "type": "string", "maxLength": 20 }, "additionalProperties": { "type": "string" } }, "enableAutoCharge": { "description": "Whether to enable automatic payment.\ntrue Enabled, false Disabled\n", "type": "boolean", "default": false }, "autoChargeTime": { "description": "Automatic payment time (epoch millisecond)", "type": "integer", "format": "int64" } } }, "InvoiceDto": { "description": "Invoice object", "properties": { "id": { "description": "Invoice ID", "type": "string", "maxLength": 32 }, "object": { "description": "Object type", "type": "string", "default": "invoice" }, "liveMode": { "description": "Whether this is live mode\n- false Test mode\n- true Live mode\n", "type": "boolean" }, "customer": { "$ref": "#/components/schemas/CustomerDto" }, "invoiceNo": { "description": "Invoice Number", "type": "string", "maxLength": 255 }, "name": { "description": "Invoice subject", "type": "string", "maxLength": 255 }, "memo": { "description": "Invoice memo", "type": "string", "maxLength": 255 }, "amount": { "description": "Payment amount", "type": "integer" }, "currency": { "description": "Currency code (ISO 4217)", "type": "string", "minLength": 3, "maxLength": 3, "default": "JPY" }, "status": { "$ref": "#/components/schemas/InvoiceStatusType" }, "operator": { "description": "Operator", "type": "string", "maxLength": 255 }, "invoiceTime": { "description": "Billing date (epoch millisecond)", "type": "integer", "format": "int64" }, "sendTime": { "description": "Send time (epoch millisecond)", "type": "integer", "format": "int64" }, "paidTime": { "description": "Payment time (epoch millisecond)", "type": "integer", "format": "int64" }, "expiryTime": { "description": "Payment request expiry time (epoch millisecond)", "type": "integer", "format": "int64" }, "createTime": { "description": "Creation time (epoch millisecond)", "type": "integer", "format": "int64" }, "fields": { "description": "Invoice field list", "type": "array", "items": { "type": "string" } }, "items": { "description": "Invoice item list", "type": "array", "items": { "$ref": "#/components/schemas/InvoiceItem" } }, "remark": { "description": "Additional description", "type": "string" }, "metadata": { "description": "Metadata", "type": "object", "maxProperties": 20, "propertyNames": { "type": "string", "maxLength": 20 }, "additionalProperties": { "type": "string" } }, "enableAutoCharge": { "description": "Whether to enable automatic payment.\ntrue Enabled, false Disabled\n", "type": "boolean" } } }, "TaxType": { "description": "Tax type\n- included Tax included\n- excluded Tax excluded\n", "type": "string", "enum": [ "included", "excluded" ] }, "TaxCalcType": { "description": "Tax calculation method\n- floor Round down\n- ceil Round up\n- round5 Round half up\n", "type": "string", "enum": [ "floor", "ceil", "round5" ] }, "InvoiceItem": { "description": "Invoice item object", "properties": { "id": { "description": "Invoice Item ID", "type": "string", "maxLength": 32 }, "object": { "description": "Object type", "type": "string", "default": "invoiceItem" }, "name": { "description": "Product name", "type": "string", "maxLength": 255 }, "unitPrice": { "description": "Unit price", "type": "integer" }, "currency": { "description": "Currency code (ISO 4217)", "type": "string", "minLength": 3, "maxLength": 3, "default": "JPY" }, "quantity": { "description": "Count", "type": "integer" }, "unit": { "description": "Unit", "type": "string" }, "taxRateType": { "$ref": "#/components/schemas/TaxRateType" }, "transactionTime": { "description": "Transaction time (epoch millisecond)", "type": "integer", "format": "int64" } } }, "CustomerDto": { "description": "Customer object", "properties": { "id": { "description": "Customer ID", "type": "string", "maxLength": 32 }, "object": { "description": "Object type", "type": "string", "default": "customer" }, "liveMode": { "description": "Whether this is live mode\n- false Test mode\n- true Live mode\n", "type": "boolean" }, "defaultSource": { "description": "Default customer source ID", "type": "string", "maxLength": 32 }, "name": { "description": "Name", "type": "string", "maxLength": 255 }, "description": { "description": "Description of the customer", "type": "string", "maxLength": 255 }, "email": { "description": "Email address", "type": "string", "maxLength": 255 }, "phone": { "description": "Phone number", "type": "string", "maxLength": 255 }, "remark": { "description": "Remarks", "type": "string" }, "operator": { "description": "Operator", "type": "string", "maxLength": 255 }, "status": { "$ref": "#/components/schemas/CustomerStatusType" }, "metadata": { "description": "Metadata", "type": "object", "maxProperties": 20, "propertyNames": { "type": "string", "maxLength": 20 }, "additionalProperties": { "type": "string" } }, "updateTime": { "description": "update time", "type": "integer", "format": "int64" } } }, "InvoiceStatusType": { "description": "Invoice status\n- draft Draft\n- submit Finalized\n- sent Sent\n- paid Paid\n- expired Expired\n- canceled Canceled\n", "type": "string", "enum": [ "draft", "submit", "sent", "paid", "expired", "canceled" ] }, "TaxRateType": { "description": "Tax rate type\n- standard Standard rate (10%)\n- reduced Reduced rate (8%)\n- free Tax-free (0%)\n", "type": "string", "enum": [ "standard", "reduced", "free" ] }, "CustomerStatusType": { "description": "Status\n", "type": "string", "enum": [ "active", "deleted" ] } }, "securitySchemes": { "bearerAuth": { "type": "http", "scheme": "bearer", "description": "API authentication is performed via Bearer auth using the secret key as the bearer token.\nThe secret key is a critical key that allows all API operations, so handle it with care.\n" }, "basicAuth": { "type": "http", "scheme": "basic", "description": "API authentication is performed via Basic auth using the secret key as the username and omitting the password.\nThe secret key is a critical key that allows all API operations, so handle it with care.\n" } } } } ``` # Create location (https://elepay-docs.elestyle.workers.dev/openapi/location/createChargeLocation) Creates a location. **Page URL**: https://elepay-docs.elestyle.workers.dev/openapi/location/createChargeLocation **Endpoint**: POST /locations ```json { "openapi": "3.1.0", "info": { "version": "1.3.0", "title": "elepay API Reference", "description": "The elepay API is a REST-based payment API. It provides various capabilities for payment operations, such as processing payments and refunds.", "contact": { "name": "ELESTYLE, INC", "url": "https://elepay.io", "email": "support@elestyle.jp" } }, "servers": [ { "url": "https://api.elepay.io" } ], "security": [ { "bearerAuth": [] }, { "basicAuth": [] } ], "tags": [ { "name": "Location" } ], "paths": { "/locations": { "post": { "tags": [ "Location" ], "summary": "Create location", "description": "Creates a location.", "operationId": "createChargeLocation", "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ChargeLocationReq" } } } }, "responses": { "201": { "description": "Created", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ChargeLocationDto" } } } } } } } }, "components": { "schemas": { "ChargeLocationReq": { "description": "Location request", "type": "object", "required": [ "name", "tel", "zip", "address" ], "properties": { "name": { "$ref": "#/components/schemas/StringTransliterationDto" }, "tel": { "description": "Phone number", "type": "string", "maxLength": 20 }, "zip": { "description": "Postal code", "type": "string", "maxLength": 8 }, "address": { "$ref": "#/components/schemas/AddressTransliterationDto" }, "latitude": { "description": "Latitude", "type": "number", "format": "double" }, "longitude": { "description": "Longitude", "type": "number", "format": "double" }, "note": { "description": "Remarks", "type": "string" }, "status": { "$ref": "#/components/schemas/ChargeLocationStatusType" } } }, "ChargeLocationDto": { "description": "Location object", "type": "object", "properties": { "id": { "description": "Location ID", "type": "string", "maxLength": 32 }, "name": { "$ref": "#/components/schemas/StringTransliterationDto" }, "tel": { "description": "Phone number", "type": "string", "maxLength": 20 }, "zip": { "description": "Postal code", "type": "string", "maxLength": 8 }, "address": { "$ref": "#/components/schemas/AddressTransliterationDto" }, "latitude": { "description": "Latitude", "type": "number", "format": "double" }, "longitude": { "description": "Longitude", "type": "number", "format": "double" }, "note": { "description": "Remarks", "type": "string" }, "status": { "$ref": "#/components/schemas/ChargeLocationStatusType" } } }, "StringTransliterationDto": { "description": "Name transliteration object", "type": "object", "properties": { "kanji": { "description": "Kanji", "type": "string" }, "kana": { "description": "Kana", "type": "string" }, "romaji": { "description": "Romaji", "type": "string" } } }, "AddressTransliterationDto": { "description": "Address transliteration object", "type": "object", "properties": { "kanji": { "$ref": "#/components/schemas/AddressDto" }, "kana": { "$ref": "#/components/schemas/AddressDto" }, "romaji": { "$ref": "#/components/schemas/AddressDto" } } }, "ChargeLocationStatusType": { "description": "Location status\n- active Active\n- submitted Submitted\n", "type": "string", "enum": [ "active", "submitted" ] }, "AddressDto": { "description": "Address object", "type": "object", "properties": { "pref": { "description": "Prefecture", "type": "string" }, "city": { "description": "City/Municipality", "type": "string" }, "town": { "description": "Town", "type": "string" }, "address1": { "description": "Address line 1", "type": "string" }, "address2": { "description": "Address line 2", "type": "string" } } } }, "securitySchemes": { "bearerAuth": { "type": "http", "scheme": "bearer", "description": "API authentication is performed via Bearer auth using the secret key as the bearer token.\nThe secret key is a critical key that allows all API operations, so handle it with care.\n" }, "basicAuth": { "type": "http", "scheme": "basic", "description": "API authentication is performed via Basic auth using the secret key as the username and omitting the password.\nThe secret key is a critical key that allows all API operations, so handle it with care.\n" } } } } ``` # Delete location (https://elepay-docs.elestyle.workers.dev/openapi/location/deleteChargeLocation) Deletes a location. **Page URL**: https://elepay-docs.elestyle.workers.dev/openapi/location/deleteChargeLocation **Endpoint**: DELETE /locations/{locationId} ```json { "openapi": "3.1.0", "info": { "version": "1.3.0", "title": "elepay API Reference", "description": "The elepay API is a REST-based payment API. It provides various capabilities for payment operations, such as processing payments and refunds.", "contact": { "name": "ELESTYLE, INC", "url": "https://elepay.io", "email": "support@elestyle.jp" } }, "servers": [ { "url": "https://api.elepay.io" } ], "security": [ { "bearerAuth": [] }, { "basicAuth": [] } ], "tags": [ { "name": "Location" } ], "paths": { "/locations/{locationId}": { "delete": { "tags": [ "Location" ], "summary": "Delete location", "description": "Deletes a location.", "operationId": "deleteChargeLocation", "parameters": [ { "name": "locationId", "description": "Location ID", "in": "path", "required": true, "schema": { "type": "string" } } ], "responses": { "204": { "description": "Deleted" } } } } }, "components": { "securitySchemes": { "bearerAuth": { "type": "http", "scheme": "bearer", "description": "API authentication is performed via Bearer auth using the secret key as the bearer token.\nThe secret key is a critical key that allows all API operations, so handle it with care.\n" }, "basicAuth": { "type": "http", "scheme": "basic", "description": "API authentication is performed via Basic auth using the secret key as the username and omitting the password.\nThe secret key is a critical key that allows all API operations, so handle it with care.\n" } } } } ``` # List locations (https://elepay-docs.elestyle.workers.dev/openapi/location/listChargeLocations) Retrieves a list of location information. **Page URL**: https://elepay-docs.elestyle.workers.dev/openapi/location/listChargeLocations **Endpoint**: GET /locations ```json { "openapi": "3.1.0", "info": { "version": "1.3.0", "title": "elepay API Reference", "description": "The elepay API is a REST-based payment API. It provides various capabilities for payment operations, such as processing payments and refunds.", "contact": { "name": "ELESTYLE, INC", "url": "https://elepay.io", "email": "support@elestyle.jp" } }, "servers": [ { "url": "https://api.elepay.io" } ], "security": [ { "bearerAuth": [] }, { "basicAuth": [] } ], "tags": [ { "name": "Location" } ], "paths": { "/locations": { "get": { "tags": [ "Location" ], "summary": "List locations", "description": "Retrieves a list of location information.", "operationId": "listChargeLocations", "parameters": [ { "name": "limit", "description": "Maximum number of items", "in": "query", "required": false, "schema": { "type": "integer", "minimum": 0, "maximum": 100, "default": 20 } }, { "name": "offset", "description": "Starting offset", "in": "query", "schema": { "type": "integer", "default": 0 } } ], "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ChargeLocationsResponse" } } } } } } } }, "components": { "schemas": { "ChargeLocationsResponse": { "description": "Location list", "type": "object", "properties": { "total": { "description": "Count", "type": "integer" }, "locations": { "description": "Location details", "type": "array", "items": { "$ref": "#/components/schemas/ChargeLocationDto" } } } }, "ChargeLocationDto": { "description": "Location object", "type": "object", "properties": { "id": { "description": "Location ID", "type": "string", "maxLength": 32 }, "name": { "$ref": "#/components/schemas/StringTransliterationDto" }, "tel": { "description": "Phone number", "type": "string", "maxLength": 20 }, "zip": { "description": "Postal code", "type": "string", "maxLength": 8 }, "address": { "$ref": "#/components/schemas/AddressTransliterationDto" }, "latitude": { "description": "Latitude", "type": "number", "format": "double" }, "longitude": { "description": "Longitude", "type": "number", "format": "double" }, "note": { "description": "Remarks", "type": "string" }, "status": { "$ref": "#/components/schemas/ChargeLocationStatusType" } } }, "StringTransliterationDto": { "description": "Name transliteration object", "type": "object", "properties": { "kanji": { "description": "Kanji", "type": "string" }, "kana": { "description": "Kana", "type": "string" }, "romaji": { "description": "Romaji", "type": "string" } } }, "AddressTransliterationDto": { "description": "Address transliteration object", "type": "object", "properties": { "kanji": { "$ref": "#/components/schemas/AddressDto" }, "kana": { "$ref": "#/components/schemas/AddressDto" }, "romaji": { "$ref": "#/components/schemas/AddressDto" } } }, "ChargeLocationStatusType": { "description": "Location status\n- active Active\n- submitted Submitted\n", "type": "string", "enum": [ "active", "submitted" ] }, "AddressDto": { "description": "Address object", "type": "object", "properties": { "pref": { "description": "Prefecture", "type": "string" }, "city": { "description": "City/Municipality", "type": "string" }, "town": { "description": "Town", "type": "string" }, "address1": { "description": "Address line 1", "type": "string" }, "address2": { "description": "Address line 2", "type": "string" } } } }, "securitySchemes": { "bearerAuth": { "type": "http", "scheme": "bearer", "description": "API authentication is performed via Bearer auth using the secret key as the bearer token.\nThe secret key is a critical key that allows all API operations, so handle it with care.\n" }, "basicAuth": { "type": "http", "scheme": "basic", "description": "API authentication is performed via Basic auth using the secret key as the username and omitting the password.\nThe secret key is a critical key that allows all API operations, so handle it with care.\n" } } } } ``` # Retrieve location (https://elepay-docs.elestyle.workers.dev/openapi/location/retrieveChargeLocation) Retrieves location information. **Page URL**: https://elepay-docs.elestyle.workers.dev/openapi/location/retrieveChargeLocation **Endpoint**: GET /locations/{locationId} ```json { "openapi": "3.1.0", "info": { "version": "1.3.0", "title": "elepay API Reference", "description": "The elepay API is a REST-based payment API. It provides various capabilities for payment operations, such as processing payments and refunds.", "contact": { "name": "ELESTYLE, INC", "url": "https://elepay.io", "email": "support@elestyle.jp" } }, "servers": [ { "url": "https://api.elepay.io" } ], "security": [ { "bearerAuth": [] }, { "basicAuth": [] } ], "tags": [ { "name": "Location" } ], "paths": { "/locations/{locationId}": { "get": { "tags": [ "Location" ], "summary": "Retrieve location", "description": "Retrieves location information.", "operationId": "retrieveChargeLocation", "parameters": [ { "name": "locationId", "description": "Location ID", "in": "path", "required": true, "schema": { "type": "string" } } ], "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ChargeLocationDto" } } } } } } } }, "components": { "schemas": { "ChargeLocationDto": { "description": "Location object", "type": "object", "properties": { "id": { "description": "Location ID", "type": "string", "maxLength": 32 }, "name": { "$ref": "#/components/schemas/StringTransliterationDto" }, "tel": { "description": "Phone number", "type": "string", "maxLength": 20 }, "zip": { "description": "Postal code", "type": "string", "maxLength": 8 }, "address": { "$ref": "#/components/schemas/AddressTransliterationDto" }, "latitude": { "description": "Latitude", "type": "number", "format": "double" }, "longitude": { "description": "Longitude", "type": "number", "format": "double" }, "note": { "description": "Remarks", "type": "string" }, "status": { "$ref": "#/components/schemas/ChargeLocationStatusType" } } }, "StringTransliterationDto": { "description": "Name transliteration object", "type": "object", "properties": { "kanji": { "description": "Kanji", "type": "string" }, "kana": { "description": "Kana", "type": "string" }, "romaji": { "description": "Romaji", "type": "string" } } }, "AddressTransliterationDto": { "description": "Address transliteration object", "type": "object", "properties": { "kanji": { "$ref": "#/components/schemas/AddressDto" }, "kana": { "$ref": "#/components/schemas/AddressDto" }, "romaji": { "$ref": "#/components/schemas/AddressDto" } } }, "ChargeLocationStatusType": { "description": "Location status\n- active Active\n- submitted Submitted\n", "type": "string", "enum": [ "active", "submitted" ] }, "AddressDto": { "description": "Address object", "type": "object", "properties": { "pref": { "description": "Prefecture", "type": "string" }, "city": { "description": "City/Municipality", "type": "string" }, "town": { "description": "Town", "type": "string" }, "address1": { "description": "Address line 1", "type": "string" }, "address2": { "description": "Address line 2", "type": "string" } } } }, "securitySchemes": { "bearerAuth": { "type": "http", "scheme": "bearer", "description": "API authentication is performed via Bearer auth using the secret key as the bearer token.\nThe secret key is a critical key that allows all API operations, so handle it with care.\n" }, "basicAuth": { "type": "http", "scheme": "basic", "description": "API authentication is performed via Basic auth using the secret key as the username and omitting the password.\nThe secret key is a critical key that allows all API operations, so handle it with care.\n" } } } } ``` # Update location (https://elepay-docs.elestyle.workers.dev/openapi/location/updateChargeLocation) Updates location information. **Page URL**: https://elepay-docs.elestyle.workers.dev/openapi/location/updateChargeLocation **Endpoint**: POST /locations/{locationId} ```json { "openapi": "3.1.0", "info": { "version": "1.3.0", "title": "elepay API Reference", "description": "The elepay API is a REST-based payment API. It provides various capabilities for payment operations, such as processing payments and refunds.", "contact": { "name": "ELESTYLE, INC", "url": "https://elepay.io", "email": "support@elestyle.jp" } }, "servers": [ { "url": "https://api.elepay.io" } ], "security": [ { "bearerAuth": [] }, { "basicAuth": [] } ], "tags": [ { "name": "Location" } ], "paths": { "/locations/{locationId}": { "post": { "tags": [ "Location" ], "summary": "Update location", "description": "Updates location information.", "operationId": "updateChargeLocation", "parameters": [ { "name": "locationId", "description": "Location ID", "in": "path", "required": true, "schema": { "type": "string" } } ], "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ChargeLocationUpdateReq" } } }, "required": true }, "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ChargeLocationDto" } } } } } } } }, "components": { "schemas": { "ChargeLocationUpdateReq": { "description": "Location update request", "type": "object", "properties": { "name": { "$ref": "#/components/schemas/StringTransliterationDto" }, "tel": { "description": "Phone number", "type": "string", "maxLength": 20 }, "zip": { "description": "Postal code", "type": "string", "maxLength": 8 }, "address": { "$ref": "#/components/schemas/AddressTransliterationDto" }, "latitude": { "description": "Latitude", "type": "number", "format": "double" }, "longitude": { "description": "Longitude", "type": "number", "format": "double" }, "note": { "description": "Remarks", "type": "string" }, "status": { "$ref": "#/components/schemas/ChargeLocationStatusType" } } }, "ChargeLocationDto": { "description": "Location object", "type": "object", "properties": { "id": { "description": "Location ID", "type": "string", "maxLength": 32 }, "name": { "$ref": "#/components/schemas/StringTransliterationDto" }, "tel": { "description": "Phone number", "type": "string", "maxLength": 20 }, "zip": { "description": "Postal code", "type": "string", "maxLength": 8 }, "address": { "$ref": "#/components/schemas/AddressTransliterationDto" }, "latitude": { "description": "Latitude", "type": "number", "format": "double" }, "longitude": { "description": "Longitude", "type": "number", "format": "double" }, "note": { "description": "Remarks", "type": "string" }, "status": { "$ref": "#/components/schemas/ChargeLocationStatusType" } } }, "StringTransliterationDto": { "description": "Name transliteration object", "type": "object", "properties": { "kanji": { "description": "Kanji", "type": "string" }, "kana": { "description": "Kana", "type": "string" }, "romaji": { "description": "Romaji", "type": "string" } } }, "AddressTransliterationDto": { "description": "Address transliteration object", "type": "object", "properties": { "kanji": { "$ref": "#/components/schemas/AddressDto" }, "kana": { "$ref": "#/components/schemas/AddressDto" }, "romaji": { "$ref": "#/components/schemas/AddressDto" } } }, "ChargeLocationStatusType": { "description": "Location status\n- active Active\n- submitted Submitted\n", "type": "string", "enum": [ "active", "submitted" ] }, "AddressDto": { "description": "Address object", "type": "object", "properties": { "pref": { "description": "Prefecture", "type": "string" }, "city": { "description": "City/Municipality", "type": "string" }, "town": { "description": "Town", "type": "string" }, "address1": { "description": "Address line 1", "type": "string" }, "address2": { "description": "Address line 2", "type": "string" } } } }, "securitySchemes": { "bearerAuth": { "type": "http", "scheme": "bearer", "description": "API authentication is performed via Bearer auth using the secret key as the bearer token.\nThe secret key is a critical key that allows all API operations, so handle it with care.\n" }, "basicAuth": { "type": "http", "scheme": "basic", "description": "API authentication is performed via Basic auth using the secret key as the username and omitting the password.\nThe secret key is a critical key that allows all API operations, so handle it with care.\n" } } } } ``` # List supported payment methods (https://elepay-docs.elestyle.workers.dev/openapi/paymentmethod/listPaymentMethods) Retrieves the available payment methods. **Page URL**: https://elepay-docs.elestyle.workers.dev/openapi/paymentmethod/listPaymentMethods **Endpoint**: GET /payment-methods ```json { "openapi": "3.1.0", "info": { "version": "1.3.0", "title": "elepay API Reference", "description": "The elepay API is a REST-based payment API. It provides various capabilities for payment operations, such as processing payments and refunds.", "contact": { "name": "ELESTYLE, INC", "url": "https://elepay.io", "email": "support@elestyle.jp" } }, "servers": [ { "url": "https://api.elepay.io" } ], "security": [ { "bearerAuth": [] }, { "basicAuth": [] } ], "tags": [ { "name": "PaymentMethod" } ], "paths": { "/payment-methods": { "get": { "tags": [ "PaymentMethod" ], "summary": "List supported payment methods", "description": "Retrieves the available payment methods.", "operationId": "listPaymentMethods", "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/PaymentMethodResponse" } } } } } } } }, "components": { "schemas": { "PaymentMethodResponse": { "description": "List of available payment methods", "type": "object", "properties": { "total": { "description": "Count", "type": "integer" }, "paymentMethods": { "description": "Payment method details", "type": "array", "items": { "$ref": "#/components/schemas/PaymentMethodDto" } } } }, "PaymentMethodDto": { "description": "Payment method details", "type": "object", "properties": { "paymentMethod": { "$ref": "#/components/schemas/PaymentMethodType" }, "resources": { "type": "array", "items": { "$ref": "#/components/schemas/ResourceType" } }, "brand": { "description": "For credit cards, the available card brands", "type": "array", "items": { "description": "Card brand", "type": "string" } }, "ua": { "description": "Available browser user agent", "type": "string" }, "channelProperties": { "$ref": "#/components/schemas/ChannelPropertiesDto" }, "customerProperties": { "$ref": "#/components/schemas/CustomerPropertiesDto" } } }, "PaymentMethodType": { "description": "Payment method\n- auto Auto detection (available for CPM payments only)\n- alipay Alipay\n- alipayhk AlipayHK\n- alipayplus Alipay+\n- amazonpay Amazon Pay\n- applepay Apple Pay\n- applepay_cn Apple Pay (China)\n- atokara Atokara\n- atone atone (pay next month at convenience stores)\n- aupay au Pay\n- clicktopay Click To Pay\n- banktransfer Bank transfer\n- creditcard Credit card\n- dana DANA\n- docomopay d Payment\n- ezlink EZ-Link\n- felica E-money\n- felica_id iD\n- felica_quickpay QUICPay\n- felica_transport_ic Transit IC card\n- gcash GCash\n- ginkopay Bank Pay\n- googlepay Google Pay\n- jcoinpay J-Coin Pay\n- jkopay JKOPAY\n- kakaopay Kakao Pay\n- konbini Convenience store payment\n- linepay LINE Pay\n- merpay Merpay\n- origamipay Origami Pay\n- paidy Paidy (pay next month)\n- paypal PayPal\n- paypay PayPay\n- pxpayplus AllPay\n- rakutenpay Rakuten Pay\n- smartcode Smart Code\n- tng Touch 'n Go eWallet\n- truemoney TrueMoney\n- unionpay UnionPay QuickPass\n- wechatpay Wechat Pay\n- aeonpay AEON Pay\n- rabbitlinepay Rabbit LINE Pay\n- bpi BPI\n- boost Boost\n- hellomoney HelloMoney by AUB\n- tosspay Toss Pay\n- naverpay Naver Pay\n- wellwa WellWa Points\n- grabpay Grab Pay\n- momopay Momo Pay\n- promptpay Prompt Pay\n- wovenpay Woven City Pay\n- ezopay EZO Pay\n", "type": "string", "enum": [ "alipay", "alipayhk", "alipayplus", "amazonpay", "applepay", "applepay_cn", "atokara", "atone", "aupay", "clicktopay", "banktransfer", "creditcard", "dana", "docomopay", "ezlink", "felica", "felica_id", "felica_quickpay", "felica_transport_ic", "gcash", "ginkopay", "googlepay", "jcoinpay", "jkopay", "kakaopay", "konbini", "linepay", "merpay", "origamipay", "paidy", "paypal", "paypay", "pxpayplus", "rakutenpay", "smartcode", "tng", "truemoney", "unionpay", "wechatpay", "aeonpay", "rabbitlinepay", "bpi", "boost", "hellomoney", "tosspay", "naverpay", "wellwa", "grabpay", "momopay", "promptpay", "wovenpay", "ezopay", "auto" ] }, "ResourceType": { "description": "Payment resource\n- web Web browser\n- ios iOS native app\n- android Android native app\n- liff LINE LIFF app\n- mini WeChat Mini Program\n- cpm CPM payment (customer-presented QR code)\n- mpm MPM payment (merchant-presented QR code)\n- reader Card reader payment (reader device required)\n- posapp POS app payment (POS app integration required)\n", "type": "string", "enum": [ "web", "ios", "android", "liff", "mini", "cpm", "mpm", "reader", "posapp" ] }, "ChannelPropertiesDto": { "description": "Information about the payment method", "type": "object", "properties": { "isSupportRefund": { "type": "boolean", "description": "Refunds: true supported, false not supported" }, "isSupportPartialRefund": { "type": "boolean", "description": "Partial refunds: true supported, false not supported" }, "isSupportMultipleRefund": { "type": "boolean", "description": "Multiple refunds: true supported, false only once" }, "isSupportSource": { "type": "boolean", "description": "Customer & source: true supported, false not supported" }, "isSupportMultipleSource": { "type": "boolean", "description": "Multiple sources: true can be bound, false cannot be bound" }, "maxAmount": { "type": "integer", "description": "Maximum amount" }, "minAmount": { "type": "integer", "description": "Minimum amount" }, "resourceWebEnv": { "$ref": "#/components/schemas/ResourceWebEnvType" } } }, "CustomerPropertiesDto": { "deprecated": true, "description": "Customer-related information for payment methods. Deprecated. Use ChannelPropertiesDto instead.\n", "type": "object", "properties": { "isSupportCustomer": { "type": "boolean", "description": "Deprecated. Use ChannelPropertiesDto.isSupportSource.\nCustomer feature: true supported, false not supported.\n" }, "isSupportMultipleSource": { "type": "boolean", "description": "Deprecated. Use ChannelPropertiesDto.isSupportMultipleSource.\nMultiple sources: true can be bound, false cannot be bound\n" } } }, "ResourceWebEnvType": { "description": "When the resource is Web: supported environments\n- all All environments\n- wallet_app Only embedded browsers inside wallet apps\n- web Web only; not available inside wallet apps\n", "type": "string", "enum": [ "all", "wallet_app", "web" ] } }, "securitySchemes": { "bearerAuth": { "type": "http", "scheme": "bearer", "description": "API authentication is performed via Bearer auth using the secret key as the bearer token.\nThe secret key is a critical key that allows all API operations, so handle it with care.\n" }, "basicAuth": { "type": "http", "scheme": "basic", "description": "API authentication is performed via Basic auth using the secret key as the username and omitting the password.\nThe secret key is a critical key that allows all API operations, so handle it with care.\n" } } } } ``` # Create refund (https://elepay-docs.elestyle.workers.dev/openapi/refund/createRefund) Processes a full or partial refund for a charge. **Page URL**: https://elepay-docs.elestyle.workers.dev/openapi/refund/createRefund **Endpoint**: POST /charges/{id}/refunds ```json { "openapi": "3.1.0", "info": { "version": "1.3.0", "title": "elepay API Reference", "description": "The elepay API is a REST-based payment API. It provides various capabilities for payment operations, such as processing payments and refunds.", "contact": { "name": "ELESTYLE, INC", "url": "https://elepay.io", "email": "support@elestyle.jp" } }, "servers": [ { "url": "https://api.elepay.io" } ], "security": [ { "bearerAuth": [] }, { "basicAuth": [] } ], "tags": [ { "name": "Refund" } ], "paths": { "/charges/{id}/refunds": { "post": { "tags": [ "Refund" ], "summary": "Create refund", "description": "Processes a full or partial refund for a charge.", "operationId": "createRefund", "parameters": [ { "name": "id", "description": "Charge ID", "in": "path", "required": true, "schema": { "type": "string" } } ], "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/RefundReq" } } }, "description": "Refund details", "required": true }, "responses": { "201": { "description": "Created", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/RefundDto" } } } } } } } }, "components": { "schemas": { "RefundReq": { "description": "Refund request", "type": "object", "required": [ "amount" ], "properties": { "amount": { "description": "Refund amount. You can refund the full amount, or refund any amount by specifying amount.", "type": "integer" }, "currency": { "description": "Currency code (ISO 4217)", "type": "string", "minLength": 3, "maxLength": 3, "default": "JPY" }, "metadata": { "description": "Refund metadata", "type": "object", "maxProperties": 20, "propertyNames": { "type": "string", "maxLength": 20 }, "additionalProperties": { "type": "string" } }, "reason": { "description": "Refund reason", "type": "string", "maxLength": 255 } } }, "RefundDto": { "description": "Refund object", "type": "object", "properties": { "id": { "description": "Refund ID", "type": "string", "maxLength": 32 }, "object": { "description": "Object type", "type": "string", "default": "refund" }, "chargeId": { "description": "Charge ID", "type": "string", "maxLength": 32 }, "liveMode": { "description": "Whether this is live mode\n- false Test mode\n- true Live mode\n", "type": "boolean" }, "amount": { "description": "Refund amount. You can refund the full amount, or partially refund by specifying amount.", "type": "integer" }, "currency": { "description": "Currency code (ISO 4217)", "type": "string", "minLength": 3, "maxLength": 3 }, "metadata": { "description": "Refund metadata", "type": "object", "maxProperties": 20, "propertyNames": { "type": "string", "maxLength": 20 }, "additionalProperties": { "type": "string" } }, "reason": { "description": "Refund reason", "type": "string", "maxLength": 255 }, "status": { "$ref": "#/components/schemas/RefundStatusType" }, "refundedTime": { "description": "Refund processed time (epoch millisecond)", "type": "integer", "format": "int64" }, "createTime": { "description": "Refund creation time (epoch millisecond)", "type": "integer", "format": "int64" } } }, "RefundStatusType": { "description": "Refund status\n- pending Not refunded\n- refunded Refunded\n", "type": "string", "enum": [ "pending", "refunded" ] } }, "securitySchemes": { "bearerAuth": { "type": "http", "scheme": "bearer", "description": "API authentication is performed via Bearer auth using the secret key as the bearer token.\nThe secret key is a critical key that allows all API operations, so handle it with care.\n" }, "basicAuth": { "type": "http", "scheme": "basic", "description": "API authentication is performed via Basic auth using the secret key as the username and omitting the password.\nThe secret key is a critical key that allows all API operations, so handle it with care.\n" } } } } ``` # List refunds (https://elepay-docs.elestyle.workers.dev/openapi/refund/listChargesRefunds) Retrieves a list of refund information. **Page URL**: https://elepay-docs.elestyle.workers.dev/openapi/refund/listChargesRefunds **Endpoint**: GET /charges/{id}/refunds ```json { "openapi": "3.1.0", "info": { "version": "1.3.0", "title": "elepay API Reference", "description": "The elepay API is a REST-based payment API. It provides various capabilities for payment operations, such as processing payments and refunds.", "contact": { "name": "ELESTYLE, INC", "url": "https://elepay.io", "email": "support@elestyle.jp" } }, "servers": [ { "url": "https://api.elepay.io" } ], "security": [ { "bearerAuth": [] }, { "basicAuth": [] } ], "tags": [ { "name": "Refund" } ], "paths": { "/charges/{id}/refunds": { "get": { "tags": [ "Refund" ], "summary": "List refunds", "description": "Retrieves a list of refund information.", "operationId": "listChargesRefunds", "parameters": [ { "name": "id", "description": "Charge ID", "in": "path", "required": true, "schema": { "type": "string" } } ], "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/RefundsResponse" } } } } } } } }, "components": { "schemas": { "RefundsResponse": { "description": "Refund list", "type": "object", "properties": { "total": { "description": "Count", "type": "integer" }, "refunds": { "description": "Refund details", "type": "array", "items": { "$ref": "#/components/schemas/RefundDto" } } } }, "RefundDto": { "description": "Refund object", "type": "object", "properties": { "id": { "description": "Refund ID", "type": "string", "maxLength": 32 }, "object": { "description": "Object type", "type": "string", "default": "refund" }, "chargeId": { "description": "Charge ID", "type": "string", "maxLength": 32 }, "liveMode": { "description": "Whether this is live mode\n- false Test mode\n- true Live mode\n", "type": "boolean" }, "amount": { "description": "Refund amount. You can refund the full amount, or partially refund by specifying amount.", "type": "integer" }, "currency": { "description": "Currency code (ISO 4217)", "type": "string", "minLength": 3, "maxLength": 3 }, "metadata": { "description": "Refund metadata", "type": "object", "maxProperties": 20, "propertyNames": { "type": "string", "maxLength": 20 }, "additionalProperties": { "type": "string" } }, "reason": { "description": "Refund reason", "type": "string", "maxLength": 255 }, "status": { "$ref": "#/components/schemas/RefundStatusType" }, "refundedTime": { "description": "Refund processed time (epoch millisecond)", "type": "integer", "format": "int64" }, "createTime": { "description": "Refund creation time (epoch millisecond)", "type": "integer", "format": "int64" } } }, "RefundStatusType": { "description": "Refund status\n- pending Not refunded\n- refunded Refunded\n", "type": "string", "enum": [ "pending", "refunded" ] } }, "securitySchemes": { "bearerAuth": { "type": "http", "scheme": "bearer", "description": "API authentication is performed via Bearer auth using the secret key as the bearer token.\nThe secret key is a critical key that allows all API operations, so handle it with care.\n" }, "basicAuth": { "type": "http", "scheme": "basic", "description": "API authentication is performed via Basic auth using the secret key as the username and omitting the password.\nThe secret key is a critical key that allows all API operations, so handle it with care.\n" } } } } ``` # Retrieve refund (https://elepay-docs.elestyle.workers.dev/openapi/refund/retrieveChargeRefund) Retrieves detailed information about a refund. **Page URL**: https://elepay-docs.elestyle.workers.dev/openapi/refund/retrieveChargeRefund **Endpoint**: GET /charges/{id}/refunds/{refundId} ```json { "openapi": "3.1.0", "info": { "version": "1.3.0", "title": "elepay API Reference", "description": "The elepay API is a REST-based payment API. It provides various capabilities for payment operations, such as processing payments and refunds.", "contact": { "name": "ELESTYLE, INC", "url": "https://elepay.io", "email": "support@elestyle.jp" } }, "servers": [ { "url": "https://api.elepay.io" } ], "security": [ { "bearerAuth": [] }, { "basicAuth": [] } ], "tags": [ { "name": "Refund" } ], "paths": { "/charges/{id}/refunds/{refundId}": { "get": { "tags": [ "Refund" ], "summary": "Retrieve refund", "description": "Retrieves detailed information about a refund.", "operationId": "retrieveChargeRefund", "parameters": [ { "name": "id", "description": "Charge ID", "in": "path", "required": true, "schema": { "type": "string" } }, { "name": "refundId", "description": "Refund ID", "in": "path", "required": true, "schema": { "type": "string" } } ], "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/RefundDto" } } } } } } } }, "components": { "schemas": { "RefundDto": { "description": "Refund object", "type": "object", "properties": { "id": { "description": "Refund ID", "type": "string", "maxLength": 32 }, "object": { "description": "Object type", "type": "string", "default": "refund" }, "chargeId": { "description": "Charge ID", "type": "string", "maxLength": 32 }, "liveMode": { "description": "Whether this is live mode\n- false Test mode\n- true Live mode\n", "type": "boolean" }, "amount": { "description": "Refund amount. You can refund the full amount, or partially refund by specifying amount.", "type": "integer" }, "currency": { "description": "Currency code (ISO 4217)", "type": "string", "minLength": 3, "maxLength": 3 }, "metadata": { "description": "Refund metadata", "type": "object", "maxProperties": 20, "propertyNames": { "type": "string", "maxLength": 20 }, "additionalProperties": { "type": "string" } }, "reason": { "description": "Refund reason", "type": "string", "maxLength": 255 }, "status": { "$ref": "#/components/schemas/RefundStatusType" }, "refundedTime": { "description": "Refund processed time (epoch millisecond)", "type": "integer", "format": "int64" }, "createTime": { "description": "Refund creation time (epoch millisecond)", "type": "integer", "format": "int64" } } }, "RefundStatusType": { "description": "Refund status\n- pending Not refunded\n- refunded Refunded\n", "type": "string", "enum": [ "pending", "refunded" ] } }, "securitySchemes": { "bearerAuth": { "type": "http", "scheme": "bearer", "description": "API authentication is performed via Bearer auth using the secret key as the bearer token.\nThe secret key is a critical key that allows all API operations, so handle it with care.\n" }, "basicAuth": { "type": "http", "scheme": "basic", "description": "API authentication is performed via Basic auth using the secret key as the username and omitting the password.\nThe secret key is a critical key that allows all API operations, so handle it with care.\n" } } } } ``` # Cancel subscription (https://elepay-docs.elestyle.workers.dev/openapi/subscription/cancelSubscription) Cancels the subscription and ends it at the end of the current period. A canceled subscription cannot be restarted. A subscription that is being processed cannot be canceled. **Page URL**: https://elepay-docs.elestyle.workers.dev/openapi/subscription/cancelSubscription **Endpoint**: POST /subscriptions/{subscriptionId}/cancel ```json { "openapi": "3.1.0", "info": { "version": "1.3.0", "title": "elepay API Reference", "description": "The elepay API is a REST-based payment API. It provides various capabilities for payment operations, such as processing payments and refunds.", "contact": { "name": "ELESTYLE, INC", "url": "https://elepay.io", "email": "support@elestyle.jp" } }, "servers": [ { "url": "https://api.elepay.io" } ], "security": [ { "bearerAuth": [] }, { "basicAuth": [] } ], "tags": [ { "name": "Subscription" } ], "paths": { "/subscriptions/{subscriptionId}/cancel": { "post": { "tags": [ "Subscription" ], "summary": "Cancel subscription", "description": "Cancels the subscription and ends it at the end of the current period.\nA canceled subscription cannot be restarted.\nA subscription that is being processed cannot be canceled.\n", "operationId": "cancelSubscription", "parameters": [ { "name": "subscriptionId", "description": "Subscription ID", "in": "path", "required": true, "schema": { "type": "string" } } ], "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/SubscriptionDto" } } } } } } } }, "components": { "schemas": { "SubscriptionDto": { "description": "Subscription object", "type": "object", "properties": { "id": { "description": "Subscription ID", "type": "string", "maxLength": 32 }, "appId": { "description": "App ID", "type": "string", "maxLength": 32 }, "object": { "description": "Object type", "type": "string", "default": "subscription" }, "liveMode": { "description": "Whether this is live mode\n- false Test mode\n- true Live mode\n", "type": "boolean" }, "customerId": { "description": "Customer ID", "type": "string", "maxLength": 32 }, "customer": { "$ref": "#/components/schemas/CustomerDto" }, "nextChargeTime": { "description": "Next charge time (epoch millisecond)", "type": "integer", "format": "int64" }, "isCharging": { "description": "Whether it is being processed", "type": "boolean" }, "chargedPeriods": { "description": "Number of successful subscription charges", "type": "integer" }, "metadata": { "description": "Metadata", "type": "object", "maxProperties": 20, "propertyNames": { "type": "string", "maxLength": 20 }, "additionalProperties": { "type": "string" } }, "status": { "$ref": "#/components/schemas/SubscriptionStatusType" }, "createTime": { "description": "Creation time (epoch millisecond)", "type": "integer", "format": "int64" }, "updateTime": { "description": "Update time (epoch millisecond)", "type": "integer", "format": "int64" } } }, "CustomerDto": { "description": "Customer object", "properties": { "id": { "description": "Customer ID", "type": "string", "maxLength": 32 }, "object": { "description": "Object type", "type": "string", "default": "customer" }, "liveMode": { "description": "Whether this is live mode\n- false Test mode\n- true Live mode\n", "type": "boolean" }, "defaultSource": { "description": "Default customer source ID", "type": "string", "maxLength": 32 }, "name": { "description": "Name", "type": "string", "maxLength": 255 }, "description": { "description": "Description of the customer", "type": "string", "maxLength": 255 }, "email": { "description": "Email address", "type": "string", "maxLength": 255 }, "phone": { "description": "Phone number", "type": "string", "maxLength": 255 }, "remark": { "description": "Remarks", "type": "string" }, "operator": { "description": "Operator", "type": "string", "maxLength": 255 }, "status": { "$ref": "#/components/schemas/CustomerStatusType" }, "metadata": { "description": "Metadata", "type": "object", "maxProperties": 20, "propertyNames": { "type": "string", "maxLength": 20 }, "additionalProperties": { "type": "string" } }, "updateTime": { "description": "update time", "type": "integer", "format": "int64" } } }, "SubscriptionStatusType": { "description": "Subscription status\n- new New\n- active Active\n- past_due Past due\n- canceled Canceled\n", "type": "string", "enum": [ "new", "active", "past_due", "canceled" ] }, "CustomerStatusType": { "description": "Status\n", "type": "string", "enum": [ "active", "deleted" ] } }, "securitySchemes": { "bearerAuth": { "type": "http", "scheme": "bearer", "description": "API authentication is performed via Bearer auth using the secret key as the bearer token.\nThe secret key is a critical key that allows all API operations, so handle it with care.\n" }, "basicAuth": { "type": "http", "scheme": "basic", "description": "API authentication is performed via Basic auth using the secret key as the username and omitting the password.\nThe secret key is a critical key that allows all API operations, so handle it with care.\n" } } } } ``` # Create subscription (https://elepay-docs.elestyle.workers.dev/openapi/subscription/createSubscription) Creates a subscription. **Page URL**: https://elepay-docs.elestyle.workers.dev/openapi/subscription/createSubscription **Endpoint**: POST /subscriptions ```json { "openapi": "3.1.0", "info": { "version": "1.3.0", "title": "elepay API Reference", "description": "The elepay API is a REST-based payment API. It provides various capabilities for payment operations, such as processing payments and refunds.", "contact": { "name": "ELESTYLE, INC", "url": "https://elepay.io", "email": "support@elestyle.jp" } }, "servers": [ { "url": "https://api.elepay.io" } ], "security": [ { "bearerAuth": [] }, { "basicAuth": [] } ], "tags": [ { "name": "Subscription" } ], "paths": { "/subscriptions": { "post": { "tags": [ "Subscription" ], "summary": "Create subscription", "description": "Creates a subscription.", "operationId": "createSubscription", "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/SubscriptionReq" } } }, "required": true }, "responses": { "201": { "description": "OK", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/SubscriptionDto" } } } } } } } }, "components": { "schemas": { "SubscriptionReq": { "description": "Create subscription request", "type": "object", "required": [ "customerId" ], "properties": { "name": { "description": "Subscription name", "type": "string", "maxLength": 20 }, "customerId": { "description": "Customer ID", "type": "string", "maxLength": 32 }, "currency": { "description": "Currency code (ISO 4217)", "type": "string", "minLength": 3, "maxLength": 3, "default": "JPY" }, "amount": { "description": "Amount per billing period", "type": "integer" }, "interval": { "description": "Subscription interval type", "$ref": "#/components/schemas/SubscriptionIntervalType" }, "intervalSpan": { "description": "Interval span (how many intervals between charges)", "type": "integer", "default": 1 }, "initialAmount": { "description": "Fixed amount to pay before the first charge", "type": "integer" }, "firstChargeTime": { "description": "First charge time (epoch millisecond)", "type": "integer", "format": "int64" }, "metadata": { "description": "Metadata", "type": "object", "maxProperties": 20, "propertyNames": { "type": "string", "maxLength": 20 }, "additionalProperties": { "type": "string" } } } }, "SubscriptionDto": { "description": "Subscription object", "type": "object", "properties": { "id": { "description": "Subscription ID", "type": "string", "maxLength": 32 }, "appId": { "description": "App ID", "type": "string", "maxLength": 32 }, "object": { "description": "Object type", "type": "string", "default": "subscription" }, "liveMode": { "description": "Whether this is live mode\n- false Test mode\n- true Live mode\n", "type": "boolean" }, "customerId": { "description": "Customer ID", "type": "string", "maxLength": 32 }, "customer": { "$ref": "#/components/schemas/CustomerDto" }, "nextChargeTime": { "description": "Next charge time (epoch millisecond)", "type": "integer", "format": "int64" }, "isCharging": { "description": "Whether it is being processed", "type": "boolean" }, "chargedPeriods": { "description": "Number of successful subscription charges", "type": "integer" }, "metadata": { "description": "Metadata", "type": "object", "maxProperties": 20, "propertyNames": { "type": "string", "maxLength": 20 }, "additionalProperties": { "type": "string" } }, "status": { "$ref": "#/components/schemas/SubscriptionStatusType" }, "createTime": { "description": "Creation time (epoch millisecond)", "type": "integer", "format": "int64" }, "updateTime": { "description": "Update time (epoch millisecond)", "type": "integer", "format": "int64" } } }, "SubscriptionIntervalType": { "description": "Subscription interval type\n- day Once per day\n- week Once per week\n- month Once per month\n- year Once per year\n", "type": "string", "enum": [ "day", "week", "month", "year" ] }, "CustomerDto": { "description": "Customer object", "properties": { "id": { "description": "Customer ID", "type": "string", "maxLength": 32 }, "object": { "description": "Object type", "type": "string", "default": "customer" }, "liveMode": { "description": "Whether this is live mode\n- false Test mode\n- true Live mode\n", "type": "boolean" }, "defaultSource": { "description": "Default customer source ID", "type": "string", "maxLength": 32 }, "name": { "description": "Name", "type": "string", "maxLength": 255 }, "description": { "description": "Description of the customer", "type": "string", "maxLength": 255 }, "email": { "description": "Email address", "type": "string", "maxLength": 255 }, "phone": { "description": "Phone number", "type": "string", "maxLength": 255 }, "remark": { "description": "Remarks", "type": "string" }, "operator": { "description": "Operator", "type": "string", "maxLength": 255 }, "status": { "$ref": "#/components/schemas/CustomerStatusType" }, "metadata": { "description": "Metadata", "type": "object", "maxProperties": 20, "propertyNames": { "type": "string", "maxLength": 20 }, "additionalProperties": { "type": "string" } }, "updateTime": { "description": "update time", "type": "integer", "format": "int64" } } }, "SubscriptionStatusType": { "description": "Subscription status\n- new New\n- active Active\n- past_due Past due\n- canceled Canceled\n", "type": "string", "enum": [ "new", "active", "past_due", "canceled" ] }, "CustomerStatusType": { "description": "Status\n", "type": "string", "enum": [ "active", "deleted" ] } }, "securitySchemes": { "bearerAuth": { "type": "http", "scheme": "bearer", "description": "API authentication is performed via Bearer auth using the secret key as the bearer token.\nThe secret key is a critical key that allows all API operations, so handle it with care.\n" }, "basicAuth": { "type": "http", "scheme": "basic", "description": "API authentication is performed via Basic auth using the secret key as the username and omitting the password.\nThe secret key is a critical key that allows all API operations, so handle it with care.\n" } } } } ``` # List subscription periods (https://elepay-docs.elestyle.workers.dev/openapi/subscription/listSubscriptionPeriods) Retrieves a list of subscription period information. **Page URL**: https://elepay-docs.elestyle.workers.dev/openapi/subscription/listSubscriptionPeriods **Endpoint**: GET /subscriptions/{subscriptionId}/periods ```json { "openapi": "3.1.0", "info": { "version": "1.3.0", "title": "elepay API Reference", "description": "The elepay API is a REST-based payment API. It provides various capabilities for payment operations, such as processing payments and refunds.", "contact": { "name": "ELESTYLE, INC", "url": "https://elepay.io", "email": "support@elestyle.jp" } }, "servers": [ { "url": "https://api.elepay.io" } ], "security": [ { "bearerAuth": [] }, { "basicAuth": [] } ], "tags": [ { "name": "Subscription" } ], "paths": { "/subscriptions/{subscriptionId}/periods": { "get": { "tags": [ "Subscription" ], "summary": "List subscription periods", "description": "Retrieves a list of subscription period information.", "operationId": "listSubscriptionPeriods", "parameters": [ { "name": "subscriptionId", "description": "Subscription ID", "in": "path", "required": true, "schema": { "type": "string" } }, { "name": "limit", "description": "Maximum number of items", "in": "query", "required": false, "schema": { "type": "integer", "minimum": 0, "maximum": 100, "default": 20 } }, { "name": "offset", "description": "Starting offset", "in": "query", "schema": { "type": "integer", "default": 0 } } ], "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/SubscriptionPeriodsResponse" } } } } } } } }, "components": { "schemas": { "SubscriptionPeriodsResponse": { "description": "Subscription period list", "type": "object", "properties": { "total": { "description": "Count", "type": "integer" }, "periods": { "description": "Subscription period details", "type": "array", "items": { "$ref": "#/components/schemas/SubscriptionPeriodDto" } } } }, "SubscriptionPeriodDto": { "description": "Subscription period information object", "type": "object", "properties": { "id": { "description": "Subscription Period ID", "type": "string", "maxLength": 32 }, "object": { "description": "Object type", "type": "string", "default": "subscription_period" }, "startTime": { "description": "Period start time (epoch millisecond)", "type": "integer", "format": "int64" }, "endTime": { "description": "Period end time (epoch millisecond)", "type": "integer", "format": "int64" }, "charge": { "$ref": "#/components/schemas/ChargeDto" } } }, "ChargeDto": { "type": "object", "description": "Payment object", "properties": { "id": { "description": "Charge ID", "type": "string", "maxLength": 32 }, "appId": { "description": "App ID", "type": "string", "maxLength": 32 }, "object": { "description": "Object type", "type": "string", "default": "charge" }, "liveMode": { "description": "Whether this is live mode\n- false Test mode\n- true Live mode\n", "type": "boolean" }, "amount": { "description": "Payment amount", "type": "integer" }, "authorizeAmount": { "description": "Pre-authorization amount", "type": "integer" }, "currency": { "description": "Currency code (ISO 4217)", "type": "string", "minLength": 3, "maxLength": 3, "default": "JPY" }, "authorize": { "description": "Pre-authorization flag", "type": "boolean" }, "paymentMethod": { "$ref": "#/components/schemas/PaymentMethodType" }, "resource": { "$ref": "#/components/schemas/ResourceType" }, "orderNo": { "description": "Merchant system order number, e.g., order number, payment ID, etc.", "type": "string", "maxLength": 50 }, "description": { "description": "Payment description", "type": "string", "maxLength": 1024 }, "location": { "$ref": "#/components/schemas/ChargeLocationDto" }, "extra": { "description": "Payment extra data", "type": "object", "maxProperties": 20, "propertyNames": { "type": "string", "maxLength": 20 }, "additionalProperties": { "type": "string" } }, "metadata": { "description": "Payment metadata", "type": "object", "maxProperties": 20, "propertyNames": { "type": "string", "maxLength": 20 }, "additionalProperties": { "type": "string" } }, "cardInfo": { "$ref": "#/components/schemas/CardInfo" }, "voucherNo": { "description": "Provider payment voucher number", "type": "string", "maxLength": 32 }, "clientIp": { "description": "Client IP address", "type": "string", "maxLength": 45 }, "paid": { "description": "Paid flag", "type": "boolean" }, "refunded": { "description": "Refunded flag", "type": "boolean" }, "disputed": { "description": "Disputed flag", "type": "boolean" }, "refunds": { "$ref": "#/components/schemas/RefundsDto" }, "status": { "$ref": "#/components/schemas/ChargeStatusType" }, "codeContent": { "description": "Merchant-presented QR code (only when resource is mpm)", "type": "string" }, "credential": { "description": "Client SDK credentials", "type": "string" }, "paidTime": { "description": "Payment time (epoch millisecond)", "type": "integer", "format": "int64" }, "refundTime": { "description": "Refund time (epoch millisecond)", "type": "integer", "format": "int64" }, "expiryTime": { "description": "Payment request expiry time (epoch millisecond)", "type": "integer", "format": "int64" }, "settleTime": { "description": "Payment settlement time (epoch millisecond)", "type": "integer", "format": "int64" }, "createTime": { "description": "Payment creation time (epoch millisecond)", "type": "integer", "format": "int64" } } }, "PaymentMethodType": { "description": "Payment method\n- auto Auto detection (available for CPM payments only)\n- alipay Alipay\n- alipayhk AlipayHK\n- alipayplus Alipay+\n- amazonpay Amazon Pay\n- applepay Apple Pay\n- applepay_cn Apple Pay (China)\n- atokara Atokara\n- atone atone (pay next month at convenience stores)\n- aupay au Pay\n- clicktopay Click To Pay\n- banktransfer Bank transfer\n- creditcard Credit card\n- dana DANA\n- docomopay d Payment\n- ezlink EZ-Link\n- felica E-money\n- felica_id iD\n- felica_quickpay QUICPay\n- felica_transport_ic Transit IC card\n- gcash GCash\n- ginkopay Bank Pay\n- googlepay Google Pay\n- jcoinpay J-Coin Pay\n- jkopay JKOPAY\n- kakaopay Kakao Pay\n- konbini Convenience store payment\n- linepay LINE Pay\n- merpay Merpay\n- origamipay Origami Pay\n- paidy Paidy (pay next month)\n- paypal PayPal\n- paypay PayPay\n- pxpayplus AllPay\n- rakutenpay Rakuten Pay\n- smartcode Smart Code\n- tng Touch 'n Go eWallet\n- truemoney TrueMoney\n- unionpay UnionPay QuickPass\n- wechatpay Wechat Pay\n- aeonpay AEON Pay\n- rabbitlinepay Rabbit LINE Pay\n- bpi BPI\n- boost Boost\n- hellomoney HelloMoney by AUB\n- tosspay Toss Pay\n- naverpay Naver Pay\n- wellwa WellWa Points\n- grabpay Grab Pay\n- momopay Momo Pay\n- promptpay Prompt Pay\n- wovenpay Woven City Pay\n- ezopay EZO Pay\n", "type": "string", "enum": [ "alipay", "alipayhk", "alipayplus", "amazonpay", "applepay", "applepay_cn", "atokara", "atone", "aupay", "clicktopay", "banktransfer", "creditcard", "dana", "docomopay", "ezlink", "felica", "felica_id", "felica_quickpay", "felica_transport_ic", "gcash", "ginkopay", "googlepay", "jcoinpay", "jkopay", "kakaopay", "konbini", "linepay", "merpay", "origamipay", "paidy", "paypal", "paypay", "pxpayplus", "rakutenpay", "smartcode", "tng", "truemoney", "unionpay", "wechatpay", "aeonpay", "rabbitlinepay", "bpi", "boost", "hellomoney", "tosspay", "naverpay", "wellwa", "grabpay", "momopay", "promptpay", "wovenpay", "ezopay", "auto" ] }, "ResourceType": { "description": "Payment resource\n- web Web browser\n- ios iOS native app\n- android Android native app\n- liff LINE LIFF app\n- mini WeChat Mini Program\n- cpm CPM payment (customer-presented QR code)\n- mpm MPM payment (merchant-presented QR code)\n- reader Card reader payment (reader device required)\n- posapp POS app payment (POS app integration required)\n", "type": "string", "enum": [ "web", "ios", "android", "liff", "mini", "cpm", "mpm", "reader", "posapp" ] }, "ChargeLocationDto": { "description": "Location object", "type": "object", "properties": { "id": { "description": "Location ID", "type": "string", "maxLength": 32 }, "name": { "$ref": "#/components/schemas/StringTransliterationDto" }, "tel": { "description": "Phone number", "type": "string", "maxLength": 20 }, "zip": { "description": "Postal code", "type": "string", "maxLength": 8 }, "address": { "$ref": "#/components/schemas/AddressTransliterationDto" }, "latitude": { "description": "Latitude", "type": "number", "format": "double" }, "longitude": { "description": "Longitude", "type": "number", "format": "double" }, "note": { "description": "Remarks", "type": "string" }, "status": { "$ref": "#/components/schemas/ChargeLocationStatusType" } } }, "CardInfo": { "type": "object", "description": "Card and wallet information", "properties": { "brand": { "$ref": "#/components/schemas/CardBrandType" }, "last4": { "description": "Last 4 digits of the card number", "type": "string" }, "expMonth": { "description": "Expiration month", "type": "integer" }, "expYear": { "description": "Expiration year", "type": "integer" }, "name": { "description": "Cardholder name", "type": "string" }, "issuerCode": { "description": "Card issuer code (GMO payment only)\nComplies with GMO-PG \"destination card company code\"\n", "type": "string" }, "issuerName": { "description": "Card issuer name (GMO payment only)\nCompany name corresponding to GMO-PG \"destination card company code\"\n", "type": "string" }, "wallet": { "description": "Wallet information", "type": "string" }, "walletApp": { "description": "Wallet app information (for paymentMethod alipayplus or smartcode, the actual app name used)", "type": "string" }, "repaymentType": { "description": "Repayment type\n- 1 One-time payment\n- revolving Revolving payment\n- bonus_one_time Bonus one-time payment\n- 2 Two-installment payment\n- 3 Three-installment payment\n", "type": "string" }, "approvalCode": { "description": "Authorization code", "type": "string" }, "threeDSecure": { "description": "3D Secure enabled", "type": "boolean" }, "threeDSecureVersion": { "description": "3D Secure version", "type": "string" }, "threeDSecureDetail": { "description": "3D Secure details", "type": "string" }, "businessType": { "description": "Business type", "type": "string" }, "konbiniScanTime": { "description": "Last scan time by the convenience store", "type": "integer", "format": "int64" }, "konbiniType": { "description": "Convenience store type used for the actual payment\n- unknown\n- seven_eleven\n- lawson\n- familymart\n- ministop\n- seicomart\n", "type": "string" }, "receivedAmount": { "description": "Actual amount received from the convenience store or bank", "type": "integer" }, "receivedTime": { "description": "Actual time received by the convenience store or bank; this value may contain only the date (midnight).", "type": "integer", "format": "int64" }, "bankUserCode": { "description": "Bank transfer user code", "type": "string" }, "bankUserName": { "description": "Bank transfer user name", "type": "string" }, "bankName": { "description": "Receiving bank name", "type": "string" }, "bankBranchName": { "description": "Receiving bank branch name", "type": "string" }, "bankAccountNo": { "description": "Receiving bank account number", "type": "string" }, "billingNo": { "description": "Billing number (for payment station)", "type": "string" } } }, "RefundsDto": { "description": "Refund summary. If multiple refunds are issued, refund details are summarized and returned.", "type": "object", "properties": { "amount": { "description": "Total refunded amount", "type": "integer" }, "totalCount": { "description": "Number of refunds", "type": "integer" }, "data": { "description": "Refund details", "type": "array", "items": { "$ref": "#/components/schemas/RefundDto" } } } }, "ChargeStatusType": { "description": "Payment status\n- pending Unpaid\n- waiting Waiting for payment (information entered)\n- notified Preparing for payment (notified)\n- uncaptured Authorized (not captured)\n- captured Paid\n- partially_refunded Partially refunded\n- refunded Refunded\n- amount_mismatch Amount mismatch\n- revoked Canceled\n- failed Payment failed\n", "type": "string", "enum": [ "pending", "waiting", "notified", "uncaptured", "captured", "partially_refunded", "refunded", "amount_mismatch", "revoked", "failed" ] }, "StringTransliterationDto": { "description": "Name transliteration object", "type": "object", "properties": { "kanji": { "description": "Kanji", "type": "string" }, "kana": { "description": "Kana", "type": "string" }, "romaji": { "description": "Romaji", "type": "string" } } }, "AddressTransliterationDto": { "description": "Address transliteration object", "type": "object", "properties": { "kanji": { "$ref": "#/components/schemas/AddressDto" }, "kana": { "$ref": "#/components/schemas/AddressDto" }, "romaji": { "$ref": "#/components/schemas/AddressDto" } } }, "ChargeLocationStatusType": { "description": "Location status\n- active Active\n- submitted Submitted\n", "type": "string", "enum": [ "active", "submitted" ] }, "CardBrandType": { "description": "- unknown\n- visa\n- mastercard\n- amex\n- jcb\n- diners\n- unionpay\n- discover\n- felica\n- seven_eleven\n- lawson\n- familymart\n- ministop\n- seicomart\n", "type": "string" }, "RefundDto": { "description": "Refund object", "type": "object", "properties": { "id": { "description": "Refund ID", "type": "string", "maxLength": 32 }, "object": { "description": "Object type", "type": "string", "default": "refund" }, "chargeId": { "description": "Charge ID", "type": "string", "maxLength": 32 }, "liveMode": { "description": "Whether this is live mode\n- false Test mode\n- true Live mode\n", "type": "boolean" }, "amount": { "description": "Refund amount. You can refund the full amount, or partially refund by specifying amount.", "type": "integer" }, "currency": { "description": "Currency code (ISO 4217)", "type": "string", "minLength": 3, "maxLength": 3 }, "metadata": { "description": "Refund metadata", "type": "object", "maxProperties": 20, "propertyNames": { "type": "string", "maxLength": 20 }, "additionalProperties": { "type": "string" } }, "reason": { "description": "Refund reason", "type": "string", "maxLength": 255 }, "status": { "$ref": "#/components/schemas/RefundStatusType" }, "refundedTime": { "description": "Refund processed time (epoch millisecond)", "type": "integer", "format": "int64" }, "createTime": { "description": "Refund creation time (epoch millisecond)", "type": "integer", "format": "int64" } } }, "AddressDto": { "description": "Address object", "type": "object", "properties": { "pref": { "description": "Prefecture", "type": "string" }, "city": { "description": "City/Municipality", "type": "string" }, "town": { "description": "Town", "type": "string" }, "address1": { "description": "Address line 1", "type": "string" }, "address2": { "description": "Address line 2", "type": "string" } } }, "RefundStatusType": { "description": "Refund status\n- pending Not refunded\n- refunded Refunded\n", "type": "string", "enum": [ "pending", "refunded" ] } }, "securitySchemes": { "bearerAuth": { "type": "http", "scheme": "bearer", "description": "API authentication is performed via Bearer auth using the secret key as the bearer token.\nThe secret key is a critical key that allows all API operations, so handle it with care.\n" }, "basicAuth": { "type": "http", "scheme": "basic", "description": "API authentication is performed via Basic auth using the secret key as the username and omitting the password.\nThe secret key is a critical key that allows all API operations, so handle it with care.\n" } } } } ``` # List subscriptions (https://elepay-docs.elestyle.workers.dev/openapi/subscription/listSubscriptions) Retrieves a list of subscriptions. **Page URL**: https://elepay-docs.elestyle.workers.dev/openapi/subscription/listSubscriptions **Endpoint**: GET /subscriptions ```json { "openapi": "3.1.0", "info": { "version": "1.3.0", "title": "elepay API Reference", "description": "The elepay API is a REST-based payment API. It provides various capabilities for payment operations, such as processing payments and refunds.", "contact": { "name": "ELESTYLE, INC", "url": "https://elepay.io", "email": "support@elestyle.jp" } }, "servers": [ { "url": "https://api.elepay.io" } ], "security": [ { "bearerAuth": [] }, { "basicAuth": [] } ], "tags": [ { "name": "Subscription" } ], "paths": { "/subscriptions": { "get": { "tags": [ "Subscription" ], "summary": "List subscriptions", "description": "Retrieves a list of subscriptions.", "operationId": "listSubscriptions", "parameters": [ { "name": "customerId", "description": "Customer ID", "in": "query", "required": false, "schema": { "type": "string" } }, { "name": "from", "description": "Start time (epoch millisecond). Retrieves data created on or after the specified time.", "in": "query", "schema": { "type": "integer", "format": "int64" } }, { "name": "to", "description": "End time (epoch millisecond). Retrieves data created on or before the specified time.", "in": "query", "schema": { "type": "integer", "format": "int64" } }, { "name": "status", "description": "Subscription status", "in": "query", "required": false, "schema": { "$ref": "#/components/schemas/SubscriptionStatusType" } }, { "name": "limit", "description": "Maximum number of items", "in": "query", "required": false, "schema": { "type": "integer", "maximum": 100, "default": 20 } }, { "name": "offset", "description": "Starting offset", "in": "query", "schema": { "type": "integer", "default": 0 } } ], "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/SubscriptionsResponse" } } } } } } } }, "components": { "schemas": { "SubscriptionStatusType": { "description": "Subscription status\n- new New\n- active Active\n- past_due Past due\n- canceled Canceled\n", "type": "string", "enum": [ "new", "active", "past_due", "canceled" ] }, "SubscriptionsResponse": { "description": "Subscription list", "type": "object", "properties": { "total": { "description": "Count", "type": "integer" }, "subscriptions": { "description": "Subscription details", "type": "array", "items": { "$ref": "#/components/schemas/SubscriptionDto" } } } }, "SubscriptionDto": { "description": "Subscription object", "type": "object", "properties": { "id": { "description": "Subscription ID", "type": "string", "maxLength": 32 }, "appId": { "description": "App ID", "type": "string", "maxLength": 32 }, "object": { "description": "Object type", "type": "string", "default": "subscription" }, "liveMode": { "description": "Whether this is live mode\n- false Test mode\n- true Live mode\n", "type": "boolean" }, "customerId": { "description": "Customer ID", "type": "string", "maxLength": 32 }, "customer": { "$ref": "#/components/schemas/CustomerDto" }, "nextChargeTime": { "description": "Next charge time (epoch millisecond)", "type": "integer", "format": "int64" }, "isCharging": { "description": "Whether it is being processed", "type": "boolean" }, "chargedPeriods": { "description": "Number of successful subscription charges", "type": "integer" }, "metadata": { "description": "Metadata", "type": "object", "maxProperties": 20, "propertyNames": { "type": "string", "maxLength": 20 }, "additionalProperties": { "type": "string" } }, "status": { "$ref": "#/components/schemas/SubscriptionStatusType" }, "createTime": { "description": "Creation time (epoch millisecond)", "type": "integer", "format": "int64" }, "updateTime": { "description": "Update time (epoch millisecond)", "type": "integer", "format": "int64" } } }, "CustomerDto": { "description": "Customer object", "properties": { "id": { "description": "Customer ID", "type": "string", "maxLength": 32 }, "object": { "description": "Object type", "type": "string", "default": "customer" }, "liveMode": { "description": "Whether this is live mode\n- false Test mode\n- true Live mode\n", "type": "boolean" }, "defaultSource": { "description": "Default customer source ID", "type": "string", "maxLength": 32 }, "name": { "description": "Name", "type": "string", "maxLength": 255 }, "description": { "description": "Description of the customer", "type": "string", "maxLength": 255 }, "email": { "description": "Email address", "type": "string", "maxLength": 255 }, "phone": { "description": "Phone number", "type": "string", "maxLength": 255 }, "remark": { "description": "Remarks", "type": "string" }, "operator": { "description": "Operator", "type": "string", "maxLength": 255 }, "status": { "$ref": "#/components/schemas/CustomerStatusType" }, "metadata": { "description": "Metadata", "type": "object", "maxProperties": 20, "propertyNames": { "type": "string", "maxLength": 20 }, "additionalProperties": { "type": "string" } }, "updateTime": { "description": "update time", "type": "integer", "format": "int64" } } }, "CustomerStatusType": { "description": "Status\n", "type": "string", "enum": [ "active", "deleted" ] } }, "securitySchemes": { "bearerAuth": { "type": "http", "scheme": "bearer", "description": "API authentication is performed via Bearer auth using the secret key as the bearer token.\nThe secret key is a critical key that allows all API operations, so handle it with care.\n" }, "basicAuth": { "type": "http", "scheme": "basic", "description": "API authentication is performed via Basic auth using the secret key as the username and omitting the password.\nThe secret key is a critical key that allows all API operations, so handle it with care.\n" } } } } ``` # Resume subscription (https://elepay-docs.elestyle.workers.dev/openapi/subscription/resumeSubscription) Resumes a past due (status=past\_due) subscription. **Page URL**: https://elepay-docs.elestyle.workers.dev/openapi/subscription/resumeSubscription **Endpoint**: POST /subscriptions/{subscriptionId}/resume ```json { "openapi": "3.1.0", "info": { "version": "1.3.0", "title": "elepay API Reference", "description": "The elepay API is a REST-based payment API. It provides various capabilities for payment operations, such as processing payments and refunds.", "contact": { "name": "ELESTYLE, INC", "url": "https://elepay.io", "email": "support@elestyle.jp" } }, "servers": [ { "url": "https://api.elepay.io" } ], "security": [ { "bearerAuth": [] }, { "basicAuth": [] } ], "tags": [ { "name": "Subscription" } ], "paths": { "/subscriptions/{subscriptionId}/resume": { "post": { "tags": [ "Subscription" ], "summary": "Resume subscription", "description": "Resumes a past due (status=past_due) subscription.\n", "operationId": "resumeSubscription", "parameters": [ { "name": "subscriptionId", "description": "Subscription ID", "in": "path", "required": true, "schema": { "type": "string" } } ], "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/SubscriptionDto" } } } } } } } }, "components": { "schemas": { "SubscriptionDto": { "description": "Subscription object", "type": "object", "properties": { "id": { "description": "Subscription ID", "type": "string", "maxLength": 32 }, "appId": { "description": "App ID", "type": "string", "maxLength": 32 }, "object": { "description": "Object type", "type": "string", "default": "subscription" }, "liveMode": { "description": "Whether this is live mode\n- false Test mode\n- true Live mode\n", "type": "boolean" }, "customerId": { "description": "Customer ID", "type": "string", "maxLength": 32 }, "customer": { "$ref": "#/components/schemas/CustomerDto" }, "nextChargeTime": { "description": "Next charge time (epoch millisecond)", "type": "integer", "format": "int64" }, "isCharging": { "description": "Whether it is being processed", "type": "boolean" }, "chargedPeriods": { "description": "Number of successful subscription charges", "type": "integer" }, "metadata": { "description": "Metadata", "type": "object", "maxProperties": 20, "propertyNames": { "type": "string", "maxLength": 20 }, "additionalProperties": { "type": "string" } }, "status": { "$ref": "#/components/schemas/SubscriptionStatusType" }, "createTime": { "description": "Creation time (epoch millisecond)", "type": "integer", "format": "int64" }, "updateTime": { "description": "Update time (epoch millisecond)", "type": "integer", "format": "int64" } } }, "CustomerDto": { "description": "Customer object", "properties": { "id": { "description": "Customer ID", "type": "string", "maxLength": 32 }, "object": { "description": "Object type", "type": "string", "default": "customer" }, "liveMode": { "description": "Whether this is live mode\n- false Test mode\n- true Live mode\n", "type": "boolean" }, "defaultSource": { "description": "Default customer source ID", "type": "string", "maxLength": 32 }, "name": { "description": "Name", "type": "string", "maxLength": 255 }, "description": { "description": "Description of the customer", "type": "string", "maxLength": 255 }, "email": { "description": "Email address", "type": "string", "maxLength": 255 }, "phone": { "description": "Phone number", "type": "string", "maxLength": 255 }, "remark": { "description": "Remarks", "type": "string" }, "operator": { "description": "Operator", "type": "string", "maxLength": 255 }, "status": { "$ref": "#/components/schemas/CustomerStatusType" }, "metadata": { "description": "Metadata", "type": "object", "maxProperties": 20, "propertyNames": { "type": "string", "maxLength": 20 }, "additionalProperties": { "type": "string" } }, "updateTime": { "description": "update time", "type": "integer", "format": "int64" } } }, "SubscriptionStatusType": { "description": "Subscription status\n- new New\n- active Active\n- past_due Past due\n- canceled Canceled\n", "type": "string", "enum": [ "new", "active", "past_due", "canceled" ] }, "CustomerStatusType": { "description": "Status\n", "type": "string", "enum": [ "active", "deleted" ] } }, "securitySchemes": { "bearerAuth": { "type": "http", "scheme": "bearer", "description": "API authentication is performed via Bearer auth using the secret key as the bearer token.\nThe secret key is a critical key that allows all API operations, so handle it with care.\n" }, "basicAuth": { "type": "http", "scheme": "basic", "description": "API authentication is performed via Basic auth using the secret key as the username and omitting the password.\nThe secret key is a critical key that allows all API operations, so handle it with care.\n" } } } } ``` # Retrieve subscription (https://elepay-docs.elestyle.workers.dev/openapi/subscription/retrieveSubscription) Retrieves subscription information. **Page URL**: https://elepay-docs.elestyle.workers.dev/openapi/subscription/retrieveSubscription **Endpoint**: GET /subscriptions/{subscriptionId} ```json { "openapi": "3.1.0", "info": { "version": "1.3.0", "title": "elepay API Reference", "description": "The elepay API is a REST-based payment API. It provides various capabilities for payment operations, such as processing payments and refunds.", "contact": { "name": "ELESTYLE, INC", "url": "https://elepay.io", "email": "support@elestyle.jp" } }, "servers": [ { "url": "https://api.elepay.io" } ], "security": [ { "bearerAuth": [] }, { "basicAuth": [] } ], "tags": [ { "name": "Subscription" } ], "paths": { "/subscriptions/{subscriptionId}": { "get": { "tags": [ "Subscription" ], "summary": "Retrieve subscription", "description": "Retrieves subscription information.", "operationId": "retrieveSubscription", "parameters": [ { "name": "subscriptionId", "description": "Subscription ID", "in": "path", "required": true, "schema": { "type": "string" } } ], "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/SubscriptionDto" } } } } } } } }, "components": { "schemas": { "SubscriptionDto": { "description": "Subscription object", "type": "object", "properties": { "id": { "description": "Subscription ID", "type": "string", "maxLength": 32 }, "appId": { "description": "App ID", "type": "string", "maxLength": 32 }, "object": { "description": "Object type", "type": "string", "default": "subscription" }, "liveMode": { "description": "Whether this is live mode\n- false Test mode\n- true Live mode\n", "type": "boolean" }, "customerId": { "description": "Customer ID", "type": "string", "maxLength": 32 }, "customer": { "$ref": "#/components/schemas/CustomerDto" }, "nextChargeTime": { "description": "Next charge time (epoch millisecond)", "type": "integer", "format": "int64" }, "isCharging": { "description": "Whether it is being processed", "type": "boolean" }, "chargedPeriods": { "description": "Number of successful subscription charges", "type": "integer" }, "metadata": { "description": "Metadata", "type": "object", "maxProperties": 20, "propertyNames": { "type": "string", "maxLength": 20 }, "additionalProperties": { "type": "string" } }, "status": { "$ref": "#/components/schemas/SubscriptionStatusType" }, "createTime": { "description": "Creation time (epoch millisecond)", "type": "integer", "format": "int64" }, "updateTime": { "description": "Update time (epoch millisecond)", "type": "integer", "format": "int64" } } }, "CustomerDto": { "description": "Customer object", "properties": { "id": { "description": "Customer ID", "type": "string", "maxLength": 32 }, "object": { "description": "Object type", "type": "string", "default": "customer" }, "liveMode": { "description": "Whether this is live mode\n- false Test mode\n- true Live mode\n", "type": "boolean" }, "defaultSource": { "description": "Default customer source ID", "type": "string", "maxLength": 32 }, "name": { "description": "Name", "type": "string", "maxLength": 255 }, "description": { "description": "Description of the customer", "type": "string", "maxLength": 255 }, "email": { "description": "Email address", "type": "string", "maxLength": 255 }, "phone": { "description": "Phone number", "type": "string", "maxLength": 255 }, "remark": { "description": "Remarks", "type": "string" }, "operator": { "description": "Operator", "type": "string", "maxLength": 255 }, "status": { "$ref": "#/components/schemas/CustomerStatusType" }, "metadata": { "description": "Metadata", "type": "object", "maxProperties": 20, "propertyNames": { "type": "string", "maxLength": 20 }, "additionalProperties": { "type": "string" } }, "updateTime": { "description": "update time", "type": "integer", "format": "int64" } } }, "SubscriptionStatusType": { "description": "Subscription status\n- new New\n- active Active\n- past_due Past due\n- canceled Canceled\n", "type": "string", "enum": [ "new", "active", "past_due", "canceled" ] }, "CustomerStatusType": { "description": "Status\n", "type": "string", "enum": [ "active", "deleted" ] } }, "securitySchemes": { "bearerAuth": { "type": "http", "scheme": "bearer", "description": "API authentication is performed via Bearer auth using the secret key as the bearer token.\nThe secret key is a critical key that allows all API operations, so handle it with care.\n" }, "basicAuth": { "type": "http", "scheme": "basic", "description": "API authentication is performed via Basic auth using the secret key as the username and omitting the password.\nThe secret key is a critical key that allows all API operations, so handle it with care.\n" } } } } ``` # Start subscription (https://elepay-docs.elestyle.workers.dev/openapi/subscription/startSubscription) Starts a new (status=new) subscription. **Page URL**: https://elepay-docs.elestyle.workers.dev/openapi/subscription/startSubscription **Endpoint**: POST /subscriptions/{subscriptionId}/start ```json { "openapi": "3.1.0", "info": { "version": "1.3.0", "title": "elepay API Reference", "description": "The elepay API is a REST-based payment API. It provides various capabilities for payment operations, such as processing payments and refunds.", "contact": { "name": "ELESTYLE, INC", "url": "https://elepay.io", "email": "support@elestyle.jp" } }, "servers": [ { "url": "https://api.elepay.io" } ], "security": [ { "bearerAuth": [] }, { "basicAuth": [] } ], "tags": [ { "name": "Subscription" } ], "paths": { "/subscriptions/{subscriptionId}/start": { "post": { "tags": [ "Subscription" ], "summary": "Start subscription", "description": "Starts a new (status=new) subscription.\n", "operationId": "startSubscription", "parameters": [ { "name": "subscriptionId", "description": "Subscription ID", "in": "path", "required": true, "schema": { "type": "string" } } ], "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/SubscriptionDto" } } } } } } } }, "components": { "schemas": { "SubscriptionDto": { "description": "Subscription object", "type": "object", "properties": { "id": { "description": "Subscription ID", "type": "string", "maxLength": 32 }, "appId": { "description": "App ID", "type": "string", "maxLength": 32 }, "object": { "description": "Object type", "type": "string", "default": "subscription" }, "liveMode": { "description": "Whether this is live mode\n- false Test mode\n- true Live mode\n", "type": "boolean" }, "customerId": { "description": "Customer ID", "type": "string", "maxLength": 32 }, "customer": { "$ref": "#/components/schemas/CustomerDto" }, "nextChargeTime": { "description": "Next charge time (epoch millisecond)", "type": "integer", "format": "int64" }, "isCharging": { "description": "Whether it is being processed", "type": "boolean" }, "chargedPeriods": { "description": "Number of successful subscription charges", "type": "integer" }, "metadata": { "description": "Metadata", "type": "object", "maxProperties": 20, "propertyNames": { "type": "string", "maxLength": 20 }, "additionalProperties": { "type": "string" } }, "status": { "$ref": "#/components/schemas/SubscriptionStatusType" }, "createTime": { "description": "Creation time (epoch millisecond)", "type": "integer", "format": "int64" }, "updateTime": { "description": "Update time (epoch millisecond)", "type": "integer", "format": "int64" } } }, "CustomerDto": { "description": "Customer object", "properties": { "id": { "description": "Customer ID", "type": "string", "maxLength": 32 }, "object": { "description": "Object type", "type": "string", "default": "customer" }, "liveMode": { "description": "Whether this is live mode\n- false Test mode\n- true Live mode\n", "type": "boolean" }, "defaultSource": { "description": "Default customer source ID", "type": "string", "maxLength": 32 }, "name": { "description": "Name", "type": "string", "maxLength": 255 }, "description": { "description": "Description of the customer", "type": "string", "maxLength": 255 }, "email": { "description": "Email address", "type": "string", "maxLength": 255 }, "phone": { "description": "Phone number", "type": "string", "maxLength": 255 }, "remark": { "description": "Remarks", "type": "string" }, "operator": { "description": "Operator", "type": "string", "maxLength": 255 }, "status": { "$ref": "#/components/schemas/CustomerStatusType" }, "metadata": { "description": "Metadata", "type": "object", "maxProperties": 20, "propertyNames": { "type": "string", "maxLength": 20 }, "additionalProperties": { "type": "string" } }, "updateTime": { "description": "update time", "type": "integer", "format": "int64" } } }, "SubscriptionStatusType": { "description": "Subscription status\n- new New\n- active Active\n- past_due Past due\n- canceled Canceled\n", "type": "string", "enum": [ "new", "active", "past_due", "canceled" ] }, "CustomerStatusType": { "description": "Status\n", "type": "string", "enum": [ "active", "deleted" ] } }, "securitySchemes": { "bearerAuth": { "type": "http", "scheme": "bearer", "description": "API authentication is performed via Bearer auth using the secret key as the bearer token.\nThe secret key is a critical key that allows all API operations, so handle it with care.\n" }, "basicAuth": { "type": "http", "scheme": "basic", "description": "API authentication is performed via Basic auth using the secret key as the username and omitting the password.\nThe secret key is a critical key that allows all API operations, so handle it with care.\n" } } } } ``` # Update subscription (https://elepay-docs.elestyle.workers.dev/openapi/subscription/updateSubscription) Updates a subscription. **Page URL**: https://elepay-docs.elestyle.workers.dev/openapi/subscription/updateSubscription **Endpoint**: POST /subscriptions/{subscriptionId} ```json { "openapi": "3.1.0", "info": { "version": "1.3.0", "title": "elepay API Reference", "description": "The elepay API is a REST-based payment API. It provides various capabilities for payment operations, such as processing payments and refunds.", "contact": { "name": "ELESTYLE, INC", "url": "https://elepay.io", "email": "support@elestyle.jp" } }, "servers": [ { "url": "https://api.elepay.io" } ], "security": [ { "bearerAuth": [] }, { "basicAuth": [] } ], "tags": [ { "name": "Subscription" } ], "paths": { "/subscriptions/{subscriptionId}": { "post": { "tags": [ "Subscription" ], "summary": "Update subscription", "description": "Updates a subscription.", "operationId": "updateSubscription", "parameters": [ { "name": "subscriptionId", "description": "Subscription ID", "in": "path", "required": true, "schema": { "type": "string" } } ], "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/SubscriptionUpdateReq" } } }, "required": true }, "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/SubscriptionDto" } } } } } } } }, "components": { "schemas": { "SubscriptionUpdateReq": { "description": "Update subscription request", "type": "object", "properties": { "metadata": { "description": "Metadata", "type": "object", "maxProperties": 20, "propertyNames": { "type": "string", "maxLength": 20 }, "additionalProperties": { "type": "string" } } } }, "SubscriptionDto": { "description": "Subscription object", "type": "object", "properties": { "id": { "description": "Subscription ID", "type": "string", "maxLength": 32 }, "appId": { "description": "App ID", "type": "string", "maxLength": 32 }, "object": { "description": "Object type", "type": "string", "default": "subscription" }, "liveMode": { "description": "Whether this is live mode\n- false Test mode\n- true Live mode\n", "type": "boolean" }, "customerId": { "description": "Customer ID", "type": "string", "maxLength": 32 }, "customer": { "$ref": "#/components/schemas/CustomerDto" }, "nextChargeTime": { "description": "Next charge time (epoch millisecond)", "type": "integer", "format": "int64" }, "isCharging": { "description": "Whether it is being processed", "type": "boolean" }, "chargedPeriods": { "description": "Number of successful subscription charges", "type": "integer" }, "metadata": { "description": "Metadata", "type": "object", "maxProperties": 20, "propertyNames": { "type": "string", "maxLength": 20 }, "additionalProperties": { "type": "string" } }, "status": { "$ref": "#/components/schemas/SubscriptionStatusType" }, "createTime": { "description": "Creation time (epoch millisecond)", "type": "integer", "format": "int64" }, "updateTime": { "description": "Update time (epoch millisecond)", "type": "integer", "format": "int64" } } }, "CustomerDto": { "description": "Customer object", "properties": { "id": { "description": "Customer ID", "type": "string", "maxLength": 32 }, "object": { "description": "Object type", "type": "string", "default": "customer" }, "liveMode": { "description": "Whether this is live mode\n- false Test mode\n- true Live mode\n", "type": "boolean" }, "defaultSource": { "description": "Default customer source ID", "type": "string", "maxLength": 32 }, "name": { "description": "Name", "type": "string", "maxLength": 255 }, "description": { "description": "Description of the customer", "type": "string", "maxLength": 255 }, "email": { "description": "Email address", "type": "string", "maxLength": 255 }, "phone": { "description": "Phone number", "type": "string", "maxLength": 255 }, "remark": { "description": "Remarks", "type": "string" }, "operator": { "description": "Operator", "type": "string", "maxLength": 255 }, "status": { "$ref": "#/components/schemas/CustomerStatusType" }, "metadata": { "description": "Metadata", "type": "object", "maxProperties": 20, "propertyNames": { "type": "string", "maxLength": 20 }, "additionalProperties": { "type": "string" } }, "updateTime": { "description": "update time", "type": "integer", "format": "int64" } } }, "SubscriptionStatusType": { "description": "Subscription status\n- new New\n- active Active\n- past_due Past due\n- canceled Canceled\n", "type": "string", "enum": [ "new", "active", "past_due", "canceled" ] }, "CustomerStatusType": { "description": "Status\n", "type": "string", "enum": [ "active", "deleted" ] } }, "securitySchemes": { "bearerAuth": { "type": "http", "scheme": "bearer", "description": "API authentication is performed via Bearer auth using the secret key as the bearer token.\nThe secret key is a critical key that allows all API operations, so handle it with care.\n" }, "basicAuth": { "type": "http", "scheme": "basic", "description": "API authentication is performed via Basic auth using the secret key as the username and omitting the password.\nThe secret key is a critical key that allows all API operations, so handle it with care.\n" } } } } ``` # Create terminal reader (https://elepay-docs.elestyle.workers.dev/openapi/terminal/createReader) **Page URL**: https://elepay-docs.elestyle.workers.dev/openapi/terminal/createReader **Endpoint**: POST /terminal/readers ```json { "openapi": "3.1.0", "info": { "version": "1.3.0", "title": "elepay API Reference", "description": "The elepay API is a REST-based payment API. It provides various capabilities for payment operations, such as processing payments and refunds.", "contact": { "name": "ELESTYLE, INC", "url": "https://elepay.io", "email": "support@elestyle.jp" } }, "servers": [ { "url": "https://api.elepay.io" } ], "security": [ { "bearerAuth": [] }, { "basicAuth": [] } ], "tags": [ { "name": "Terminal" } ], "paths": { "/terminal/readers": { "post": { "tags": [ "Terminal" ], "summary": "Create terminal reader", "operationId": "createReader", "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/TerminalReaderReq" } } }, "required": true }, "responses": { "201": { "description": "OK", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/TerminalReaderDto" } } } } } } } }, "components": { "schemas": { "TerminalReaderReq": { "description": "Terminal reader request", "type": "object", "required": [ "locationId" ], "properties": { "locationId": { "description": "Location ID", "type": "string", "maxLength": 32 }, "metadata": { "description": "Metadata", "type": "object", "maxProperties": 20, "propertyNames": { "type": "string", "maxLength": 20 }, "additionalProperties": { "type": "string" } } } }, "TerminalReaderDto": { "description": "Terminal reader object", "type": "object", "properties": { "id": { "description": "Reader ID", "type": "string", "maxLength": 32 }, "appId": { "description": "App ID", "type": "string", "maxLength": 32 }, "object": { "description": "Object type", "type": "string", "default": "terminal.reader" }, "liveMode": { "description": "Whether this is live mode\n- false Test mode\n- true Live mode\n", "type": "boolean" }, "locationId": { "description": "Location ID", "type": "string", "maxLength": 50 }, "serialNumber": { "description": "Serial number", "type": "string", "maxLength": 50 }, "registrationCode": { "description": "Pairing code", "type": "string", "maxLength": 20 }, "metadata": { "description": "Metadata", "type": "object", "maxProperties": 20, "propertyNames": { "type": "string", "maxLength": 20 }, "additionalProperties": { "type": "string" } }, "status": { "$ref": "#/components/schemas/ReaderStatusType" } } }, "ReaderStatusType": { "description": "Reader status\n- pending Waiting for pairing\n- active Paired\n", "type": "string", "enum": [ "pending", "active" ] } }, "securitySchemes": { "bearerAuth": { "type": "http", "scheme": "bearer", "description": "API authentication is performed via Bearer auth using the secret key as the bearer token.\nThe secret key is a critical key that allows all API operations, so handle it with care.\n" }, "basicAuth": { "type": "http", "scheme": "basic", "description": "API authentication is performed via Basic auth using the secret key as the username and omitting the password.\nThe secret key is a critical key that allows all API operations, so handle it with care.\n" } } } } ``` # Delete reader (https://elepay-docs.elestyle.workers.dev/openapi/terminal/deleteReader) **Page URL**: https://elepay-docs.elestyle.workers.dev/openapi/terminal/deleteReader **Endpoint**: DELETE /terminal/readers/{readerId} ```json { "openapi": "3.1.0", "info": { "version": "1.3.0", "title": "elepay API Reference", "description": "The elepay API is a REST-based payment API. It provides various capabilities for payment operations, such as processing payments and refunds.", "contact": { "name": "ELESTYLE, INC", "url": "https://elepay.io", "email": "support@elestyle.jp" } }, "servers": [ { "url": "https://api.elepay.io" } ], "security": [ { "bearerAuth": [] }, { "basicAuth": [] } ], "tags": [ { "name": "Terminal" } ], "paths": { "/terminal/readers/{readerId}": { "delete": { "tags": [ "Terminal" ], "summary": "Delete reader", "operationId": "deleteReader", "parameters": [ { "name": "readerId", "description": "Reader ID", "in": "path", "required": true, "schema": { "type": "string" } } ], "responses": { "204": { "description": "Deleted" } } } } }, "components": { "securitySchemes": { "bearerAuth": { "type": "http", "scheme": "bearer", "description": "API authentication is performed via Bearer auth using the secret key as the bearer token.\nThe secret key is a critical key that allows all API operations, so handle it with care.\n" }, "basicAuth": { "type": "http", "scheme": "basic", "description": "API authentication is performed via Basic auth using the secret key as the username and omitting the password.\nThe secret key is a critical key that allows all API operations, so handle it with care.\n" } } } } ``` # Get reader (https://elepay-docs.elestyle.workers.dev/openapi/terminal/getReader) **Page URL**: https://elepay-docs.elestyle.workers.dev/openapi/terminal/getReader **Endpoint**: GET /terminal/readers/{readerId} ```json { "openapi": "3.1.0", "info": { "version": "1.3.0", "title": "elepay API Reference", "description": "The elepay API is a REST-based payment API. It provides various capabilities for payment operations, such as processing payments and refunds.", "contact": { "name": "ELESTYLE, INC", "url": "https://elepay.io", "email": "support@elestyle.jp" } }, "servers": [ { "url": "https://api.elepay.io" } ], "security": [ { "bearerAuth": [] }, { "basicAuth": [] } ], "tags": [ { "name": "Terminal" } ], "paths": { "/terminal/readers/{readerId}": { "get": { "tags": [ "Terminal" ], "summary": "Get reader", "operationId": "getReader", "parameters": [ { "name": "readerId", "description": "Reader ID", "in": "path", "required": true, "schema": { "type": "string" } } ], "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/TerminalReaderDto" } } } } } } } }, "components": { "schemas": { "TerminalReaderDto": { "description": "Terminal reader object", "type": "object", "properties": { "id": { "description": "Reader ID", "type": "string", "maxLength": 32 }, "appId": { "description": "App ID", "type": "string", "maxLength": 32 }, "object": { "description": "Object type", "type": "string", "default": "terminal.reader" }, "liveMode": { "description": "Whether this is live mode\n- false Test mode\n- true Live mode\n", "type": "boolean" }, "locationId": { "description": "Location ID", "type": "string", "maxLength": 50 }, "serialNumber": { "description": "Serial number", "type": "string", "maxLength": 50 }, "registrationCode": { "description": "Pairing code", "type": "string", "maxLength": 20 }, "metadata": { "description": "Metadata", "type": "object", "maxProperties": 20, "propertyNames": { "type": "string", "maxLength": 20 }, "additionalProperties": { "type": "string" } }, "status": { "$ref": "#/components/schemas/ReaderStatusType" } } }, "ReaderStatusType": { "description": "Reader status\n- pending Waiting for pairing\n- active Paired\n", "type": "string", "enum": [ "pending", "active" ] } }, "securitySchemes": { "bearerAuth": { "type": "http", "scheme": "bearer", "description": "API authentication is performed via Bearer auth using the secret key as the bearer token.\nThe secret key is a critical key that allows all API operations, so handle it with care.\n" }, "basicAuth": { "type": "http", "scheme": "basic", "description": "API authentication is performed via Basic auth using the secret key as the username and omitting the password.\nThe secret key is a critical key that allows all API operations, so handle it with care.\n" } } } } ``` # List locations (https://elepay-docs.elestyle.workers.dev/openapi/terminal/listLocations) **Page URL**: https://elepay-docs.elestyle.workers.dev/openapi/terminal/listLocations **Endpoint**: GET /terminal/locations ```json { "openapi": "3.1.0", "info": { "version": "1.3.0", "title": "elepay API Reference", "description": "The elepay API is a REST-based payment API. It provides various capabilities for payment operations, such as processing payments and refunds.", "contact": { "name": "ELESTYLE, INC", "url": "https://elepay.io", "email": "support@elestyle.jp" } }, "servers": [ { "url": "https://api.elepay.io" } ], "security": [ { "bearerAuth": [] }, { "basicAuth": [] } ], "tags": [ { "name": "Terminal" } ], "paths": { "/terminal/locations": { "get": { "tags": [ "Terminal" ], "summary": "List locations", "operationId": "listLocations", "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/LocationsResponse" } } } } } } } }, "components": { "schemas": { "LocationsResponse": { "description": "Terminal location list", "type": "object", "properties": { "locations": { "description": "Terminal location details", "type": "array", "items": { "$ref": "#/components/schemas/LocationDto" } } } }, "LocationDto": { "description": "Terminal location object", "type": "object", "properties": { "id": { "description": "Location ID", "type": "string", "maxLength": 32 }, "name": { "description": "Location name", "type": "string", "maxLength": 255 }, "country": { "description": "Location country", "type": "string", "maxLength": 255 }, "description": { "description": "Location details", "type": "string", "maxLength": 255 }, "logoUrl": { "description": "Location logo URL", "type": "string" } } } }, "securitySchemes": { "bearerAuth": { "type": "http", "scheme": "bearer", "description": "API authentication is performed via Bearer auth using the secret key as the bearer token.\nThe secret key is a critical key that allows all API operations, so handle it with care.\n" }, "basicAuth": { "type": "http", "scheme": "basic", "description": "API authentication is performed via Basic auth using the secret key as the username and omitting the password.\nThe secret key is a critical key that allows all API operations, so handle it with care.\n" } } } } ``` # List readers (https://elepay-docs.elestyle.workers.dev/openapi/terminal/listReaders) **Page URL**: https://elepay-docs.elestyle.workers.dev/openapi/terminal/listReaders **Endpoint**: GET /terminal/readers ```json { "openapi": "3.1.0", "info": { "version": "1.3.0", "title": "elepay API Reference", "description": "The elepay API is a REST-based payment API. It provides various capabilities for payment operations, such as processing payments and refunds.", "contact": { "name": "ELESTYLE, INC", "url": "https://elepay.io", "email": "support@elestyle.jp" } }, "servers": [ { "url": "https://api.elepay.io" } ], "security": [ { "bearerAuth": [] }, { "basicAuth": [] } ], "tags": [ { "name": "Terminal" } ], "paths": { "/terminal/readers": { "get": { "tags": [ "Terminal" ], "summary": "List readers", "operationId": "listReaders", "parameters": [ { "name": "limit", "description": "Maximum number of items", "in": "query", "required": false, "schema": { "type": "integer", "maximum": 100, "default": 20 } }, { "name": "offset", "description": "Starting offset", "in": "query", "schema": { "type": "integer", "default": 0 } } ], "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/TerminalReadersResponse" } } } } } } } }, "components": { "schemas": { "TerminalReadersResponse": { "description": "Reader list", "type": "object", "properties": { "total": { "description": "Count", "type": "integer" }, "readers": { "description": "Reader details", "type": "array", "items": { "$ref": "#/components/schemas/TerminalReaderDto" } } } }, "TerminalReaderDto": { "description": "Terminal reader object", "type": "object", "properties": { "id": { "description": "Reader ID", "type": "string", "maxLength": 32 }, "appId": { "description": "App ID", "type": "string", "maxLength": 32 }, "object": { "description": "Object type", "type": "string", "default": "terminal.reader" }, "liveMode": { "description": "Whether this is live mode\n- false Test mode\n- true Live mode\n", "type": "boolean" }, "locationId": { "description": "Location ID", "type": "string", "maxLength": 50 }, "serialNumber": { "description": "Serial number", "type": "string", "maxLength": 50 }, "registrationCode": { "description": "Pairing code", "type": "string", "maxLength": 20 }, "metadata": { "description": "Metadata", "type": "object", "maxProperties": 20, "propertyNames": { "type": "string", "maxLength": 20 }, "additionalProperties": { "type": "string" } }, "status": { "$ref": "#/components/schemas/ReaderStatusType" } } }, "ReaderStatusType": { "description": "Reader status\n- pending Waiting for pairing\n- active Paired\n", "type": "string", "enum": [ "pending", "active" ] } }, "securitySchemes": { "bearerAuth": { "type": "http", "scheme": "bearer", "description": "API authentication is performed via Bearer auth using the secret key as the bearer token.\nThe secret key is a critical key that allows all API operations, so handle it with care.\n" }, "basicAuth": { "type": "http", "scheme": "basic", "description": "API authentication is performed via Basic auth using the secret key as the username and omitting the password.\nThe secret key is a critical key that allows all API operations, so handle it with care.\n" } } } } ``` # JavaScript API Reference (https://elepay-docs.elestyle.workers.dev/guides/javascript/api-reference) ## Elepay [#elepay] **Kind**: global class ### new Elepay(key, options) [#new-elepaykey-options] Initialize the SDK. **Returns**: `Elepay` - Elepay instance | Param | Type | Description | | -------------- | -------- | ------------------------------------------------------------------------------------------------------ | | key | `string` | Required. Publishable key | | options | `object` | Options | | options.locale | `string` | Language. Default is `auto` (auto‑detect from browser). You can also set `ja`, `en`, `zh-CN`, `zh-TW`. | ### elepay.handleCharge(charge) ⇒ `Promise` [#elepayhandlechargecharge--promise] Process a payment with a Charge object. **Kind**: instance method of `Elepay`
**Returns**: `Promise` - Promise of the payment result. For methods that require `frontUrl`, the result is returned via `frontUrl`. | Param | Type | Description | | ------ | -------- | ----------------------------------------- | | charge | `object` | Required. Charge object created on server | **Example** ```js elepay .handleCharge(chargeObject) .then(function (result) { // Normal flow if (result.type === 'cancel') { // Payment cancelled } else if (result.type === 'success') { // Payment succeeded } }) .catch(function (err) { // Error handling }); ``` ### elepay.handleSource(source) ⇒ `Promise` [#elepayhandlesourcesource--promise] Process an authorization with a Source object. **Kind**: instance method of `Elepay`
**Returns**: `Promise` - Promise of the authorization result. For methods that require `frontUrl`, the result is returned via `frontUrl`. | Param | Type | Description | | ------ | -------- | ----------------------------------------- | | source | `object` | Required. Source object created on server | **Example** ```js elepay .handleSource(source) .then(function (result) { // Normal flow if (result.type === 'cancel') { // Cancelled } else if (result.type === 'success') { // Authorization succeeded } }) .catch(function (err) { // Error handling }); ``` ### elepay.createCodeWidget(options) ⇒ `CodesWidget` [#elepaycreatecodewidgetoptions--codeswidget] Create an EasyQR widget. **Kind**: instance method of `Elepay` **Returns**: `CodesWidget` - EasyQR widget instance | Param | Type | Description | | ----------------------------- | ------- | ----------------------------------------------- | | options | object | Widget options | | options.container | string | CSS selector string for the target DOM element | | options.direction | string | Widget layout. vertical (default) or horizontal | | options.icon | boolean | If true, show branded QR icon. Default false | | options.parts.amount | boolean | If true, show amount. Default true | | options.parts.paymentLogo | boolean | If true, show payment method icon. Default true | | options.parts.tip | boolean | If true, show help message. Default true | | options.theme.primaryColor | boolean | Primary color | | options.theme.borderColor | boolean | Border color. null: no border | | options.theme.backgroundColor | boolean | Background color. Default white | **Example** ```js var widget = elepay.createCodeWidget({ container: '#widget', }); widget.on('success', () => { // Post‑payment handling }); widget.on('expired', () => { // Generate a new EasyQR code, etc. }); widget.show('cod_028123beb9f8c853fa845f4'); ``` ### elepay.checkout(code) ⇒ `Promise` [#elepaycheckoutcode--promise] Run EasyCheckout. **Kind**: instance method of `Elepay` **Returns**: `Promise` - Promise for the checkout flow. Only handle on error. | Param | Type | Description | | ----- | -------- | -------------------------------------------- | | code | `object` | Required. EasyQR object ID created on server | **Example** ```js elepay.checkout('cod_028123beb9f8c853fa845f4').catch(function (err) { // Error handling }); ``` ## CodesWidget [#codeswidget] EasyQR widget class. **Kind**: global class ### codesWidget.show(code) [#codeswidgetshowcode] Show the EasyQR widget. **Kind**: instance method of `CodesWidget` | Param | Type | Description | | ----- | ------ | -------------------------------------------- | | code | object | Required. EasyQR object ID created on server | **Example** ```js widget.show('cod_028123beb9f8c853fa845f4'); ``` ### codesWidget.destroy() [#codeswidgetdestroy] Destroy the EasyQR widget. **Kind**: instance method of `CodesWidget` ### "success" (ev, codeObject) [#success-ev-codeobject] Event emitted when a payment completes. **Kind**: event emitted by `CodesWidget` | Param | Type | Description | | ---------- | ------ | ------------------ | | ev | object | Event | | ev.type | string | success | | codeObject | object | EasyQR code object | **Example** ```js widget.on('success', function (ev, codeObject) { // Post‑payment handling }); ``` ### "expired" (ev, codeObject) [#expired-ev-codeobject] Event emitted when an EasyQR code expires. **Kind**: event emitted by `CodesWidget` | Param | Type | Description | | ---------- | ------ | ------------------ | | ev | object | Event | | ev.type | string | expired | | codeObject | object | EasyQR code object | **Example** ```js widget.on('expired', function (ev, codeObject) { // Generate a new EasyQR code, etc. }); ``` ### "error" (ev, error) [#error-ev-error] Error event. **Kind**: event emitted by `CodesWidget` | Param | Type | Description | | ------- | ------ | ------------ | | ev | object | Event | | ev.type | string | error | | error | Error | Error object | **Example** ```js widget.on('error', function (ev, err) { // Error handling }); ``` # JavaScript (https://elepay-docs.elestyle.workers.dev/guides/javascript) The **elepay JavaScript SDK** integrates elepay into web applications. This guide explains how to connect your web app with the elepay JavaScript SDK. # Supported versions [#supported-versions] * The **elepay JavaScript SDK** recommends the latest versions of Safari, Chrome, Edge, and Firefox (we guarantee operation on versions released within the last three years). * Development environment: Chrome is recommended. # Installation [#installation] The **elepay JavaScript SDK** is hosted at [https://js.elepay.io/v1/](https://js.elepay.io/v1/) and is used by loading that domain. ```js ``` When using as a module, install the npm package `elepay-js-sdk`. ```js npm install --save elepay-js-sdk ``` # Implementation [#implementation] ## Initialize [#initialize] ```js var elepay = new Elepay('YOUR_PUBLISHABLE_KEY'); ``` **When installed via npm package** ```js import { loadElepay } from 'elepay-js-sdk'; const elepay = await loadElepay('YOUR_PUBLISHABLE_KEY'); ``` **Elepay(publishableKey, options?)** | Parameter | Type | Required | Description | | -------------- | ------ | --------------------- | ------------------------------------------------------------------------------------------------------------------ | | publishableKey | string | true | Publishable key | | options | object | false | Initialization options | | options.locale | string | false (default: auto) | ja: Japanese, en: English, zh-CN: Simplified Chinese, zh-TW: Traditional Chinese, auto: detect from browser locale | ## Payment processing [#payment-processing] After obtaining an elepay Charge object, call the following to process the payment. ```js elepay .handleCharge(chargeObject) .then(function (result) { // ① Normal flow if (result.type === 'cancel') { // Payment cancelled } else if (result.type === 'success') { // Payment succeeded } }) .catch(function (err) { // ② Error handling }); ``` For the methods below, the flow does not call the normal‑path handler (①) but instead redirects to the `frontUrl` in the charge extra data: * LinePay * Alipay * UnionPay * PayPay **elepay.handleCharge(chargeObject)** | Parameter | Type | Required | Description | | ------------ | ------ | -------- | ------------------------------------------ | | chargeObject | object | true | Charge object created by the elepay server | **Redirect to frontUrl** When redirecting, the following parameters are appended to `frontUrl` as query strings: * chargeId: Charge ID * orderNo: Order number * amount: Payment amount * currency: Currency code * status: Status (captured, failure, cancelled). For successful payments, `captured` is used. # Android SDK (https://elepay-docs.elestyle.workers.dev/guides/mobile/android) The **elepay Android SDK** integrates elepay into Android apps.
This guide explains in detail how to connect your Android app with the elepay SDK. # Supported versions [#supported-versions] Up to version 2.9.0, the **elepay Android SDK** supported Android API 21. From 2.10.0 onward, the `minSdkVersion` is 23. # Installation [#installation] ## Install via Gradle [#install-via-gradle] Add the following to the `repositories` block of your `build.gradle`: ```groovy maven { ... // other code url "https://elestyle.github.io/elepay-android/repository" } ``` Add the following to the `dependency` section of the same `build.gradle` file.
See the [releases page](https://github.com/elestyle/elepay-android/releases) for the (latest-version). ```groovy // Note: Check https://github.com/elestyle/elepay-android/releases for (latest-version) implementation 'io.elepay.android:elepay:(latest-version)' // If you use the Checkout feature, also add the following: implementation 'io.elepay.android:elepay-checkout:(latest-version)' ``` > 🚧 We recommend always using the latest version. > > From 4.0.0, the Maven coordinates have migrated from `jp.elestyle.androidapp` to `io.elepay.android`, and the SDK has been split into `elepay` / `elepay-core` / `elepay-checkout`. `elepay-core` is resolved transitively from `elepay`, so it does not need to be declared separately; to use Checkout, additionally include `elepay-checkout`. Versions prior to 4.0.0 continue to use the old coordinates `jp.elestyle.androidapp:elepay`. > > If you use Gradle Build Tool 3.6.0 (Android Studio 3.6 compatible) or later, elepay Android SDK 1.7.0 or later is required. > 🚧 For users of Android Support Library > > The **elepay Android SDK** supports only [AndroidX](https://developer.android.com/jetpack/androidx/).\ > Because Google [stopped developing](https://android-developers.googleblog.com/2018/05/hello-world-androidx.html) the [Android support library](https://developer.android.com/topic/libraries/support-library/) in 2018,\ > if you still use the support library, we recommend migrating to [AndroidX](https://developer.android.com/jetpack/androidx/). > > For migration steps, see Google’s [migration guide](https://developer.android.com/jetpack/androidx/migrate). # Implementation [#implementation] ## 1. Android system permissions [#1-android-system-permissions] To use UnionPay or Alipay, you must add the following permissions to `AndroidManifest.xml`. > 📘 Add only the permissions required by your use case.\ > Example: If you do not scan cards, you do not need camera permissions. ```xml ``` ## 2. Setup [#2-setup] Set up the elepay SDK before processing payments. ```kotlin val configuration = ElepayConfiguration( apiKey = "" // test key or live key ) Elepay.setup(configuration) ``` You need an elepay account to request an `appKey`. > 📘 We recommend running this configuration in your app’s `Application` class or the starting `Activity`. ## 3. Payment processing [#3-payment-processing] ### Charge processing [#charge-processing] After creating a charge data object, pass it to the method below to complete payment processing:
`Elepay.processPayment(chargeJsonData, fromActivity, resultHandler)` | Parameter name | Description | | -------------- | --------------------------------------------------------------------------------------------------------------------------------- | | chargeJsonData | JSON object containing payment data. Created on the server side. The **elepay Android SDK** processes the payment with this data. | | fromActivity | The `Activity` instance used to present UI during payment. | | resultHandler | Callback that notifies the payment result. | ### Source processing [#source-processing] After creating a source data object, pass it to the method below to complete processing:
`Elepay.processSource(sourceJsonData, fromActivity, resultHandler)` | Parameter name | Description | | -------------- | -------------------------------------------------------------------------------------------------------------------------------- | | sourceJsonData | JSON object containing source data. Created on the server side. The **elepay Android SDK** processes the payment with this data. | | fromActivity | The `Activity` instance used to present UI during payment. | | resultHandler | Callback that notifies the result. | ### Checkout processing [#checkout-processing] > 📘 Checkout requires elepay Android SDK 1.9.0 or later. After creating a checkout data object, pass it to the method below to complete the flow:
`Elepay.checkout(checkoutJsonData, fromActivity, resultHandler)` | Parameter name | Description | | ---------------- | ---------------------------------------------------------------------------------------------------------------------------------- | | checkoutJsonData | JSON object containing checkout data. Created on the server side. The **elepay Android SDK** processes the payment with this data. | ### Callback Activity configuration [#callback-activity-configuration] Add the callback `Activity` to your `AndroidManifest.xml` and register the URL scheme obtained from the elepay dashboard. ```xml ``` > 🚧 Do not forget > > In the snippet above, replace the `scheme` of `` with the elepay‑specific URL scheme. For how to obtain it, see “[Obtain URL Scheme for iOS / Android SDK](https://elepay-docs.elestyle.workers.dev/guides/mobile/url-scheme)”. The processing result is contained in the `ElepayResult` argument of the `resultHandler` callback above.
`ElepayResult` has `Succeeded`, `Failed`, and `Canceled`. See the API Reference for details. ```kotlin // Example: Elepay.processPayment(chargeData = result.jsonObject, fromActivity = activity) { paymentRes -> when (paymentRes) { is ElepayResult.Succeeded -> print("Payment is processed successfully. id=${payResult.paymentId}") is ElepayResult.Failed -> print("Payment error: ${payResult.error}") is ElepayResult.Canceled -> print("Payment is cancelled. id=${payResult.paymentId}") } } ``` ### Error handling [#error-handling] Errors returned from the elepay Android SDK may need to be handled for end users. Check the error type and the [error codes](https://elepay-docs.elestyle.workers.dev/get-started/error-code) and provide appropriate guidance. Example: ```kotlin when (paymentRes) { is ElepayResult.Succeeded -> { // succeeded } is ElepayResult.Failed -> { when (paymentRes.error) { is ElepayError.PaymentFailure -> { if ((paymentRes.error as ElepayError.PaymentFailure).errorCode == "10110") { Log.d("Payment", "app not installed.") } } is ElepayError.PermissionRequired -> { Log.d("Payment", "Please grand the following permissions to complete payment. ${(paymentRes.error as ElepayError.PermissionRequired).permissions}") } else -> { // Other error processing. } } } is ElepayResult.Canceled -> { // canceled } } ``` # UI customization [#ui-customization] ## Specify UI theme [#specify-ui-theme] You can change the SDK UI theme using the following setting.
You can also change the theme at runtime via the SDK API. ```kotlin Elepay.changeTheme(ElepayTheme.Light) // or: ElepayTheme.Dark / ElepayTheme.System ``` > Notes > > 1. When specifying an elepay theme, the app’s configuration may change, which can cause the `Activity` that invokes the elepay payment flow to restart.\ > To avoid an Activity restart, add `uiMode` to `android:configChanges` of the Activity that invokes elepay in `AndroidManifest.xml`. > 2. `changeTheme` takes effect only if called before starting the payment flow. ## Color customization [#color-customization] You can customize the colors used in the elepay SDK UI. ### System bar customization [#system-bar-customization] 1. In `colors.xml`, you can change the following colors: * elepayColorPrimaryDark: Override of the Activity theme `colorPrimaryDark`. Mainly the status bar background color. * elepayNavigationBarBackground: Override of the Activity theme `navigationBarColor`. Background color of the bottom navigation bar. 2. In any file under `res/values` that can contain boolean values (e.g., `bools.xml`), you can also change the following: * elepayWindowLightStatusBar: Same as `android:windowLightStatusBar`. Available on API 23+. * elepayWindowLightNavigationBar: Same as `android:windowLightNavigationBar`. Available on API 27+. ### Customize SDK internal UI [#customize-sdk-internal-ui] * elepayTopBarBackground: Toolbar background color. * elepayTopBarContent: Toolbar text and icon color. * elepayBackgroundNormal: Screen background color. * elepayCreditCardBackground: Background color of the card widget on the credit card entry screen. * elepayControlHighlight: Color for highlighted UI components. * elepayControlNormal: Color for UI components. * elepayTextColorPrimary: Main text color. * elepayTextSecondary: Secondary text color. * elepayTextOnControlHighlight: Text color displayed on highlighted UI components. * elepayTextColorHint: Hint text color. * elepayErrorTextColorOnNormalBackground: Error text color. * elepayColorDivider: Divider color for UI components. ![3000](https://elepay-docs.elestyle.workers.dev/docs/f726d1e-asdf.png "asdf.png") > Notes > To customize the `Light` theme, specify the above values in `res/values/colors.xml` of your project.\ > To customize the `Dark` theme, specify the above values in `res/values-night/colors.xml`.\ > If you use `ElepayTheme.System`, you may need to specify values in both `res/values/colors.xml` and `res/values-night/colors.xml`. Configure as appropriate for your app. # Localization [#localization] The elepay SDK supports multiple languages. By default it uses the system language. To use a different language, change the language defined by `LanguageKey` using one of the following methods: * Set `languageKey` in `ElepayConfiguration` at SDK initialization. ```kotlin val configuration = ElepayConfiguration( apiKey = "", // test key or live key languageKey = LanguageKey.English ) Elepay.setup(configuration) ``` * Use `Elepay.changeLanguageKey` to change the language. ```kotlin Elepay.changeLanguageKey(LangaugeKey.English) ``` > 🚧 Note > > `Elepay.changeLanguageKey` takes effect only if called before `Elepay.processPayment`, so be mindful of when you change the language. # Settings for each payment method [#settings-for-each-payment-method] See the [Payment Methods](https://elepay-docs.elestyle.workers.dev/guides/mobile/payment-methods-config#summary) page. # App Clips (https://elepay-docs.elestyle.workers.dev/guides/mobile/ios/app-clips) Notes when using elepay with App Clips.
elepay StripeApplePay Plugin for iOS is a lightweight SDK designed to reduce the app size when developing App Clips. ### Installation [#installation] * When installing with CocoaPods: ```ruby pod 'Elepay_StripeApplePay_Plugin', "~> 0.1.0" ``` * To download the XCFramework directly, use the following URL: [→ Elepay\_StripeApplePay\_Plugin Releases](https://github.com/elestyle/elepay-stripeapplepay-plugin/releases) This plugin must be used together with the [elepay iOS SDK](https://github.com/elestyle/elepay-ios-sdk). ### System requirements [#system-requirements] * iOS 11.0 or later; Xcode 12.5.1 or later * The StripeApplePay SDK is bundled, so you do not need to import Stripe SDK or StripeAppleSDK * If Stripe SDK is already imported into the App Clip target, do not use this plugin at the same time as it overlaps functionally ### Example setup [#example-setup] Example `Podfile` for using this plugin with App Clips: ```ruby # Uncomment the next line to define a global platform for your project platform :ios, '11.0' project 'Example.xcodeproj' workspace 'Example.xcworkspace' def elepay_pods use_frameworks! # Pods for the full functional App pod 'ElepaySDK', '~> 3.4.0' pod 'Stripe', '~> 21.13.0' # The Chinese Payment Methods Plugin, use this plugin only when you need support WeChat Pay pod 'Elepay_ChinesePayments_Plugin', '~> 2.1.0' end def elepay_app_clip_pods use_frameworks! # Pods for the App Clip pod 'ElepaySDK', '~> 3.4.0' pod 'Elepay_StripeApplePay_Plugin', "~> 0.1.0" end target 'YourFullFunctionalAppTarget' do elepay_pods end target 'YourAppClipTarget' do elepay_app_clip_pods end ``` # iOS SDK (https://elepay-docs.elestyle.workers.dev/guides/mobile/ios) The **elepay iOS SDK** is an SDK for integrating elepay into iOS apps.
This guide explains in detail how to connect your iOS app with the elepay SDK. # Supported versions [#supported-versions] * From **elepay iOS SDK 5.0**, the SDK has been split into `ElepaySDK` and independent plugins such as `Stripe` / `RPay` / `ChinesePayments` / `Checkout`, which you include as needed. From 5.0.5, GMO (Apple Pay / Credit Pay 3DS) handling has been added. * From **elepay iOS SDK 4.0**, iOS 11.0 support has ended. Bitcode support has also ended. * From **elepay iOS SDK 3.0**, iOS 10.0 support ended. * **elepay iOS SDK 2.x** supports iOS 10.0 and later. * Development environment: Use Xcode 11.0 or later. # Installation [#installation] ## 1. Install via CocoaPods [#1-install-via-cocoapods] * Add `ElepaySDK` to your Podfile.\ **Note: CocoaPods 1.10.0 or later is required.** ```ruby # For ElepaySDK versions earlier than 2.2 only dynamic frameworks are supported. # From 2.3, static frameworks are also supported. #use_frameworks! # From 2.0.0, the SDK renamed from ElePay to ElepaySDK pod 'ElepaySDK', '~> 3.0' ``` * Only when using Chinese payments (Alipay, WeChat Pay, UnionPay), add `Elepay_ChinesePayments_Plugin`. ```ruby # From 2.0.0, the SDK renamed from ElePay-ChinesePayments-Plugin to Elepay_ChinesePayments_Plugin pod 'Elepay_ChinesePayments_Plugin', '~> 2.0' ``` * Only when using Stripe and elepay SDK is 2.2.0 or later, add `Stripe`. Note: If using ElepaySDK 2.x, add Stripe with `pod 'Stripe', '~> 19.4.1'`.```ruby # Only ElepaySDK 3.0 and above supports Stripe 21.x # Use "pod 'Stripe', '~> 19.4.1'" if you are using ElepaySDK 2.x pod 'Stripe', '~> 22.0' ```> 🚧 Because Stripe v23 dropped iOS 12 support, configure Stripe v22 with the elepay SDK. * Only when using PayPal and elepay SDK is 1.7.0 or later, add `Braintree`. **Note:** From elepay SDK 4.0.0, Braintree support has ended. If you need PayPal, use elepay SDK 3.x. ```ruby pod 'Braintree' ``` * Run `pod install`. ## 2. Install via Swift Package Manager (SPM) [#2-install-via-swift-package-manager-spm] > 📘 From elepay iOS SDK 5.0, SPM (Swift Package Manager) is the default distribution method. If you have requirements for other integration channels, please contact the elepay team. **elepay iOS SDK** supports SPM from 3.1.1.
**elepay iOS SDK Chinese Payments Plugin** supports SPM from 2.0.2. * Add ElepaySDK via SPM.\ Use this URL: `https://github.com/elestyle/elepay-ios-sdk.git`\ Specify 3.1.1 or later if pinning versions. * Only when using Chinese payments (Alipay, WeChat Pay, UnionPay), add `Elepay_ChinesePayments_Plugin`.\ Use this URL: `https://github.com/elestyle/elepay-ios-sdk-chinesepayments-plugin.git`\ Specify 2.0.2 or later if pinning versions. - If you use Stripe, add `Stripe`.\ Use this URL: `https://github.com/stripe/stripe-ios.git`\ Specify 21.8.1 or later if pinning versions. * If you use PayPal, add `Braintree`.\ Note: Braintree 5.x.x dropped iOS 11 support, so use 4.x.x. Also, 4.x.x does not support SPM, so install it via CocoaPods or manually. ## 3. Manual installation [#3-manual-installation] Integrate elepay SDK for iOS into your app in 7 steps. * Download [`ElePaySDK.zip`](https://github.com/elestyle/elepay-ios-sdk/archive/master.zip) from [Github.com](https://github.com/elestyle/elepay-ios-sdk) and extract it. * Add `ElePay.framework` to your Xcode project. Select “Copy items if needed” if necessary. * In the target settings, add `ElePay.framework` under “Embedded Binaries”. * For Objective‑C projects using Apple Pay, add `PassKit.framework` under “Embedded Binaries”. ## 4. Using with Objective‑C projects [#4-using-with-objectivec-projects] > 📘 For Objective‑C development > > If you implement elepay in an Objective‑C project, use this > [ElePayObjCBridge.swift](https://github.com/elestyle/elepay-ios-demo-swift/blob/master/ELEPayObjectiveC/ElePayObjCBridge.swift) file. # Implementation [#implementation] ## 1. Add URL Scheme [#1-add-url-scheme] In Xcode, go to **PROJECT** > **TARGETS** > **Info** and add an elepay‑specific *URL Scheme* under **URL Types**. ### Common settings [#common-settings] See “[Obtaining URL Scheme for iOS / Android SDK](https://elepay-docs.elestyle.workers.dev/guides/mobile/url-scheme)” for how to get the elepay‑specific URL Scheme. ![](https://elepay-docs.elestyle.workers.dev/docs/URL_Scheme.png) ### Test the URL Scheme [#test-the-url-scheme] You can test whether the scheme correctly launches the app by entering the *URL Scheme* (e.g., `ep1a2b3c4d5e://`) into the address bar of Mobile Safari or Chrome. > 📘 Important > > If you have multiple **TARGETS**, add the *URL Type* with the scheme to all targets. ## 2. Settings for each payment method [#2-settings-for-each-payment-method] See the [Payment Methods](https://elepay-docs.elestyle.workers.dev/guides/mobile/payment-methods-config) page. ## 3. Initialize [#3-initialize] Add the following initialization code in your project’s `application(_:didFinishLaunchingWithOptions:)` function. ```swift Elepay.initApp(key: "ELEPAY_APP_PUBLIC_KEY") ``` > 📘 About the Public Key > > Replace `ELEPAY_APP_PUBLIC_KEY` with the one issued on the [elepay dashboard](https://dashboard.elepay.io/). ## 4. Configure callback [#4-configure-callback] Add the following code to `application(_:open:options:) -> Bool`. ```swift func application(_ app: UIApplication, open url: URL, options: [UIApplicationOpenURLOptionsKey : Any] = [:]) -> Bool { // Let elepay handle the result callback from 3rd‑party payment apps first. if (Elepay.handleOpenURL(url)) { // When elepay has already handled the URL, make sure your code returns here. return true; } // Handle non‑payment URLs in your own code here. return false; } ``` ## 5. Payment processing (one‑time payments) [#5-payment-processing-onetime-payments] ### Your server‑side processing [#your-serverside-processing] Start a one‑time payment using the **elepay API** charge API `/api/charges`.
Because this API requires authentication, store the authentication secret key on a server you control and make the request from that server. > ❗️ Security: > > For safety, never store or transmit the secret key in the app. ### Native app processing [#native-app-processing] Send the payload obtained from the **elepay API** charge API to the **elepay SDK** as shown below, and add post‑processing code for completion (or failure) in the SDK callback. Use whichever of the three methods below is most convenient. #### 1. Charge with a JSON string [#1-charge-with-a-json-string] ```swift _ = Elepay.handlePayment( chargeJSON: jsonString, cardParams: elepayCardParams, /* <- Optional parameter, can be removed */ viewController: viewController) { result in switch (result) { case let .succeeded(paymentId): // your code for handling successful situation case let .canceled(paymentId): // your code for handling canceled by user case let .failed(paymentId, error): // your code for handling failure situation } } ``` | Parameter name | Description | | -------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | | chargeJSON | A JSON object of type `String` containing the payment data. Created on the server side. **elepay iOS SDK** uses this data to process the payment. | | cardParams | Optional parameters to control the credit‑card UI. Default is `nil`. When `nil`, the SDK’s built‑in card UI is used. | | viewController | The `UIViewController` instance used to present UI during payment. | | completion | Callback that notifies the payment result. | #### 2. Charge with JSON data [#2-charge-with-json-data] ```swift _ = Elepay.handlePayment( chargeData: jsonData, cardParams: elepayCardParams, /* <- Optional parameter, can be removed */ viewController: viewController) { result in switch (result) { case let .succeeded(paymentId): // your code for handling successful situation case let .canceled(paymentId): // your code for handling canceled by user case let .failed(paymentId, error): // your code for handling failure situation } } ``` | Parameter name | Description | | -------------- | ----------------------------------------------------------------------------------------------------------------------------------------------- | | chargeData | A JSON object of type `Data` containing the payment data. Created on the server side. **elepay iOS SDK** uses this data to process the payment. | | cardParams | Optional parameters to control the credit‑card UI. Default is `nil`. When `nil`, the SDK’s built‑in card UI is used. | | viewController | The `UIViewController` instance used to present UI during payment. | | completion | Callback that notifies the payment result. | #### 3. Charge with a JSON dictionary [#3-charge-with-a-json-dictionary] ```swift _ = Elepay.handlePayment( charge: jsonDictionary, cardParams: elepayCardParams, /* <- Optional parameter, can be removed */ viewController: viewController) { result in switch (result) { case let .succeeded(paymentId): // your code for handling successful situation case let .canceled(paymentId): // your code for handling canceled by user case let .failed(paymentId, error): // your code for handling failure situation } } ``` | Parameter name | Description | | -------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------- | | charge | A JSON object of type `Dictionary` containing the payment data. Created on the server side. **elepay iOS SDK** uses this data to process the payment. | | cardParams | Optional parameters to control the credit‑card UI. Default is `nil`. When `nil`, the SDK’s built‑in card UI is used. | | viewController | The `UIViewController` instance used to present UI during payment. | | completion | Callback that notifies the payment result. | ## Checkout feature [#checkout-feature] Using the Checkout feature lets you skip building your own payment‑method selection UI and instead use the selection screens provided by the elepay SDK. You can preview the flow in the screenshot below. Dark mode is supported. ![](https://elepay-docs.elestyle.workers.dev/docs/checkout.png) ### Server‑side [#serverside] Create a checkout payload using the **elepay API** code API. ### Native app side [#native-app-side] Send the checkout payload obtained from the **elepay API** code API to the **elepay SDK** and let the SDK complete the checkout process. Three methods are provided depending on the payload type.
Sample code and method descriptions are as follows. #### 1. Checkout with a JSON string [#1-checkout-with-a-json-string] ```swift Elepay.checkout( checkoutJSONString: checkoutJSONString, from: viewController ) { result in switch (result) { case .succeeded(let codeId): // checkout is succeeded. case .cancelled(let codeId): // checkout is canceled. case let .failed(let codeId, let error): // checkout is failed. } } ``` | Parameter name | Description | | ------------------ | -------------------------------------------------------------------------------------------------------------------------------------------------- | | checkoutJSONString | A JSON object of type `String` containing the checkout data. Created on the server side. **elepay iOS SDK** uses this data to process the payment. | | from | The `UIViewController` instance used to present UI during payment. | | resultHandler | Callback that notifies the result. | #### 2. Checkout with JSON data [#2-checkout-with-json-data] ```swift Elepay.checkout( checkoutJSONData: checkoutJSONData, from: viewController ) { result in switch (result) { case .succeeded(let codeId): // checkout is succeeded. case .cancelled(let codeId): // checkout is canceled. case let .failed(let codeId, let error): // checkout is failed. } } ``` | Parameter name | Description | | ---------------- | ------------------------------------------------------------------------------------------------------------------------------------------------ | | checkoutJSONData | A JSON object of type `Data` containing the checkout data. Created on the server side. **elepay iOS SDK** uses this data to process the payment. | | from | The `UIViewController` instance used to present UI during payment. | | resultHandler | Callback that notifies the result. | #### 3. Checkout with a JSON dictionary [#3-checkout-with-a-json-dictionary] ```swift Elepay.checkout( checkoutJSON: checkoutJSON, from: viewController ) { result in switch (result) { case .succeeded(let codeId): // checkout is succeeded. case .cancelled(let codeId): // checkout is canceled. case let .failed(let codeId, let error): // checkout is failed. } } ``` | Parameter name | Description | | -------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------ | | checkoutJSON | A JSON object of type `Dictionary` containing the checkout data. Created on the server side. **elepay iOS SDK** uses this data to process the payment. | | from | The `UIViewController` instance used to present UI during payment. | | resultHandler | Callback that notifies the result. | ## Error handling [#error-handling] The SDK calls back various errors (`ElepayError`). To improve user experience, we recommend surfacing the message of `case unsupportedPaymentMethod(errorCode: String, paymentMethod: String)` to users. Sample code ```swift switch (result) { case .succeeded(let codeId): // checkout is succeeded. case .cancelled(let codeId): // checkout is canceled. case let .failed(let codeId, let error): switch error { case let .unsupportedPaymentMethod(errorCode, method): if errorCode == "10110" { // 3rd party App not installed error print("The \(method) App is not installed for payment processing. Please install the app first or selected another payment method.") } if errorCode == "10100" { // The device or the iOS system is too old to use this payment method print("Your device is too old to use \(method)") } else { // Other error codes. Such as: a new payment method not supported by current SDK. The App using elepay SDK need to be updated print("Your App need to be updated to use \(method)") } default: // other error handling code } } ``` See the [Error Codes](https://elepay-docs.elestyle.workers.dev/get-started/error-code) list. ## Notes [#notes] > 🚧 About handling payment results > > In‑app payment results should only be used for user‑facing confirmation. Always verify the actual charge result on your server using the callback API and the data sent by the elepay servers. *See the elepay API guide for details.* ### 1. About Apple Pay [#1-about-apple-pay] 1. When implementing Apple Pay, go to **PROJECT** → **TARGETS** → **Capabilities** in Xcode and turn Apple Pay “ON”. ![](https://elepay-docs.elestyle.workers.dev/docs/xcodee_applepay.png) 2. Upload your Apple Pay certificate to [“elepay Dashboard” → “Developer Settings” → “Apple Pay”](https://dashboard.elepay.io/).\ For how to create the certificate, see [this document](https://elepay-docs.elestyle.workers.dev/guides/mobile/payment-methods-config#apple-pay). ### 2. About LSApplicationQueriesSchemes (iOS 9 and later) [#2-about-lsapplicationqueriesschemes-ios-9-and-later] To transition to various payment apps, add the `LSApplicationQueriesSchemes` key in **PROJECT** → **TARGETS** → **Info** (or in `Info.plist`). ```xml LSApplicationQueriesSchemes **Add the scheme of each app** > ``` #### Settings for each payment method [#settings-for-each-payment-method] See the [Payment Methods](https://elepay-docs.elestyle.workers.dev/guides/mobile/payment-methods-config) page. # Localization [#localization] The **elepay iOS SDK** supports multiple languages (currently English, Japanese, Simplified Chinese, and Traditional Chinese). By default, the SDK displays the language that matches the iOS system setting. ## Specify display language [#specify-display-language] If you want to display a language different from the system setting, specify it as follows: ```swift ElepayLocalization.shared.switchLanguage(code: .ja) // Use Japanese ElepayLocalization.shared.switchLanguage(code: .en) // Use English ElepayLocalization.shared.switchLanguage(code: .cn) // Use Simplified Chinese ElepayLocalization.shared.switchLanguage(code: .tw) // Use Traditional Chinese ``` You can call `switchLanguage` multiple times. Screens presented after calling the function will display in the specified language. > 📘 Some screens cannot follow the specified language > > Some payment methods transition to third‑party screens. Because those screens are outside the control of the elepay SDK, they may be shown in a language different from the one you specified.