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

      Payment Intents

      POST
      /v1/payment-intents

      Request

      Header Params

      Body Params application/jsonRequired

      Example
      {
        "amount": 100000,
        "currency": "IDR",
        "customerId": "customer_test_123",
        "description": "Test payment",
        "metadata": {
          "order_id": "order_456"
        }
      }

      Request Code Samples

      Shell
      JavaScript
      Java
      Swift
      Go
      PHP
      Python
      HTTP
      C
      C#
      Objective-C
      Ruby
      OCaml
      Dart
      R
      Request Request Example
      Shell
      JavaScript
      Java
      Swift
      curl --location --request POST '/v1/payment-intents' \
      --header 'X-Secret-Key: sk_**************************' \
      --header 'Content-Type: application/json' \
      --data-raw '{
        "amount": 100000,
        "currency": "IDR",
        "customerId": "customer_test_123",
        "description": "Test payment",
        "metadata": {
          "order_id": "order_456"
        }
      }'

      Responses

      🟢200Success
      application/json
      Body

      Example
      {
          "amount": 75000,
          "clientSecret": "pi_2e718067-a60d-4969-808c-f93458b65b47_secret_llySD6QRbjygi6nfaWiZyQx78467oOMYw_Fcna2dxd0",
          "createdAt": "2026-02-02T04:25:07.617558Z",
          "currency": "IDR",
          "id": "726f2fec-2431-40cf-b21c-304835e92715",
          "metadata": {
              "orderId": "order_1"
          },
          "status": "created"
      }
      Previous
      Swift