Technical Reference
API Reference
MiniKit introduces a new api for verifying transactions.
Get Transaction
This endpoint lets you query your apps transactions for their current status. You will only be able to
query for transactions of apps where you possess the api_key.
Query Params
- Name
app_id- Type
- string
- Required
- REQUIRED
- Description
The
app_idcorresponding to the transaction that is being queried.
- Name
type- Type
- string
- Required
- REQUIRED
- Description
The
typeis either payment (pay) or transaction (sendTransaction) depending on the command you used.
Request Headers
- Name
Authorization- Type
- string
- Required
- REQUIRED
- Description
The
Authorizationheader should be theapi_keyfor your app from the Developer Portal. Make sure to prefix it withBearer {api_key}.
Request
curl -X GET "/api/v2/minikit/transaction/{transaction_id}" \
-H "Authorization: Bearer {api_key}"
Response
- Name
reference- Type
- string
- Description
The
referenceis your specified unique identifier for the transaction.
- Name
transaction_hash- Type
- string
- Description
The
transaction_hashis the hash of the transaction on the blockchain.
- Name
transaction_status- Type
- string
- Description
The current
transaction_status, can be either 'pending', 'mined', or 'failed'.
- Name
from- Type
- string
- Description
The
fromis the address of the sender.
- Name
chain- Type
- string
- Description
The
chainis the name of the blockchain network.
- Name
timestamp- Type
- string
- Description
The
timestampis the time when the transaction was created, in ISO 8601 format.
- Name
token_amount- Type
- string
- Description
The
token_amountis the amount of tokens transferred, in BigInt with 6 decimals.
- Name
token- Type
- string
- Description
The
tokenis the type of token transferred.
- Name
to- Type
- string
- Description
The
tois the address of the receiver.
- Name
app_id- Type
- string
- Description
The
app_idis the identifier of the app initiating the transaction.
Response
{
"reference": "1fa38f30-8ee1-4e4b-9988-0517a774f96c",
"transaction_hash": "0xfb25cb74b13d51deeb1a91460619c3d86a7637d40dd29831aa38dd6cbb05e880",
"transaction_status": "pending | mined | failed",
"from": "0x0c892815f0B058E69987920A23FBb33c834289cf",
"chain": "worldchain",
"timestamp": "2024-01-01T00:00:00.000Z", // ISO 8601
"token_amount": "100000000", // amount in BigInt with 6 decimals
"token": "USDCE",
"to": "0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045",
"app_id": "app_9a73963d73efdf2e7d9472593dc9dffd"
}
Get Prices
This endpoint lets you query the latest prices of the Worldcoin token in various fiat currencies. We offer this as a service to make it easier to use WLD as a currency.
Query Params
- Name
fiatCurrencies- Type
- string
- Required
- REQUIRED
- Description
The
fiatCurrenciesis a comma-separated list of fiat currencies following ISO4217 currency code. eg.USD,EUR,JPY,ARS
- Name
cryptoCurrencies- Type
- string
- Required
- REQUIRED
- Description
The
cryptoCurrenciesis a comma-separated list of currencies we support. eg.USDCE,WLD
Request
curl -X GET "https://app-backend.worldcoin.dev/public/v1/prices?cryptoCurrencies=WLD&fiatCurrencies=USD"
Response (abridged)
Detailed are a just a few values in the return that could be confusing. See the response object in the bottom right column for the full list of fields
- Name
prices- Type
- string
- Description
The
pricesis an object where each key is the respective currency code
- Name
amount- Type
- string
- Description
The
amountrepresents the non converted value for the price of 1 WLD for a given currency
- Name
decimals- Type
- string
- Description
The current
decimals, should be used to calculate the converted price. ie an amount of 1000000 with 6 decimals would mean a price of $1.00 via, 1000000 * 10^-6
Response
{
"result": {
"prices": {
"WLD": {
"USD": {
"asset": "USD",
"amount": "1510763",
"decimals": 6,
"symbol": "USD"
},
},
"USDCE": {
"USD": {
"asset": "USD",
"amount": "1000058",
"decimals": 6,
"symbol": "USD"
},
}
}
}
}
Get Usernames
Usernames are our third party ENS compatible name service. Here you can find detailed documentation and try the endpoints.