Farcaster
- User
- Signer
- Cast
- Feed
- Reaction
- Notifications
- Channel
- Follows
- Storage
- Mini Apps
- Agents
- Fname
- Webhook
- Action
- Mute
- Block
- Ban
- Onchain
- Login
- Metrics
Onchain
Farcaster Hub API
- Info
- Casts
- Reactions
- Links
- UserData
- Fids
- Storage
- Usernames
- Verifications
- OnChainEvents
- Message
- HubEvents
Neynar SDK
- Getting Started with Neynar NodeJS SDK
- NodeJS SDK v1 to v2 migration guide
- Getting Started with Neynar Rust SDK
- Getting Started with Neynar Go SDK
Dynamic Transaction Frames
Create transaction pay mini app
Creates a new transaction pay mini app that can be used to collect payments through a mini app
POST
/
farcaster
/
frame
/
transaction
/
pay
curl --request POST \
--url https://api.neynar.com/v2/farcaster/frame/transaction/pay \
--header 'Content-Type: application/json' \
--header 'x-api-key: <api-key>' \
--data '{
"transaction": {
"to": {
"address": "0x5a927ac639636e534b678e81768ca19e2c6280b7",
"network": "ethereum",
"token_contract_address": "0x833589fcd6edb6e08f4c7c32d4f71b54bda02913",
"amount": 0.01
}
},
"config": {
"allowlist_fids": [
3
],
"line_items": [
{
"name": "Payment",
"description": "Payment for goods",
"image": "https://i.imgur.com/ovGo3sz.png"
}
],
"action": {
"text": "Pay",
"text_color": "#FFFFFF",
"button_color": "#000000"
}
},
"idem": "<string>"
}'
{
"transaction_frame": {
"id": "<string>",
"url": "<string>",
"type": "pay",
"config": {
"allowlist_fids": [
3
],
"line_items": [
{
"name": "Payment",
"description": "Payment for goods",
"image": "https://i.imgur.com/ovGo3sz.png"
}
],
"action": {
"text": "Pay",
"text_color": "#FFFFFF",
"button_color": "#000000"
}
},
"status": "created",
"transaction": {
"to": {
"address": "0x5a927ac639636e534b678e81768ca19e2c6280b7",
"network": "ethereum",
"token_contract_address": "0x833589fcd6edb6e08f4c7c32d4f71b54bda02913",
"amount": 0.01
}
}
}
}
Read more about this API here: Make agents prompt transactions
Authorizations
API key to authorize requests
Body
application/json
Response
200
application/json
Transaction mini app successfully created
The response is of type object
.
Was this page helpful?
curl --request POST \
--url https://api.neynar.com/v2/farcaster/frame/transaction/pay \
--header 'Content-Type: application/json' \
--header 'x-api-key: <api-key>' \
--data '{
"transaction": {
"to": {
"address": "0x5a927ac639636e534b678e81768ca19e2c6280b7",
"network": "ethereum",
"token_contract_address": "0x833589fcd6edb6e08f4c7c32d4f71b54bda02913",
"amount": 0.01
}
},
"config": {
"allowlist_fids": [
3
],
"line_items": [
{
"name": "Payment",
"description": "Payment for goods",
"image": "https://i.imgur.com/ovGo3sz.png"
}
],
"action": {
"text": "Pay",
"text_color": "#FFFFFF",
"button_color": "#000000"
}
},
"idem": "<string>"
}'
{
"transaction_frame": {
"id": "<string>",
"url": "<string>",
"type": "pay",
"config": {
"allowlist_fids": [
3
],
"line_items": [
{
"name": "Payment",
"description": "Payment for goods",
"image": "https://i.imgur.com/ovGo3sz.png"
}
],
"action": {
"text": "Pay",
"text_color": "#FFFFFF",
"button_color": "#000000"
}
},
"status": "created",
"transaction": {
"to": {
"address": "0x5a927ac639636e534b678e81768ca19e2c6280b7",
"network": "ethereum",
"token_contract_address": "0x833589fcd6edb6e08f4c7c32d4f71b54bda02913",
"amount": 0.01
}
}
}
}
Assistant
Responses are generated using AI and may contain mistakes.