1. How to install SDK
Payment Gateway Docs
  • Welcome to the Ojire SDK Documentation
  • Callback Mechanism
  • Payment Flow Diagrams
    • Payment Flow with Saved Card
    • Payment Flow without Customer ID (Anonymous/Guest Checkout)
    • Payment Flow with QRIS
    • Payment Flow with Virtual Account
    • Payment Flow with WeChat Pay
    • Payment Flow with Alipay
  • How to install SDK
    • Javascript
    • React Native
    • Kotlin / Java
    • Swift
  • Payment Intents
    POST
  1. How to install SDK

Javascript

You must get customer_token, payment_secret and payment_id first at your backend to OJIRE API via request to /v1/payment-intents endpoint

Method 1: HTML/Script Tag#

Method 2: ES Modules / React#

Install#

Usage#

API Reference#

OptionTypeDescription
tokenstringCustomer token from payment intent
clientSecretstringPayment intent client secret
merchantIdstringMerchant identifier
paymentIdstringPayment identifier
sandboxbooleanEnable sandbox mode (optional)
onSuccessfunctionCallback when payment succeeds
onPendingfunctionCallback when payment is pending
onErrorfunctionCallback when payment fails
onClosefunctionCallback when modal is closed

Screenshot Example#

screencapture-457469d2-cupang-store-pages-dev-2026-02-04-22_05_45.png
screencapture-457469d2-cupang-store-pages-dev-2026-02-04-22_06_21.png
Previous
Payment Flow with Alipay
Next
React Native