Skip to content
Back to Prompts

Set up partner fees and revenue share

Attach your own fee to every quote with partner fees, track collected revenue through webhooks, and show users a complete price breakdown.

Quotes
Payouts

Paste this prompt into your coding agent to monetize your integration: your margin rides on each transaction as a partner fee.

Prompt

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.

Before writing code, read these sources and follow them over any prior knowledge:
- https://blindpay.com/docs/llms.txt (read the quotes pages and the webhook events page)
- The OpenAPI spec: curl https://api.blindpay.com/doc (check the partner fee endpoints and the partner_fee_id field on quotes)

Build:
1. 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.
2. 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.
3. 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.
4. 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.
5. 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.

Constraints: amounts in integer minor units; verify sums with integer math; API keys server-side.

Deliverables: fee config module, updated quote calls and price-breakdown UI, the partnerFee webhook handler and revenue report, and the sum-integrity tests.

How to use

  1. Paste the prompt into your agent with access to your existing quote code paths.
  2. Decide your fee structure per product before the agent wires it in.
  3. Check the price-breakdown math against the dashboard on the first live transactions.

One API.
Multiple payment rails.

Blind Pay, Inc. (“BlindPay”) is a United States-based financial technology and payments infrastructure company, incorporated in the State of Delaware on May 2, 2024. BlindPay is duly registered as a Money Services Business (“MSB”) with the Financial Crimes Enforcement Network (“FinCEN”) under registration number 31000277566153. BlindPay is not a state-licensed money transmitter and does not, in its own capacity, engage in regulated money transmission services. All such regulated activities are conducted exclusively through, and under the licenses of, duly authorized financial institution partners. BlindPay's role is limited to providing financial technology, virtual account management, payment processing, and related payments infrastructure services that facilitate payment flows and account functionalities. These services are provided in coordination with its licensed partners and in compliance with applicable federal MSB requirements and relevant state regulatory frameworks.

Blind Pay, LLC (“BlindPay”) is a Delaware limited liability company formed on June 24, 2025. BlindPay is duly registered as a Money Services Business (“MSB”) with the Financial Crimes Enforcement Network (“FinCEN”) under registration number 31000318334247 and is listed in the Nationwide Multistate Licensing System (“NMLS”) under NMLS ID #2745309.

BLIND PAY SOCIEDADE PRESTADORA DE SERVIÇOS DE ATIVOS VIRTUAIS LTDA. (“BlindPay”) is a Virtual Asset Service Provider (“VASP”) operating in Brazil. The company is presently completing the regulatory adaptation process required of Virtual Asset Service Provider Companies (SPSAV) under Central Bank of Brazil Resolution No. 520/2025, and remains subject to the transitional regime set forth in Article 88 of that Resolution. Registered address: Avenida Princesa Isabel, nº 15, Sala 1405, Edifício Martinho de Freitas, Centro, Vitória/ES, 29010-361.

BlindPay is a stablecoin API that enables individuals and businesses to move money worldwide.