Create a Transaction

Prepare a DLT transaction for signing

The first step of submitting a transaction to Overledger requires preparing the transaction for signing. This API transforms a transaction request into a payload that can be signed. It returns a request ID that is used to execute the transaction after it is signed.

There are three types of transactions supported:

  • Payment
    • Send payments in the native token of the network
    • Send payments with ERC20 fungible tokens supported by Overledger on Ethereum-compatible networks
  • Transfer
    • Transfer ownership of ERC721 non-fungible tokens supported by Overledger on Ethereum
  • Contract Invoke
    • Call any function on any contract deployed on Ethereum, Polygon, XDC Network or our Hyperledger Fabric Sandbox
SecurityOAuth2_Security_Scheme
Request
header Parameters
Authorization
required
string [ 0 .. 5010 ] characters ^Bearer [A-Za-z0-9\-_. ]{1,5010}$
Request Body schema: application/json
One of:
urgency
required
string [ 0 .. 30 ] characters ^[A-Za-z ]{1,30}

This value defines how fast a transaction is processed on a network. A faster processing requirement will result in higher fees. If the urgency field is not provided, the default setting is normal

Enum: "Normal" "Fast" "Urgent"
required
object (PaymentRequestDetailsSchema)

The payload request

required
object (Location)

Unique reference to the ledger on a particular ledger network (optionally accessed from a particular node)

type
required
string [ 0 .. 30 ] characters ^[A-Za-z ]{1,30}

The type of the transaction

Enum: "Payment" "Transfer" "Contract Invoke"
Responses
200

All good!

400

Bad Request

401

Unauthorised

500

Something went wrong on our side

post/v2/preparation/transaction
Request samples
application/json

Substrate

{
  • "urgency": "normal",
  • "requestDetails": {
    },
  • "location": {
    },
  • "type": "PAYMENT"
}
Response samples
application/json

Prepare Response

{
  • "gatewayFee": {
    },
  • "requestId": "e566fab4-141d-445e-8c3c-e936c553cc99",
  • "dltFee": {
    },
  • "nativeData": {
    }
}

Execute a native transaction on the DLT

Takes a request ID and submits a signed native transaction to the requested DLT

SecurityOAuth2_Security_Scheme
Request
header Parameters
Authorization
required
string [ 0 .. 5010 ] characters ^Bearer [A-Za-z0-9\-_. ]{1,5010}$
Request Body schema: application/json
requestId
required
string [ 0 .. 36 ] characters ^[A-Za-z0-9-]{1,36}$

The ID assigned to a preparation request in Overledger

signed
string [ 0 .. 400 ] characters ^[A-Za-z0-9-]{1,400}$

The raw data after transaction signing

Responses
200

All good!

401

Unauthorised

404

Not Found

500

Something went wrong on our side

post/v2/execution/nativetransaction
Request samples
application/json

Execute Native Transaction

{
  • "requestId": "79763168-a4f9-42bf-9f10-2e08491136a7",
  • "signed": "0xf8a9398501ef4f86e682a0c294f9cd6c86992fce1481dbc4bdb7e1b101c1e8cee280b844a9059cbb000000000000000000000000d8b31b65878a6b1a6caf9f4819c1a42d68a7a11600000000000000000000000000000000000000000000000000038d7ea4c6800029a088680bffd2eb74053e968ac8bcd1f76beaa61b353d8616a8cc559e57685080bea07a77b7591f09290fbb9cda5263471e8a9ca46f4c7b30d6a4885e583771d809f5"
}
Response samples
application/json

Execute Response

{
  • "requestId": "242284e2-e53e-4c28-b74c-e5b2c5fa7399",
  • "overledgerTransactionId": "dded55c2-a0fb-4e7b-8f95-771332c32507",
  • "location": {
    },
  • "type": "Native Transaction",
  • "transactionId": "0x05b4b5cf07013acfed5a2ffbfc51c4d16e920cfbcc86d68ed71a3a418b9a110e",
  • "status": {
    }
}

Execute a transaction on a DLT

Takes a request ID and submits a signed transaction to the requested DLT.

SecurityOAuth2_Security_Scheme
Request
header Parameters
Authorization
required
string [ 0 .. 5010 ] characters ^Bearer [A-Za-z0-9\-_. ]{1,5010}$
Request Body schema: application/json
requestId
required
string [ 0 .. 36 ] characters ^[A-Za-z0-9-]{1,36}$

The ID assigned to a preparation request in Overledger

signed
string [ 0 .. 400 ] characters ^[A-Za-z0-9-]{1,400}$

The raw data after transaction signing

Responses
200

All good!

401

Unauthorised

404

Not Found

500

Something went wrong on our side

post/v2/execution/transaction
Request samples
application/json

Execute Transaction

{
  • "requestId": "79763168-a4f9-42bf-9f10-2e08491136a7",
  • "signed": "0xf8a9398501ef4f86e682a0c294f9cd6c86992fce1481dbc4bdb7e1b101c1e8cee280b844a9059cbb000000000000000000000000d8b31b65878a6b1a6caf9f4819c1a42d68a7a11600000000000000000000000000000000000000000000000000038d7ea4c6800029a088680bffd2eb74053e968ac8bcd1f76beaa61b353d8616a8cc559e57685080bea07a77b7591f09290fbb9cda5263471e8a9ca46f4c7b30d6a4885e583771d809f5"
}
Response samples
application/json

Bitcoin

{
  • "urgency": "normal",
  • "requestId": "5d4935ae-d395-4cc7-a7e6-3777127cfd09",
  • "overledgerTransactionId": "ac71c2f4-ab67-434f-b83a-4514ce10847a",
  • "location": {
    },
  • "type": "payment",
  • "transactionId": "320034aa1ea43541fcdcfa65ef7e127c19935b532bc59f92ad227370011d9cef",
  • "status": {
    }
}

Prepare a DLT native transaction

Allows advanced developers to submit their own DLT native transactions via Overledger. Returns a request ID for executing a DLT native transaction on the requested DLT

SecurityOAuth2_Security_Scheme
Request
header Parameters
Authorization
required
string [ 0 .. 5010 ] characters ^Bearer [A-Za-z0-9\-_. ]{1,5010}$
Request Body schema: application/json
object (Location)

Unique reference to the ledger on a particular ledger network (optionally accessed from a particular node)

type
string [ 0 .. 30 ] characters ^[A-Za-z ]{1,30}

The type of the object

Responses
200

All good!

401

Unauthorised

500

Something went wrong on our side

post/v2/preparation/nativetransaction
Request samples
application/json

Native Transaction

{
  • "location": {
    },
  • "type": "Native Transaction"
}
Response samples
application/json

Prepare Response

{
  • "gatewayFee": {
    },
  • "requestId": "13765b06-eaf3-4f02-acb4-b7e9da8b0380"
}