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.
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.
{"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.
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.
close
Boolean
Optional
Needs to be passed to close the order. This can be passed during POST or PATCH request later.
files
Array
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.
close
Boolean
Optional
Needs to be passed to close the order. This can be passed during POST or PATCH request later.