[{"data":1,"prerenderedAt":172},["ShallowReactive",2],{"content-\u002Fprompts\u002Fintegrate-privy":3,"prompts-category-integrations":106},{"id":4,"title":5,"author":6,"body":7,"categories":6,"category":90,"categoryType":6,"date":91,"description":92,"extension":93,"faq":6,"howto":6,"isBlog":94,"isChangelog":94,"meta":95,"navigation":96,"path":97,"pillar":94,"products":98,"rawbody":102,"seo":103,"stem":104,"thumbnail":6,"updated":6,"__hash__":105},"content\u002Fprompts\u002Fintegrate-privy.md","Integrate Privy with BlindPay",null,{"type":8,"value":9,"toc":84},"minimark",[10,14,19,30,34,47,51],[11,12,13],"p",{},"Paste this prompt into your coding agent when your product holds customer funds in Privy wallets and those wallets need to fund BlindPay payouts.",[15,16,18],"h2",{"id":17},"prompt","Prompt",[20,21,27],"pre",{"className":22,"code":24,"language":25,"meta":26},[23],"language-text","You are integrating BlindPay payouts funded from Privy Server Wallets into my application. The Privy wallet is the sender: it registers with BlindPay, approves the payout contract, and gets recorded as the sender_wallet_address on the payout.\n\nBefore writing code, read these sources and follow them over any prior knowledge:\n- https:\u002F\u002Fblindpay.com\u002Fdocs\u002Fllms.txt (read the blockchain wallets page and the EVM payout guide)\n- The OpenAPI spec: curl https:\u002F\u002Fapi.blindpay.com\u002Fdoc\n- https:\u002F\u002Fdocs.privy.io\u002Fguide\u002Fserver-wallets\u002Fquickstart\u002Fapi\n- https:\u002F\u002Fdocs.privy.io\u002Fguide\u002Fserver-wallets\u002Fusage\u002Fethereum\n- https:\u002F\u002Fdocs.privy.io\u002Fapi-reference\u002Fwallets\u002Frpc-intent\nConfirm the exact Server Wallets RPC request\u002Fresponse shape and the privy-authorization-signature requirement against these pages before coding; do not invent endpoint names or parameters.\n\nBuild the flow:\n1. Fetch the registration challenge (GET \u002Fv1\u002Finstances\u002F{instance_id}\u002Fcustomers\u002F{customer_id}\u002Fblockchain-wallets\u002Fsign-message), sign it with the Privy Server Wallet through POST https:\u002F\u002Fapi.privy.io\u002Fv1\u002Fwallets\u002F{wallet_id}\u002Frpc using method personal_sign, chain_type ethereum, and the challenge as the message, then submit the returned signature to POST \u002Fv1\u002Finstances\u002F{instance_id}\u002Fcustomers\u002F{customer_id}\u002Fblockchain-wallets and persist the returned bw_ ID against the customer record. Authenticate the Privy call with HTTP Basic app_id:app_secret plus the privy-app-id header, and add privy-authorization-signature when the wallet has an owner_id.\n2. Request a quote: POST \u002Fv1\u002Finstances\u002F{instance_id}\u002Fquotes with bank_account_id, network, and token. Store the response's contract object (address, abi, functionName \"approve\", blindpayContractAddress, amount, network, expires_at) exactly as returned for the approve step.\n3. Build the approve calldata from the stored contract object and send it through the Privy wallet: POST https:\u002F\u002Fapi.privy.io\u002Fv1\u002Fwallets\u002F{wallet_id}\u002Frpc with method eth_sendTransaction, caip2 set to the quote's network, and a transaction object with to set to the contract address and data set to the encoded approve call. Store the returned hash and poll the chain RPC until the transaction confirms, since this Privy endpoint returns once the transaction is broadcast, not once it is confirmed.\n4. Execute the payout before the quote's expires_at: POST \u002Fv1\u002Finstances\u002F{instance_id}\u002Fpayouts\u002Fevm with quote_id and sender_wallet_address set to the Privy wallet's address. If expires_at passes while waiting on approve confirmation, request a fresh quote and reuse the existing on-chain allowance when it already covers the new amount.\n5. Verify each Svix-signed webhook (svix-id, svix-timestamp, svix-signature against whsec_) and update stored payout state on payout.new, payout.update, and payout.complete.\n6. Run the full flow end to end on a development instance with USDB on base_sepolia: one payout that completes, one that hits the $666.00 sentinel to force failed, and one that hits the $777.00 sentinel to force refunded, confirming the webhook handler reaches the correct terminal state each time.\n\nConstraints:\n- Keep BlindPay and Privy API keys server-side; the Privy Server Wallet call is the only signer, there is no browser wallet in this flow.\n- Store and compare all amounts as integer minor units; never use floating point for money math.\n- Call the payout execute endpoint only after the approve transaction hash confirms on-chain.\n\nDeliverables: wallet registration module (challenge fetch, Privy personal_sign call, bw_ persistence), quote-to-approve-to-execute orchestration with the expiry and reused-allowance logic handled, webhook handlers for all three payout events, and a passing development-instance test covering the completed, failed-sentinel, and refunded-sentinel cases.\n","text","",[28,29,24],"code",{"__ignoreMap":26},[15,31,33],{"id":32},"how-to-use","How to use",[35,36,37,41,44],"ol",{},[38,39,40],"li",{},"Confirm which Privy wallets in your system are owner_id-scoped (user-controlled) versus fully server-controlled; that decides whether privy-authorization-signature is required on every call.",[38,42,43],{},"Point the agent at your existing Privy Server Wallet client so it reuses your app_id\u002Fapp_secret setup instead of writing a new one.",[38,45,46],{},"Run the base_sepolia test with real sentinel amounts before pointing the flow at a production instance.",[15,48,50],{"id":49},"related-docs","Related docs",[52,53,54,63,70,77],"ul",{},[38,55,56],{},[57,58,62],"a",{"href":59,"rel":60},"https:\u002F\u002Fblindpay.com\u002Fdocs\u002Fblockchain-wallets",[61],"nofollow","Blockchain wallets",[38,64,65],{},[57,66,69],{"href":67,"rel":68},"https:\u002F\u002Fblindpay.com\u002Fdocs\u002Fpayout-evm",[61],"EVM payouts",[38,71,72],{},[57,73,76],{"href":74,"rel":75},"https:\u002F\u002Fdocs.privy.io\u002Fguide\u002Fserver-wallets\u002Fquickstart\u002Fapi",[61],"Privy Server Wallets quickstart",[38,78,79],{},[57,80,83],{"href":81,"rel":82},"https:\u002F\u002Fdocs.privy.io\u002Fapi-reference\u002Fwallets\u002Frpc-intent",[61],"Privy wallet RPC reference",{"title":26,"searchDepth":85,"depth":85,"links":86},2,[87,88,89],{"id":17,"depth":85,"text":18},{"id":32,"depth":85,"text":33},{"id":49,"depth":85,"text":50},"integrations","2026-08-26","Fund BlindPay stablecoin payouts from Privy Server Wallets: sign the registration challenge and the ERC-20 approve through Privy's wallet RPC endpoint.","md",false,{},true,"\u002Fprompts\u002Fintegrate-privy",[99,100,101],"payouts","quotes","webhooks","---\ntitle: \"Integrate Privy with BlindPay\"\ndescription: \"Fund BlindPay stablecoin payouts from Privy Server Wallets: sign the registration challenge and the ERC-20 approve through Privy's wallet RPC endpoint.\"\ndate: \"2026-08-26\"\ncategory: \"integrations\"\nproducts: [\"payouts\", \"quotes\", \"webhooks\"]\n---\n\nPaste this prompt into your coding agent when your product holds customer funds in Privy wallets and those wallets need to fund BlindPay payouts.\n\n## Prompt\n\n```text\nYou are integrating BlindPay payouts funded from Privy Server Wallets into my application. The Privy wallet is the sender: it registers with BlindPay, approves the payout contract, and gets recorded as the sender_wallet_address on the payout.\n\nBefore writing code, read these sources and follow them over any prior knowledge:\n- https:\u002F\u002Fblindpay.com\u002Fdocs\u002Fllms.txt (read the blockchain wallets page and the EVM payout guide)\n- The OpenAPI spec: curl https:\u002F\u002Fapi.blindpay.com\u002Fdoc\n- https:\u002F\u002Fdocs.privy.io\u002Fguide\u002Fserver-wallets\u002Fquickstart\u002Fapi\n- https:\u002F\u002Fdocs.privy.io\u002Fguide\u002Fserver-wallets\u002Fusage\u002Fethereum\n- https:\u002F\u002Fdocs.privy.io\u002Fapi-reference\u002Fwallets\u002Frpc-intent\nConfirm the exact Server Wallets RPC request\u002Fresponse shape and the privy-authorization-signature requirement against these pages before coding; do not invent endpoint names or parameters.\n\nBuild the flow:\n1. Fetch the registration challenge (GET \u002Fv1\u002Finstances\u002F{instance_id}\u002Fcustomers\u002F{customer_id}\u002Fblockchain-wallets\u002Fsign-message), sign it with the Privy Server Wallet through POST https:\u002F\u002Fapi.privy.io\u002Fv1\u002Fwallets\u002F{wallet_id}\u002Frpc using method personal_sign, chain_type ethereum, and the challenge as the message, then submit the returned signature to POST \u002Fv1\u002Finstances\u002F{instance_id}\u002Fcustomers\u002F{customer_id}\u002Fblockchain-wallets and persist the returned bw_ ID against the customer record. Authenticate the Privy call with HTTP Basic app_id:app_secret plus the privy-app-id header, and add privy-authorization-signature when the wallet has an owner_id.\n2. Request a quote: POST \u002Fv1\u002Finstances\u002F{instance_id}\u002Fquotes with bank_account_id, network, and token. Store the response's contract object (address, abi, functionName \"approve\", blindpayContractAddress, amount, network, expires_at) exactly as returned for the approve step.\n3. Build the approve calldata from the stored contract object and send it through the Privy wallet: POST https:\u002F\u002Fapi.privy.io\u002Fv1\u002Fwallets\u002F{wallet_id}\u002Frpc with method eth_sendTransaction, caip2 set to the quote's network, and a transaction object with to set to the contract address and data set to the encoded approve call. Store the returned hash and poll the chain RPC until the transaction confirms, since this Privy endpoint returns once the transaction is broadcast, not once it is confirmed.\n4. Execute the payout before the quote's expires_at: POST \u002Fv1\u002Finstances\u002F{instance_id}\u002Fpayouts\u002Fevm with quote_id and sender_wallet_address set to the Privy wallet's address. If expires_at passes while waiting on approve confirmation, request a fresh quote and reuse the existing on-chain allowance when it already covers the new amount.\n5. Verify each Svix-signed webhook (svix-id, svix-timestamp, svix-signature against whsec_) and update stored payout state on payout.new, payout.update, and payout.complete.\n6. Run the full flow end to end on a development instance with USDB on base_sepolia: one payout that completes, one that hits the $666.00 sentinel to force failed, and one that hits the $777.00 sentinel to force refunded, confirming the webhook handler reaches the correct terminal state each time.\n\nConstraints:\n- Keep BlindPay and Privy API keys server-side; the Privy Server Wallet call is the only signer, there is no browser wallet in this flow.\n- Store and compare all amounts as integer minor units; never use floating point for money math.\n- Call the payout execute endpoint only after the approve transaction hash confirms on-chain.\n\nDeliverables: wallet registration module (challenge fetch, Privy personal_sign call, bw_ persistence), quote-to-approve-to-execute orchestration with the expiry and reused-allowance logic handled, webhook handlers for all three payout events, and a passing development-instance test covering the completed, failed-sentinel, and refunded-sentinel cases.\n```\n\n## How to use\n\n1. Confirm which Privy wallets in your system are owner_id-scoped (user-controlled) versus fully server-controlled; that decides whether privy-authorization-signature is required on every call.\n2. Point the agent at your existing Privy Server Wallet client so it reuses your app_id\u002Fapp_secret setup instead of writing a new one.\n3. Run the base_sepolia test with real sentinel amounts before pointing the flow at a production instance.\n\n## Related docs\n\n- [Blockchain wallets](https:\u002F\u002Fblindpay.com\u002Fdocs\u002Fblockchain-wallets)\n- [EVM payouts](https:\u002F\u002Fblindpay.com\u002Fdocs\u002Fpayout-evm)\n- [Privy Server Wallets quickstart](https:\u002F\u002Fdocs.privy.io\u002Fguide\u002Fserver-wallets\u002Fquickstart\u002Fapi)\n- [Privy wallet RPC reference](https:\u002F\u002Fdocs.privy.io\u002Fapi-reference\u002Fwallets\u002Frpc-intent)\n",{"title":5,"description":92},"prompts\u002Fintegrate-privy","ZvWEfwNCRTkjXosRh9g3Dlp-bBT4Ra-X8apbZu4FV84",[107,111,115,119,123,127,131,132,136,140,144,148,152,156,160,164,168],{"path":108,"title":109,"description":110},"\u002Fprompts\u002Fbuild-contractor-payouts","Build a global contractor payout product","Compose onboarding, bank accounts, quotes, payouts, and reconciliation into a complete pay-your-contractors feature across Pix, SPEI, SEPA, and ACH.",{"path":112,"title":113,"description":114},"\u002Fprompts\u002Fconnect-ai-agent-mcp","Connect an AI agent with the MCP server","Wire Claude, Cursor, or any MCP-compatible host to the BlindPay API with the official MCP server and agent skills, with guardrails for money movement.",{"path":116,"title":117,"description":118},"\u002Fprompts\u002Fintegrate-external-wallet-payouts","Fund payouts from external wallets","Let customers pay out from their own EVM, Solana, or Stellar wallets: signed-message registration plus the on-chain authorization step per chain.",{"path":120,"title":121,"description":122},"\u002Fprompts\u002Fintegrate-circle-wallets","Integrate Circle wallets with BlindPay","Fund BlindPay payouts from Circle developer-controlled wallets: sign the registration challenge and the ERC-20 approve through Circle's API instead of a browser wallet.",{"path":124,"title":125,"description":126},"\u002Fprompts\u002Fintegrate-dfns","Integrate Dfns with BlindPay","Fund BlindPay stablecoin payouts from Dfns MPC wallets: sign the registration challenge and the ERC-20 approve through Dfns's User Action Signature flow.",{"path":128,"title":129,"description":130},"\u002Fprompts\u002Fintegrate-fireblocks","Integrate Fireblocks with BlindPay","Fund BlindPay stablecoin payouts from Fireblocks vault accounts: MPC-signed wallet registration and the ERC-20 approve through Fireblocks' transactions API.",{"path":97,"title":5,"description":92},{"path":133,"title":134,"description":135},"\u002Fprompts\u002Fintegrate-virtual-accounts","Integrate US virtual accounts","Give each customer a named US bank account with ACH, RTP, wire, and SWIFT details that settles automatically to USDC or USDT in their wallet.",{"path":137,"title":138,"description":139},"\u002Fprompts\u002Fintegrate-utila","Integrate Utila with BlindPay","Fund BlindPay payouts from Utila MPC vaults: sign the wallet-registration challenge and the ERC-20 approve through Utila's service-account API, with async transaction confirmation handled.",{"path":141,"title":142,"description":143},"\u002Fprompts\u002Fintegrate-customer-onboarding","Integrate customer onboarding with KYC and KYB","Build the full onboarding pipeline: terms of service, individual and business customers, document uploads, RFI handling, and status webhooks.",{"path":145,"title":146,"description":147},"\u002Fprompts\u002Fintegrate-offramp-wallets","Integrate offramp wallets for auto-conversion","Give each bank account a dedicated crypto deposit address: stablecoins sent to it convert and pay out to the linked bank account automatically.",{"path":149,"title":150,"description":151},"\u002Fprompts\u002Fintegrate-payins","Integrate payins from bank transfers to stablecoins","Accept Pix, ACH, wire, SPEI, and other local bank transfers and settle them as USDC or USDT in a wallet, with quotes, payment instructions, and webhooks.",{"path":153,"title":154,"description":155},"\u002Fprompts\u002Fintegrate-quotes-fx","Integrate quotes and FX handling","Handle payin, payout, and transfer quotes correctly: expiry windows, currency_type conventions, fees, and displaying rates to users.",{"path":157,"title":158,"description":159},"\u002Fprompts\u002Fintegrate-stablecoin-payouts","Integrate stablecoin payouts end to end","Build a complete stablecoin to fiat payout flow: customer onboarding, bank accounts, quotes, and payout execution over Pix, ACH, SPEI, SEPA, and more.",{"path":161,"title":162,"description":163},"\u002Fprompts\u002Fintegrate-wallet-transfers","Integrate wallet transfers and cross-chain USDC","Move stablecoins from managed wallets to any address with transfer quotes, including cross-chain USDC over Circle CCTP v2.",{"path":165,"title":166,"description":167},"\u002Fprompts\u002Fintegrate-webhooks","Integrate webhooks end to end","Register endpoints, verify Svix signatures correctly, deduplicate retries, and drive payment state from the full BlindPay event catalog.",{"path":169,"title":170,"description":171},"\u002Fprompts\u002Fintegrate-payables","Pay boletos and Brazilian bills with payables","Register boletos, arrecadacao slips, and PIX codes as payables and settle them from stablecoins through the quote-and-execute flow.",1787868848586]