---
updatedAt: 2026-05-29T13:25:42.000Z
agentTools:
  projectIndex: https://developer.eftcorp.com/llms.txt
---

# Initiate a reward exchange

Creates a new reward exchange for the wallet using either a selling or buying currency. Simultaneous selling and buying currency exchanges are not supported.

# OpenAPI definition

```json
{
  "servers": [
    {
      "url": "https://eclipse-java-sandbox.ukheshe.rocks",
      "description": "Eclipse sandbox environment"
    },
    {
      "url": "https://ukheshe.live",
      "description": "Eclipse production environment"
    },
    {
      "url": "https://eclipse-java-develop.ukheshe.rocks",
      "description": "Eclipse development environment"
    },
    {
      "url": "https://zw.ukheshe.live",
      "description": "Zim Eclipse production environment"
    }
  ],
  "openapi": "3.1.0",
  "components": {
    "schemas": {
      "EclipseRewardProvider": {
        "description": "Currently supported reward types.",
        "type": "string",
        "enum": [
          "ZA_DUMMY",
          "ZA_GB",
          "ZA_MR",
          "ZA_SAA"
        ]
      },
      "EclipseRewardResult": {
        "type": "object",
        "properties": {
          "buyingAmount": {
            "type": "number",
            "description": "Amount that need to be exchanged e.g. 50.80 for 50 GBP and 80 etc"
          },
          "buyingCurrency": {
            "type": "string",
            "description": "The currency from which wanted to exchange the amount- e.g. GB, SAA"
          },
          "created": {
            "type": "string",
            "format": "date-time",
            "examples": [
              "2022-03-10T12:15:50-04:00"
            ]
          },
          "errorDescription": {
            "type": "string"
          },
          "exchangeRate": {
            "type": "number",
            "description": "The rate of value exchange between currency"
          },
          "feeAmount": {
            "type": "number",
            "description": "The fee which has been debited from source wallet in source wallet currency for value exchange"
          },
          "quoteExpires": {
            "type": "string",
            "format": "date-time",
            "examples": [
              "2022-03-10T12:15:50-04:00"
            ],
            "description": "Quote expire time. "
          },
          "rewardId": {
            "type": "integer",
            "format": "int64"
          },
          "sellingAmount": {
            "type": "number",
            "description": "Amount that need to be exchanged e.g. 50.80 for 50 GBP and 80 etc"
          },
          "sellingCurrency": {
            "type": "string",
            "description": "The currency in which wanted to exchange the amount- e.g. GB, SAA"
          },
          "status": {
            "$ref": "#/components/schemas/EclipseRewardStatus",
            "description": "Status of the value exchange",
            "type": "string"
          },
          "tradeType": {
            "$ref": "#/components/schemas/EclipseRewardTradeType"
          }
        }
      },
      "EclipseRewardStatus": {
        "description": "Status of a reward",
        "type": "string",
        "enum": [
          "BUILDING",
          "CANCELLED",
          "ERROR_PERM",
          "ERROR_TEMP",
          "PENDING",
          "REVERSED",
          "SUCCESSFUL",
          "TIMEOUT"
        ]
      },
      "EclipseRewardTradeType": {
        "type": "string",
        "enum": [
          "BUY",
          "SELL"
        ]
      },
      "ExceptionData": {
        "type": "object",
        "properties": {
          "code": {
            "type": "string"
          },
          "description": {
            "type": "string"
          },
          "environment": {
            "type": "string"
          },
          "info": {
            "type": "object",
            "additionalProperties": {}
          },
          "severity": {
            "$ref": "#/components/schemas/ExceptionSeverity"
          },
          "spanId": {
            "type": "string"
          },
          "stackTrace": {
            "type": "string"
          },
          "traceId": {
            "type": "string"
          },
          "type": {
            "$ref": "#/components/schemas/ExceptionType"
          }
        }
      },
      "ExceptionSeverity": {
        "type": "string",
        "enum": [
          "CRITICAL",
          "HIGH",
          "INFO",
          "LOW",
          "MEDIUM"
        ]
      },
      "ExceptionType": {
        "type": "string",
        "enum": [
          "BUSINESS",
          "SYSTEM"
        ]
      },
      "NewEclipseReward": {
        "type": "object",
        "required": [
          "externalUniqueId",
          "provider"
        ],
        "properties": {
          "additionalFields": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/SuppliedRewardAdditionalField"
            },
            "description": "Optional, Provider base supplied data required in order to do a rewards."
          },
          "buyingAmount": {
            "type": "number",
            "description": "Amount that need to be exchanged e.g. 50.80 for 50 GBP and 80 etc"
          },
          "buyingCurrency": {
            "type": "string",
            "minLength": 2,
            "maxLength": 3
          },
          "callbackUrl": {
            "type": "string",
            "description": "The URL Eclipse must post the EclipseRewardResult to when the value exchange is finalised (either successful or error). Optional as one can always do a GET to get the result instead of using callbacks. This will be a system-system call",
            "pattern": "^http(s)?:\\/\\/.*\\..*$",
            "minLength": 10,
            "maxLength": 2000
          },
          "externalUniqueId": {
            "type": "string",
            "description": "Provide a GUID for the value exchange to prevent replays/duplicates",
            "minLength": 6,
            "maxLength": 100
          },
          "provider": {
            "$ref": "#/components/schemas/EclipseRewardProvider",
            "description": "The value exchange partners",
            "type": "string"
          },
          "sellingAmount": {
            "type": "number",
            "description": "Amount that need to be exchanged e.g. 50.80 for 50 GBP and 80 etc"
          },
          "sellingCurrency": {
            "type": "string",
            "description": "The currency from which wanted to exchange the amount- e.g. GB, SAA",
            "minLength": 2,
            "maxLength": 3
          }
        }
      },
      "SuppliedRewardAdditionalField": {
        "description": "Supplied data required in order to do a rewards",
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "value": {
            "type": "string"
          }
        }
      }
    },
    "securitySchemes": {
      "JWTBearerAuthorisation": {
        "type": "http",
        "scheme": "bearer",
        "bearerFormat": "JWT"
      }
    }
  },
  "info": {
    "description": "A RESTful API using JSON as the data transfer model, covering all tenant-facing functionality in the Eclipse payments platform.",
    "title": "Eclipse ReST API",
    "version": "3.0.0"
  },
  "tags": [
    {
      "name": "t) Rewards Exchange",
      "description": "Manages reward exchange operations, allowing customers to view and redeem rewards accumulated through transactions."
    }
  ],
  "paths": {
    "/eclipse-conductor/rest/v1/tenants/{tenantId}/wallets/{walletId}/rewards": {
      "post": {
        "summary": "Initiate a reward exchange",
        "description": "Creates a new reward exchange for the wallet using either a selling or buying currency. Simultaneous selling and buying currency exchanges are not supported.",
        "tags": [
          "t) Rewards Exchange"
        ],
        "parameters": [
          {
            "name": "tenantId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int64"
            }
          },
          {
            "name": "walletId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int64"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/NewEclipseReward"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/EclipseRewardResult"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request"
          },
          "500": {
            "description": "Internal Server Error",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/ExceptionData"
                  }
                }
              }
            }
          }
        },
        "security": [
          {
            "JWTBearerAuthorisation": []
          }
        ]
      }
    }
  }
}
```