---
agentTools:
  projectIndex: https://oneramp.readme.io/llms.txt
---

# Submit onchain hash

[<img src="https://run.pstmn.io/button.svg" alt="Run In Postman" style="width: 128px; height: 32px;">](https://www.postman.com/speeding-astronaut-312013/oneramp-public-api/request/je3wc5d/oneramp-api-live?action=share\&creator=14403816\&ctx=documentation\&active-environment=12967887-b11e3b15-2c66-42b0-aaea-6c82db2932a4)

# OpenAPI definition

```json
{
  "openapi": "3.1.0",
  "info": {
    "title": "OneRamp URL",
    "version": "1.0"
  },
  "servers": [
    {
      "url": "https://api.oneramp.io"
    }
  ],
  "components": {
    "securitySchemes": {
      "sec0": {
        "type": "apiKey",
        "in": "header",
        "name": "Bearer"
      }
    }
  },
  "security": [
    {
      "sec0": []
    }
  ],
  "paths": {
    "/tx": {
      "post": {
        "summary": "Submit onchain hash",
        "description": "",
        "operationId": "submit-onchain-transaction",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "transferId": {
                    "type": "string",
                    "description": "Enter the transfer Id coming from the transfer"
                  },
                  "txHash": {
                    "type": "string",
                    "description": "Enter the blockchain transaction hash made from blockchain order made"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "200",
            "content": {
              "application/json": {
                "examples": {
                  "Result": {
                    "value": "{}"
                  }
                },
                "schema": {
                  "type": "object",
                  "properties": {}
                }
              }
            }
          },
          "400": {
            "description": "400",
            "content": {
              "application/json": {
                "examples": {
                  "Result": {
                    "value": "{}"
                  }
                },
                "schema": {
                  "type": "object",
                  "properties": {}
                }
              }
            }
          }
        },
        "deprecated": false,
        "x-readme": {
          "code-samples": [
            {
              "language": "curl",
              "code": "curl --location 'https://api.oneramp.io/tx' \\\n--header 'Idempotency-Key: <id-key>' \\\n--header 'Content-Type: application/json' \\\n--header 'Authorization: Bearer oneramp-api-key' \\\n--data '{\n    \"transferId\": \"<transfer-id>\",\n    \"txHash\": \"<blockchain-transaction-hash>\"\n}'"
            },
            {
              "language": "javascript",
              "code": "const axios = require('axios');\nlet data = JSON.stringify({\n  \"transferId\": \"<transfer-id>\",\n  \"txHash\": \"<blockchain-transaction-hash>\"\n});\n\nlet config = {\n  method: 'post',\n  maxBodyLength: Infinity,\n  url: 'https://api.oneramp.io/tx',\n  headers: { \n    'Idempotency-Key': '<id-key>', \n    'Content-Type': 'application/json', \n    'Authorization': 'Bearer oneramp-api-key'\n  },\n  data : data\n};\n\naxios.request(config)\n.then((response) => {\n  console.log(JSON.stringify(response.data));\n})\n.catch((error) => {\n  console.log(error);\n});\n"
            },
            {
              "language": "python",
              "code": "import requests\nimport json\n\nurl = \"https://api.oneramp.io/tx\"\n\npayload = json.dumps({\n  \"transferId\": \"<transfer-id>\",\n  \"txHash\": \"<blockchain-transaction-hash>\"\n})\nheaders = {\n  'Idempotency-Key': '<id-key>',\n  'Content-Type': 'application/json',\n  'Authorization': 'Bearer oneramp-api-key'\n}\n\nresponse = requests.request(\"POST\", url, headers=headers, data=payload)\n\nprint(response.text)\n"
            },
            {
              "language": "php",
              "code": "<?php\n$client = new Client();\n$headers = [\n  'Idempotency-Key' => '<id-key>',\n  'Content-Type' => 'application/json',\n  'Authorization' => 'Bearer oneramp-api-key'\n];\n$body = '{\n  \"transferId\": \"<transfer-id>\",\n  \"txHash\": \"<blockchain-transaction-hash>\"\n}';\n$request = new Request('POST', 'https://api.oneramp.io/tx', $headers, $body);\n$res = $client->sendAsync($request)->wait();\necho $res->getBody();\n"
            }
          ],
          "samples-languages": [
            "curl",
            "javascript",
            "python",
            "php"
          ]
        }
      }
    }
  },
  "x-readme": {
    "headers": [],
    "explorer-enabled": true,
    "proxy-enabled": true
  },
  "x-readme-fauxas": true,
  "_id": "6578a18ab9ee9e04ffd2297b:682883eed68b49003d8ef0f1"
}
```