[{"data":1,"prerenderedAt":108},["ShallowReactive",2],{"content-\u002Fprompts\u002Fsetup-partner-fees":3,"prompts-category-setup":98},{"id":4,"title":5,"author":6,"body":7,"categories":6,"category":83,"categoryType":6,"date":84,"description":85,"extension":86,"faq":6,"howto":6,"isBlog":87,"isChangelog":87,"meta":88,"navigation":89,"path":90,"pillar":87,"products":91,"rawbody":94,"seo":95,"stem":96,"thumbnail":6,"updated":6,"__hash__":97},"content\u002Fprompts\u002Fsetup-partner-fees.md","Set up partner fees and revenue share",null,{"type":8,"value":9,"toc":77},"minimark",[10,14,19,30,34,47,51],[11,12,13],"p",{},"Paste this prompt into your coding agent to monetize your integration: your margin rides on each transaction as a partner fee.",[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 adding partner-fee monetization to my existing BlindPay integration: my platform takes a fee on each transaction, collected through BlindPay's partner fee mechanism.\n\nBefore writing code, read these sources and follow them over any prior knowledge:\n- https:\u002F\u002Fblindpay.com\u002Fdocs\u002Fllms.txt (read the quotes pages and the webhook events page)\n- The OpenAPI spec: curl https:\u002F\u002Fapi.blindpay.com\u002Fdoc (check the partner fee endpoints and the partner_fee_id field on quotes)\n\nBuild:\n1. Fee configuration: create or reference my partner fee (pf_ ID) per the API reference; support the fee structures the API offers and store which pf_ applies to which product or customer tier in my config, not hardcoded at call sites.\n2. Quote integration: pass partner_fee_id on payout and payin quote requests, and read partner_fee_amount from the quote response. Update every price display to break down commercial rate, BlindPay rate and flat fee, and my partner fee as separate lines, so the user sees exactly where the spread goes.\n3. Revenue tracking: handle the payout.partnerFee webhook (Svix-verified) to record collected fees against my ledger, keyed by po_ and pf_ IDs; build a monthly revenue report per corridor and product.\n4. Regression safety: fee handling must not change any quote-expiry, idempotency, or webhook logic; add tests asserting that a quote with a partner fee still settles the expected net amount to the recipient, and that the price breakdown sums exactly to sender_amount.\n5. Edge cases: quotes without a partner fee (fee optional per call), fee display when cover_fees is on, and what happens to my fee when a payout fails or refunds; confirm the behavior from the docs or reference rather than assuming.\n\nConstraints: amounts in integer minor units; verify sums with integer math; API keys server-side.\n\nDeliverables: fee config module, updated quote calls and price-breakdown UI, the partnerFee webhook handler and revenue report, and the sum-integrity tests.\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",{},"Paste the prompt into your agent with access to your existing quote code paths.",[38,42,43],{},"Decide your fee structure per product before the agent wires it in.",[38,45,46],{},"Check the price-breakdown math against the dashboard on the first live transactions.",[15,48,50],{"id":49},"related-docs","Related docs",[52,53,54,63,70],"ul",{},[38,55,56],{},[57,58,62],"a",{"href":59,"rel":60},"https:\u002F\u002Fblindpay.com\u002Fdocs\u002Fpayout-quotes",[61],"nofollow","Payout quotes",[38,64,65],{},[57,66,69],{"href":67,"rel":68},"https:\u002F\u002Fblindpay.com\u002Fdocs\u002Fpayin-quotes",[61],"Payin quotes",[38,71,72],{},[57,73,76],{"href":74,"rel":75},"https:\u002F\u002Fblindpay.com\u002Fdocs\u002Flearn\u002Fwebhooks-events",[61],"Webhook events",{"title":26,"searchDepth":78,"depth":78,"links":79},2,[80,81,82],{"id":17,"depth":78,"text":18},{"id":32,"depth":78,"text":33},{"id":49,"depth":78,"text":50},"setup","2026-08-26","Attach your own fee to every quote with partner fees, track collected revenue through webhooks, and show users a complete price breakdown.","md",false,{},true,"\u002Fprompts\u002Fsetup-partner-fees",[92,93],"quotes","payouts","---\ntitle: \"Set up partner fees and revenue share\"\ndescription: \"Attach your own fee to every quote with partner fees, track collected revenue through webhooks, and show users a complete price breakdown.\"\ndate: \"2026-08-26\"\ncategory: \"setup\"\nproducts: [\"quotes\", \"payouts\"]\n---\n\nPaste this prompt into your coding agent to monetize your integration: your margin rides on each transaction as a partner fee.\n\n## Prompt\n\n```text\nYou are adding partner-fee monetization to my existing BlindPay integration: my platform takes a fee on each transaction, collected through BlindPay's partner fee mechanism.\n\nBefore writing code, read these sources and follow them over any prior knowledge:\n- https:\u002F\u002Fblindpay.com\u002Fdocs\u002Fllms.txt (read the quotes pages and the webhook events page)\n- The OpenAPI spec: curl https:\u002F\u002Fapi.blindpay.com\u002Fdoc (check the partner fee endpoints and the partner_fee_id field on quotes)\n\nBuild:\n1. Fee configuration: create or reference my partner fee (pf_ ID) per the API reference; support the fee structures the API offers and store which pf_ applies to which product or customer tier in my config, not hardcoded at call sites.\n2. Quote integration: pass partner_fee_id on payout and payin quote requests, and read partner_fee_amount from the quote response. Update every price display to break down commercial rate, BlindPay rate and flat fee, and my partner fee as separate lines, so the user sees exactly where the spread goes.\n3. Revenue tracking: handle the payout.partnerFee webhook (Svix-verified) to record collected fees against my ledger, keyed by po_ and pf_ IDs; build a monthly revenue report per corridor and product.\n4. Regression safety: fee handling must not change any quote-expiry, idempotency, or webhook logic; add tests asserting that a quote with a partner fee still settles the expected net amount to the recipient, and that the price breakdown sums exactly to sender_amount.\n5. Edge cases: quotes without a partner fee (fee optional per call), fee display when cover_fees is on, and what happens to my fee when a payout fails or refunds; confirm the behavior from the docs or reference rather than assuming.\n\nConstraints: amounts in integer minor units; verify sums with integer math; API keys server-side.\n\nDeliverables: fee config module, updated quote calls and price-breakdown UI, the partnerFee webhook handler and revenue report, and the sum-integrity tests.\n```\n\n## How to use\n\n1. Paste the prompt into your agent with access to your existing quote code paths.\n2. Decide your fee structure per product before the agent wires it in.\n3. Check the price-breakdown math against the dashboard on the first live transactions.\n\n## Related docs\n\n- [Payout quotes](https:\u002F\u002Fblindpay.com\u002Fdocs\u002Fpayout-quotes)\n- [Payin quotes](https:\u002F\u002Fblindpay.com\u002Fdocs\u002Fpayin-quotes)\n- [Webhook events](https:\u002F\u002Fblindpay.com\u002Fdocs\u002Flearn\u002Fwebhooks-events)\n",{"title":5,"description":85},"prompts\u002Fsetup-partner-fees","NG_YDdsZdSP0Zgp_msTJyj3U2RBs4hcqEnOAFIlviaQ",[99,103,107],{"path":100,"title":101,"description":102},"\u002Fprompts\u002Fdebug-webhooks","Debug webhook delivery and verification","Diagnose missing or failing BlindPay webhooks: endpoint config, signature mismatches, raw-body pitfalls, retries, and replay.",{"path":104,"title":105,"description":106},"\u002Fprompts\u002Fsandbox-quickstart","Sandbox quickstart","Stand up a working BlindPay development environment in one session: instance, API key, test customer, funded wallet, and a completed test payout.",{"path":90,"title":5,"description":85},1787868850991]