This section provides comprehensive details on how to manage inscription orders using the Ordlify API. With these endpoints, you can create new orders, update existing ones, track order status, and finalize payments. Whether youβre handling a single file or managing multiple files across several transactions, the following endpoints will guide you through the process seamlessly.
Create an Order
POST
https://api.ordlify.com/orders
Request Headers:
Copy Accept: application/json
Content-Type: application/json
Request Body:
Required
vByte Rate for the order
Required
Bitcoin address to receive the inscriptions.
Optional
Files can be uploaded during a POST
request or added later with a PATCH
request.
name (string): Required. Name of the file including the extension (e.g., ordlify-logo.svg).
size (number): Required. Size of the file in bytes (e.g., 544).
dataUrl (string): Required. The actual file content as a data URL. Use this if the file is being sent directly.
order (number): Optional. Order of the file to process. Defaults to the natural order of files upload if not specified.
meta (object): Optional. Inscription metadata as key-value pairs.
compress (boolean): Optional. Indicates whether the file should be compressed before processing. We use webp compression for images.
Optional
Needs to be passed to close the order. This can be passed during POST
or PATCH
request later.
Example: Single file inscription
The response includes the payAddress
for transferring funds, with the total amount
specified in satoshis (sats). Since the close
parameter is included in the initial request, the order is finalized and ready for payment. Detailed breakdowns of the order are available under cartItems
in the response.
The example request below is for a single file, with the close
parameter indicating that the order should be processed upon creation.
Request POST
Copy {
"rate": 12,
"receiveAddress": "tb1pvjg7fe6fykpteqm9q5w9cgq7a93rzgqycvxtgzkqzld8d7r2xadq6jh6yw",
"files": [
{
"name": "ordlify-logo.svg",
"size": 544,
"order": 0,
"dataUrl": "data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjIiIGhlaWdodD0iMjIiIGZpbGw9Im5vbmUiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PHBhdGggZmlsbC1ydWxlPSJldmVub2RkIiBjbGlwLXJ1bGU9ImV2ZW5vZGQiIGQ9Ik0xMSAyMmExMS4xIDExLjEgMCAwIDEtOS4zLTVjLjYtMy4xIDEuNy01LjMgMi43LTYuNXYuNWMwIDEuNC4zIDIuNy45IDMuOC41IDEgMS4zIDEuOSAyLjMgMi41IDEgLjYgMi4xLjkgMy40LjlhNyA3IDAgMCAwIDIuNy0uNWMyLS42IDgtNSA2LjctMTIuNmExMS40IDExLjQgMCAwIDEgLjEgMTEuNkExMS4xIDExLjEgMCAwIDEgMTEgMjJabS05LjMtNS0uMi0uM0ExMSAxMSAwIDAgMSAwIDExIDEwLjggMTAuOCAwIDAgMSAxMSAwYzIgMCAzLjkuNSA1LjYgMS40IDEuNS45IDIuOCAyLjEgMy44IDMuNy0uNiAzLTEuNyA1LjItMi44IDYuNVYxMWE4IDggMCAwIDAtLjktMy44IDYgNiAwIDAgMC0yLjMtMi41Yy0xLS41LTItLjgtMy40LS44LTEgMC0yIC4yLTIuOS42QzUuOCA1LjMuMyA5LjcgMS43IDE3WiIgZmlsbD0iIzg5OEE5NSIvPjwvc3ZnPg==",
"meta": {
"Background": "Gray"
}
}
],
"close": true
}
Response
Copy {
"id": "7631bb72-0318-4b7c-9bb6-50c2ad3f57d1",
"refId": "5B73IDX2",
"receiveAddress": "tb1pvjg7fe6fykpteqm9q5w9cgq7a93rzgqycvxtgzkqzld8d7r2xadq6jh6yw",
"payAddress": "bc1p3qdwtwyvxhr8d2vsk03kyadrcerh88vlsuf0t5fncyujwjkq42nszvx40w",
"rate": 12,
"baseFee": 546,
"networkFee": 3875,
"serviceFee": 1500,
"amount": 6115,
"currency": "sats",
"status": "pending",
"createdAt": "2024-08-15T15:51:11.704Z",
"updatedAt": "2024-08-15T15:51:11.704Z",
"cartItems": [
{
"key": "satsInInscription",
"name": "Sats in Inscription",
"price": 546
},
{
"key": "networkFee",
"name": "Network Fee",
"price": 3875
},
{
"key": "serviceBaseFee",
"name": "Service Base Fee",
"price": 1500
},
{
"key": "serviceFee",
"name": "Fees by Size",
"price": 194
}
],
"txId": null,
"inscriptionTxId": null,
"plugin": null,
"orderId": null,
"meta": null,
"type": "ord",
"version": 1,
"txConfirmed": false,
"network": "mainnet"
}
Example: Partial Order
To create a partial order, you need the rate and receiveAddress. You can pass the files either now or later using a PATCH
request. A partial order is considered any order without the close parameter. Partial orders will always carry a status of draft.
Request POST
Copy
{
"rate": 12,
"receiveAddress": "tb1pvjg7fe6fykpteqm9q5w9cgq7a93rzgqycvxtgzkqzld8d7r2xadq6jh6yw",
"files": [
{
"name": "ordlify-logo.svg",
"size": 544,
"order": 0,
"dataUrl": "data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjIiIGhlaWdodD0iMjIiIGZpbGw9Im5vbmUiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PHBhdGggZmlsbC1ydWxlPSJldmVub2RkIiBjbGlwLXJ1bGU9ImV2ZW5vZGQiIGQ9Ik0xMSAyMmExMS4xIDExLjEgMCAwIDEtOS4zLTVjLjYtMy4xIDEuNy01LjMgMi43LTYuNXYuNWMwIDEuNC4zIDIuNy45IDMuOC41IDEgMS4zIDEuOSAyLjMgMi41IDEgLjYgMi4xLjkgMy40LjlhNyA3IDAgMCAwIDIuNy0uNWMyLS42IDgtNSA2LjctMTIuNmExMS40IDExLjQgMCAwIDEgLjEgMTEuNkExMS4xIDExLjEgMCAwIDEgMTEgMjJabS05LjMtNS0uMi0uM0ExMSAxMSAwIDAgMSAwIDExIDEwLjggMTAuOCAwIDAgMSAxMSAwYzIgMCAzLjkuNSA1LjYgMS40IDEuNS45IDIuOCAyLjEgMy44IDMuNy0uNiAzLTEuNyA1LjItMi44IDYuNVYxMWE4IDggMCAwIDAtLjktMy44IDYgNiAwIDAgMC0yLjMtMi41Yy0xLS41LTItLjgtMy40LS44LTEgMC0yIC4yLTIuOS42QzUuOCA1LjMuMyA5LjcgMS43IDE3WiIgZmlsbD0iIzg5OEE5NSIvPjwvc3ZnPg==",
"meta": {
"Background": "Gray"
}
}
]
}
Response :
Copy {
"id": "895af829-1ddd-4245-b9ab-135b7af2c1e4",
"refId": "YA4MAI7L",
"receiveAddress": "tb1pvjg7fe6fykpteqm9q5w9cgq7a93rzgqycvxtgzkqzld8d7r2xadq6jh6yw",
"payAddress": "bc1pe67kgvkzxk0ejtl9kmrfuwvtwfjdruu4y4s3kjgkl86xajzv0v0syxy4l8",
"rate": 12,
"baseFee": 0,
"networkFee": 0,
"serviceFee": 1500,
"amount": 0,
"currency": "sats",
"status": "draft",
"createdAt": "2024-08-15T16:09:41.125Z",
"updatedAt": "2024-08-15T16:09:41.127Z",
"cartItems": {},
"txId": null,
"inscriptionTxId": null,
"plugin": null,
"orderId": null,
"meta": null,
"type": "ord",
"version": 1,
"txConfirmed": false,
"network": "mainnet"
}
Update an Order
PATCH
https://api.ordlify.com/orders/{orderId}
A partial order can be updated with new files and closed using the update order endpoint.
Request Headers:
Copy Accept: application/json
Content-Type: application/json
Request Body:
Optional
Files can be uploaded during a POST
request or added later with a PATCH
request.
name (string): Required. Name of the file including the extension (e.g., ordlify-logo.svg).
size (number): Required. Size of the file in bytes (e.g., 544).
dataUrl (string): Required. The actual file content as a data URL. Use this if the file is being sent directly.
order (number): Optional. Order of the file to process. Defaults to the natural order of files upload if not specified.
meta (object): Optional. Inscription metadata as key-value pairs.
compress (boolean): Optional. Indicates whether the file should be compressed before processing. We use webp compression for images.
Optional
Needs to be passed to close the order. This can be passed during POST
or PATCH
request later.
Request
Copy {
"files": [
{
"name": "ordlify-logo.svg",
"size": 544,
"order": 0,
"dataUrl": "data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjIiIGhlaWdodD0iMjIiIGZpbGw9Im5vbmUiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PHBhdGggZmlsbC1ydWxlPSJldmVub2RkIiBjbGlwLXJ1bGU9ImV2ZW5vZGQiIGQ9Ik0xMSAyMmExMS4xIDExLjEgMCAwIDEtOS4zLTVjLjYtMy4xIDEuNy01LjMgMi43LTYuNXYuNWMwIDEuNC4zIDIuNy45IDMuOC41IDEgMS4zIDEuOSAyLjMgMi41IDEgLjYgMi4xLjkgMy40LjlhNyA3IDAgMCAwIDIuNy0uNWMyLS42IDgtNSA2LjctMTIuNmExMS40IDExLjQgMCAwIDEgLjEgMTEuNkExMS4xIDExLjEgMCAwIDEgMTEgMjJabS05LjMtNS0uMi0uM0ExMSAxMSAwIDAgMSAwIDExIDEwLjggMTAuOCAwIDAgMSAxMSAwYzIgMCAzLjkuNSA1LjYgMS40IDEuNS45IDIuOCAyLjEgMy44IDMuNy0uNiAzLTEuNyA1LjItMi44IDYuNVYxMWE4IDggMCAwIDAtLjktMy44IDYgNiAwIDAgMC0yLjMtMi41Yy0xLS41LTItLjgtMy40LS44LTEgMC0yIC4yLTIuOS42QzUuOCA1LjMuMyA5LjcgMS43IDE3WiIgZmlsbD0iIzg5OEE5NSIvPjwvc3ZnPg==",
"meta": {
"Background": "Gray"
}
}
],
"close": true
}
Indicating Payment
PATCH
https://api.ordlify.com/orders/{orderId}/tx
To process an order, follow these steps:
Capture a payment by transferring the amount in sats from the user's wallet to payAddress
.
Obtain the transaction ID from your app through the connected wallet.
Send the transaction ID to this endpoint to initiate order processing.
Request Headers:
Copy Accept: application/json
Content-Type: application/json
Request Body:
Order Status
GET
https://api.ordlify.com/orders/{orderId}
Order Status Definitions :
Completed : Order inscription is finished.
Processing : Order is being processed and inscribed.
Paid : Payment has been received.
Pending : Awaiting payment.
Draft : Partial order saved.
Order Status API Endpoint :
Fetch the status and details of the order and associated files from this endpoint.
Response
Copy {
"id": "895af829-1ddd-4245-b9ab-135b7af2c1e4",
"refId": "YA4MAI7L",
"receiveAddress": "tb1pvjg7fe6fykpteqm9q5w9cgq7a93rzgqycvxtgzkqzld8d7r2xadq6jh6yw",
"payAddress": "bc1pe67kgvkzxk0ejtl9kmrfuwvtwfjdruu4y4s3kjgkl86xajzv0v0syxy4l8",
"rate": 12,
"baseFee": 1638,
"networkFee": 11343,
"serviceFee": 1500,
"amount": 15049,
"currency": "sats",
"status": "pending",
"createdAt": "2024-08-15T16:09:41.125Z",
"updatedAt": "2024-08-15T16:09:41.127Z",
"cartItems": [
{
"key": "satsInInscription",
"name": "Sats in Inscriptions (x3)",
"price": 1638
},
{
"key": "networkFee",
"name": "Network Fee",
"price": 11343
},
{
"key": "serviceBaseFee",
"name": "Service Base Fee",
"price": 1500
},
{
"key": "serviceFee",
"name": "Fees by Size",
"price": 568
}
],
"txId": null,
"inscriptionTxId": null,
"plugin": null,
"orderId": null,
"meta": null,
"type": "ord",
"version": 1,
"txConfirmed": false,
"network": "mainnet",
"files": [
{
"id": "25f8b1c9-6d68-4fb2-a3d3-72e1f7807a86",
"fileName": "ordlify-logo.svg",
"fileHash": "4f873618eb0ae4ef20365d6968a55b09530ff82c8d7ba9125b00d8d75577ceca",
"fileSize": 544,
"fileType": "image/svg+xml",
"fileUrl": "orders/895af829-1ddd-4245-b9ab-135b7af2c1e4/ordlify-logo.svg",
"status": "pending",
"createdAt": "2024-08-15T16:09:41.277Z",
"updatedAt": "2024-08-15T16:09:41.277Z",
"orderId": "895af829-1ddd-4245-b9ab-135b7af2c1e4",
"txId": null,
"inscriptionId": null,
"order": 0,
"meta": {
"Background": "Gray"
},
"plugin": null,
"rate": 12,
"fee": 3672,
"payAddress": "bc1pggqx93n7g2j078yrq2r4mkpqxv8p4zuydew3e4279pkcqlp2h0cs6u37sg",
"reference": null,
"referenceId": null
},
{
"id": "fe409c36-33d4-4b0f-9363-6c6f408db7c2",
"fileName": "ordlify-logo.svg",
"fileHash": "4f873618eb0ae4ef20365d6968a55b09530ff82c8d7ba9125b00d8d75577ceca",
"fileSize": 544,
"fileType": "image/svg+xml",
"fileUrl": "orders/895af829-1ddd-4245-b9ab-135b7af2c1e4/ordlify-logo.svg",
"status": "pending",
"createdAt": "2024-08-15T16:14:44.928Z",
"updatedAt": "2024-08-15T16:14:44.929Z",
"orderId": "895af829-1ddd-4245-b9ab-135b7af2c1e4",
"txId": null,
"inscriptionId": null,
"order": 0,
"meta": {},
"plugin": null,
"rate": 12,
"fee": 3672,
"payAddress": "bc1psapl8adctmzdksu266enkxhe83telz0u0yzptxe8ez5g3j8q7ksqjcgaq4",
"reference": null,
"referenceId": null
},
{
"id": "3a988ccb-c9e4-4d58-9889-68678cd5451d",
"fileName": "ordlify-logo.svg",
"fileHash": "4f873618eb0ae4ef20365d6968a55b09530ff82c8d7ba9125b00d8d75577ceca",
"fileSize": 544,
"fileType": "image/svg+xml",
"fileUrl": "orders/895af829-1ddd-4245-b9ab-135b7af2c1e4/ordlify-logo.svg",
"status": "pending",
"createdAt": "2024-08-15T16:15:01.179Z",
"updatedAt": "2024-08-15T16:15:01.183Z",
"orderId": "895af829-1ddd-4245-b9ab-135b7af2c1e4",
"txId": null,
"inscriptionId": null,
"order": 0,
"meta": {},
"plugin": null,
"rate": 12,
"fee": 3672,
"payAddress": "bc1psapl8adctmzdksu266enkxhe83telz0u0yzptxe8ez5g3j8q7ksqjcgaq4",
"reference": null,
"referenceId": null
}
]
}
Last updated 5 months ago