LogoLogo
Cryptum.ioGitHub
  • 🌐Cryptum
    • What is Cryptum
    • DeFi Market
    • Ecosystem
      • Bitcoin
      • Ethereum
      • Polygon
      • Avalanche C-Chain
      • BNB Chain
      • Cardano
      • Celo
      • Hathor
      • Solana
      • Stellar
      • XRP Ledger
      • Stratus
      • Hyperledger Besu
  • 👝Products
    • Dashboard Analytics
    • Tokenization
    • Crypto Checkout
      • Overview
      • Getting started
      • Checkout Dashboard
        • Creating your Store
        • Customer Checkout screens
        • Analytics
        • Managing Wallets
        • Creating Collections and NFTs
        • Linking Products to NFTs
        • Monitoring Orders
      • Checkout API
        • Authentication
        • Store
        • Orders
          • Handling Orders
    • Wallets
    • DeFi-as-a-Service
    • On & Off Ramp (soon)
    • E-commerce Plugins
      • Wordpress NFT Plugin
        • How to install NFT Plugin
        • Connect your Credentials to NFT Plugin
      • Wordpress Checkout Plugin
        • How to install Checkout Plugin
        • Connect your Credentials to Checkout Plugin
      • Plugins Guides
        • Creating your Store
        • Manage your Wallets
        • Creating Collections and NFTs
        • Linking Products to NFTs
        • Monitoring Orders
        • Monitoring Store (Analytics)
  • 💻Community Edition
    • Overview
    • Architecture
    • Start for free
    • Getting started
    • Dashboard guide
      • 🔑Creating a Project (API Key)
      • 🛠️Start building!
      • 📊Monitoring your Project
      • 📈Monitoring Requests
    • SDK guides
      • Get test currencies
      • Chainlink
        • 📈Price Feeds
        • ⚙️Automation
        • 🎲VRF
        • 🛤️CCIP
        • 🛤️CCIP
        • Project Examples
          • Lottery
          • Send Message CCIP
      • Wallets
      • Balances
      • Prices
      • Tokens
        • EVM Tokens (ERC-20)
        • Solana Tokens (SPL)
        • Cardano Tokens
        • Stellar Tokens
        • XRP Tokens
        • Hathor Tokens
      • NFTs
        • EVM NFTs (Ethereum, Polygon and others)
        • NFTs on Solana
        • NFTs on Hathor Network
      • Queries
        • Wallet information
        • Get transaction by hash
        • Get block information
        • Get transaction receipt by hash
        • Get fees information
        • Get NFT data
        • Get NFT balance
        • Get UTXOs (Unspent transaction outputs)
      • Uniswap
      • Staking
      • Smart Contracts
        • Deploy custom Smart Contracts
        • Loot Box
    • Features and credits
      • Avalanche C Chain
      • Bitcoin
      • BNB Chain
      • Cardano
      • Celo
      • Ethereum
      • Hathor
      • Polygon
      • Solana
      • Stellar
      • XRP Ledger
      • Stratus
    • API guides
      • API Cryptum
      • API Connector
  • 📃GLOSSARY
    • Blockchain terms
    • Cryptum terms
Powered by GitBook
On this page
  • Create Order
  • Update Orders
  • Get Order
  • Get Multiple Orders
  1. Products
  2. Crypto Checkout
  3. Checkout API
  4. Orders

Handling Orders

Creating Orders

Create Order

POST https://api.cryptum.io/plugins/orders/checkout

This endpoint is used to create new orders

Request Body

Name
Type
Description

ecommerceOrderId*

string

The id of the order according to your application. This number is arbitrary and may follow your own business logic.

ecommerceType*

enum

For the checkout API, this parameter should be "api". Our wordpress plugin uses "wordpress".

orderTotal*

string

Numerical value of the order

orderCurrency*

string

Which currency the order is based on.

paymentStatus

enum

Either "pending" or "on-hold"

callbackUrl*

string

The address that will receive notifications regarding the order.

store*

string

The store ID that can be found in our dashboard, under your project.

deliveryInfo*

object

Specified bellow.

deliveryInfo.firstName*

string

First name of the customer.

deliveryInfo.lastName*

string

Last name of the customer

deliveryInfo.email*

string

Email of the customer

deliveryInfo.country*

string

Country of the customer

{
  "message": "Payment was successful",
  "status": "confirmed",
  "orderId": "0da30...f53b37",
  "ecommerceOrderId": "2",
  "storeId": "3ac0...ad4e9e",
  "transactions": [
    {
      "protocol": "CELO",
      "hash": "0x7a9c9...39517d3d"
    }
  ],
  "updatedProducts": null
}
{
  "message": "Invalid transaction: received amount is less than order total",
  "status": "failed",
  "orderId": "dba...b23",
  "ecommerceOrderId": "3",
  "storeId": "3ac0...4e9e",
  "transactions": [],
  "updatedProducts": null
}

Updating Orders

Update Orders

PUT https://api.cryptum.io/plugins/checkout/{orderId}

This endpoint is used to update existing orders.

Path Parameters

Name
Type
Description

orderId*

string

The id of the order that will be updated.

Request Body

Name
Type
Description

transactionHash

string

Hash of the transaction that represented the order in the blockchain.

paymentMethod

string

Payment method used for the transaction. e.g. "CELO"

paymentStatus

enum

"pending", "on-hold", "failed" or "cancelled".

blockchain

string

Which blockchain is being used.

convertedTotal

string

Converted order total.

Get Order

Get Order

GET https://api.cryptum.io/plugins/orders/{orderId}

Use this endpoint to fetch information of an individual order.

Path Parameters

Name
Type
Description

orderId*

string

The id of the order that will be fetched.

{
  "callbackUrl": "http://...",
  "sessionToken": "eyJhbG...5m4",
  "id": "f701...672e",
  "ecommerceOrderId": "103",
  "ecommerce": "api",
  "orderTotal": "25.40",
  "orderCurrency": "USD",
  "storeMarkupPercentage": "0",
  "storeDiscountPercentage": "0",
  "cancelReturnUrl": "http://...",
  "successReturnUrl": "http://...",
  "deliveryInfo": {
    "firstName": "...",
    "lastName": "...",
    "email": "email@mail.com",
    "country": "AR"
  },
  "store": {
    "id": "a8f9...9f32",
    "name": "...",
    "email": "email@mail.com",
    "apiKeyId": "",
    "segment": "",
    "userId": "",
    "wallets": [],
    "storeUrl": "",
    "storeDiscountPercentage": "0",
    "storeMarkupPercentage": "0",
    "createdAt": "202...Z"
  },
  "marketRates": {
    "BRL": "1.00",
    "USD": "0.19",
    "EUR": "0.17",
    "JPY": "25.19",
    "BTC": "0.00000791",
    "ETH": "0.00011354",
    "XLM": "2.4025",
    "XRP": "0.519459",
    "BNB": "0.00061351",
    "MDA": "3.844",
    "CELO": "0.32033333",
    "HTR": "2.74",
    "ADA": "0.549142",
    "AVAX": "0.01150898",
    "MATIC": "0.16016667",
    "SOL": "0.009048964"
  }
}

Get Orders

Get Multiple Orders

GET https://api.cryptum.io/plugins/orders/

Query Parameters

Name
Type
Description

limit

number

Default: 100

offset

number

Default: 0

storeId*

string

paymentStatus

enum

"pending", "on-hold", "failed" "cancelled" or "confirmed"

startDate

string

endDate

string

withCount

boolean

withTotal

boolean

{
  "total": 1,
  "orders": [
    {
      "id": "f70...1672e",
      "store": "a8f9...9f32",
      "sessionToken": "eyJhbG..uP5m4",
      "ecommerceOrderId": "103",
      "ecommerce": "api",
      "orderTotal": "25.40",
      "orderCurrency": "USD",
      "storeMarkupPercentage": "0",
      "storeDiscountPercentage": "0",
      "cancelReturnUrl": "http://...",
      "successReturnUrl": "http://...",
      "deliveryInfo": {
        "firstName": "...",
        "lastName": "...",
        "email": "email@gmail.com",
        "city": "...",
        "country": "...",
        "zip": "...",
        "address": "...",
        "complement": "...",
        "state": "..."
      },
      "callbackUrl": "http://...",
      "marketRates": {
        ...
      }
    }
  ]
}

PreviousOrdersNextWallets

Last updated 2 years ago

👝