Omise API Documentation

website·Indexed 30 days ago

https://moeenahamd.github.io

Technical documentation for the Omise payment platform, covering API versions 2019-03-20, 2025-05-27, and 2025-06-09. Includes references for managing charges, customers, tokens, sources, transfers, disputes, and receipts, as well as guides for collecting card information and integrating payment methods like AliPay+ Offline.

Tokens
29.2K
Snippets
169
Records
247
Agent score
71%

What's inside Omise

  1. Retrieve account balance using the Omise API

    Retrieve the current balance of your Omise account by sending a GET request to the /balance endpoint. This endpoint returns details about the total balance, transferable funds, reserves, and funds on hold.
    curl -X GET \
    -H "Accept: application/json" \
    "https://api.omise.co/balance"
  2. Omise Token object response schema

    When retrieving a token by ID from the Omise API, the response returns a token object. This object contains metadata about the token, its usage status, and the associated card details if applicable. Key fields include id (matching the pattern tokn_[0-9a-z]+), used (boolean indicating if the token has been used), and charge_status (which can be failed, expired, pending, reversed, successful, or unknown). The nested card object provides detailed card information such as brand, last_digits, expiration_month, and expiration_year.
    {
      "object": "token",
      "id": "tokn_...",
      "livemode": boolean,
      "location": "string",
      "used": boolean,
      "charge_status": "failed" | "expired" | "pending" | "reversed" | "successful" | "unknown",
      "card": {
        "object": "card",
        "id": "string",
        "livemode": boolean,
        "location": "string",
        "deleted": boolean,
        "street1": "string" | null,
        "street2": "string" | null,
        "city": "string" | null,
        "state": "string" | null,
        "phone_number": "string" | null,
        "postal_code": "string" | null,
        "country": "string",
        "financing": "string",
        "bank": "string",
        "brand": "string",
        "fingerprint": "string",
        "first_digits": "string" | null,
        "last_digits": "string",
        "name": "string",
        "expiration_month": integer,
        "expiration_year": integer,
        "security_code_check": boolean,
        "tokenization_method": "string",
        "created_at": "date-time"
      },
      "created_at": "date-time"
    }
  3. Understand the Card Payment Authorization and Capture process

    Card payments consist of two primary steps: Authorization and Capture.

    1. Authorization: Occurs at checkout. The processor verifies the cardholder's bank for sufficient funds and account standing. If successful, the transaction amount is held (pending). This ensures the payment method is valid and helps prevent chargebacks. The authorization period (usually 7 days, depending on the country) is the window during which the funds must be captured.
    2. Capture: The final step where funds are withdrawn from the customer's account and transferred to the merchant, moving the transaction status from pending to complete.
  4. Understand the Card Payment Authorization and Capture process

    Card payments consist of two primary steps: Authorization and Capture.

    1. Authorization: The merchant initiates a charge. The processor verifies funds and account standing with the bank. If successful, the transaction amount is held (pending). This ensures the payment method is valid and prevents chargebacks. Authorization is typically valid for 7 days, depending on the country.
    2. Capture: The process of completing the transaction. Funds are withdrawn from the customer's account and transferred to the merchant, moving the status from pending to complete.
  5. Understand the Omise Authorization and Capture process

    Card payments consist of two primary steps: Authorization and Capture.

    1. Authorization: The merchant initiates a charge. The processor verifies funds with the bank and places a hold on the transaction amount. This ensures the payment method is valid and prevents chargebacks. Authorization holds are typically valid for 7 days (depending on the country).
    2. Capture: The process of completing the transaction. Funds are withdrawn from the customer and transferred to the merchant, moving the transaction status from pending to complete.
  6. Install Omise plugin for Magento

    Install the Omise plugin using Composer. After the initial installation, if you are adding the module to an existing Magento installation, you must enable the module and run the standard Magento setup and compilation commands.
    # Install the library
    composer require omise/omise-magento
    
    # Enable module and update setup
    php bin/magento module:enable Omise_Payment --clear-static-content
    php bin/magento setup:upgrade
    php bin/magento setup:di:compile
  7. Enable Alipay+ User-Presented Mode Payment (B scan C)

    To enable User-Presented Mode Payment (B scan C) for in-store payments, send an email request to support@omise.co. This feature requires reviewing and accepting new terms and conditions. It is supported in Thailand, Singapore, and Malaysia for various wallets including Alipay CN, Alipay HK, KakaoPay, GCash, Touch 'n Go, and TrueMoney. The minimum API version required is 2017-11-02.
  8. Choose between Automatic and Manual Capture

    Merchants can choose how funds are captured after authorization:

    • Automatic Capture: Payments are captured automatically based on a capture delay. By default, capture happens immediately after authorization.
    • Manual Capture: The merchant must explicitly request a capture before the authorization expires. Manual capture can be performed as a Full Manual Capture, Single Partial Capture, or Multiple Partial Capture.
  9. Implement Alipay+ Merchant-Presented Mode payment flow

    Alipay+ Merchant-Presented Mode (C scan B) uses an offline payment flow. The merchant's POS device generates a QR code which the customer scans using a supported wallet app to authorize and complete the payment.

    The implementation follows these steps:

    1. Create a payment source of type alipayplus_mpm using a public key (via Omise.js or mobile SDKs).
    2. Create a charge using the source identifier and a secret key on the server.
    3. (Optional) Verify the charge status by retrieving the charge after receiving a charge completion webhook event.