LogoLogo
  • Introduction
  • Overview
    • What are cryptocurrencies
    • Why accept crypto
    • Our products
      • Payment Gateway
      • Earnings on deposit
      • Manual Invoices
      • Payment & Donation button
      • White Label
      • Affiliate program
      • Demo Shop
  • Getting started
    • Basics
      • What is an Invoice?
      • Accepting Payments
      • Withdrawing Your Funds from OMY Payments
      • Security and Transparency
  • API
    • Overview
    • Authentication
    • API Endpoints
      • Get Merchant Assets
      • Create Invoice
      • Create Invoice by Crypto
      • Get Invoice Data
      • Withdraw Asset
    • Callbacks
    • Common issues
  • No-code Integration
    • Overview
    • Getting Started with No‑Code Integration
  • How to Create Payment Links
  • Advanced Use Cases and Best Practices for No‑Code Integration
  • Legal
    • Terms of Use
Powered by GitBook
On this page
  1. API
  2. API Endpoints

Create Invoice

Request:

POST /2.0/merchant/create-invoice

Request Body:

{
    "usdAmountInCents": 10000, // Invoice amount in cents
    "assetId": "uuid", // Optional: Predefined asset ID for payment
    "productTitle": "Test Product", // Optional: Product title
    "extraData": "Optional data" // Optional: Additional invoice parameters
}

Response (200 OK):

{
    "id": "UUID", // Invoice ID
    "usdAmount": "0", // Invoice amount in USD
    "status": "pending", // Invoice status
    "paymentPageLink": "https://pp.omypayments.com/?id=UUID", // Link to the payment page
    "productTitle": "Test Product", // Product title
    "extraData": null, // Additional invoice information.
    "cryptoAmount": "0", // Amount in selected cryptocurrency (or null if not chosen)
    "crypto": { // Cryptocurrency data (or null if not chosen)
        "id": "uuid", // Crypto UUID
        "title": "Tether USD", // Crypto title
        "symbol": "USDT" // Crypto symbol
        "contractAddress": "0x0000000000000000000000000000000000000000" // Crypto contract address
        "decimals": 6 // Crypto decimals
        "logoURI": "https://..." // Crypto logo URI
    },
    "network": { // Network data (or null if not chosen)
        "id": "UUID", // Network UUID
        "chainId": "56", // Network chain ID
        "symbol": "BSC", // Network symbol
        "name": "BNB Chain", // Network title
        "networkType": "evm" // Network type
    },
    "address": "0x0000000000000000000000000000000000000000", // Payment address (or null if not chosen)
    "expiredAt": "2025-03-11 14:30:16" // Invoice expiration datetime (UTC+0)
}

Error Responses:

  • 400 Bad Request (Validation Error):

    {
        "success": false,
        "message": "Validation error",
        "errors": [
            {
                "field": "usdAmountInCents",
                "messages": ["Invalid value format"]
            }
        ]
    }
  • 500 Internal Server Error:

    {
        "success": false,
        "message": "Internal Server Error",
        "statusCode": 500
    }
PreviousGet Merchant AssetsNextCreate Invoice by Crypto

Last updated 13 days ago