Handling Orders

Creating Orders

Create Order

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

This endpoint is used to create new orders

Request Body

{
  "message": "Payment was successful",
  "status": "confirmed",
  "orderId": "0da30...f53b37",
  "ecommerceOrderId": "2",
  "storeId": "3ac0...ad4e9e",
  "transactions": [
    {
      "protocol": "CELO",
      "hash": "0x7a9c9...39517d3d"
    }
  ],
  "updatedProducts": null
}

Updating Orders

Update Orders

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

This endpoint is used to update existing orders.

Path Parameters

Request Body

Get Order

Get Order

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

Use this endpoint to fetch information of an individual order.

Path Parameters

{
  "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

{
  "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": {
        ...
      }
    }
  ]
}

Last updated