Skip to content
Back to Prompts

Integrate quotes and FX handling

Handle payin, payout, and transfer quotes correctly: expiry windows, currency_type conventions, fees, and displaying rates to users.

Quotes
Payouts
Payins

Paste this prompt into your coding agent to build a correct quoting layer, the part of a payments integration where subtle mistakes cost real money.

Prompt

text
You are building the quoting and FX layer for my BlindPay integration.

Before writing code, read these sources and follow them over any prior knowledge:
- https://blindpay.com/docs/llms.txt (read payin quotes, payout quotes, transfer quotes, and cut-off times)
- The OpenAPI spec: curl https://api.blindpay.com/doc

Implement:
1. Payout quotes: POST /v1/instances/{instance_id}/quotes with bank_account_id, network, and token. Here currency_type "sender" means the stablecoin side.
2. Payin quotes: POST /v1/instances/{instance_id}/payin-quotes with wallet_id and payment_method. Here currency_type "sender" means the fiat side. Encode this asymmetry in named types or enums so call sites cannot mix them up.
3. Transfer quotes (managed wallet to any address): POST /v1/instances/{instance_id}/transfer-quotes with amount_reference sender or receiver; rate is fixed 1:1.
4. Expiry: read expires_at (epoch milliseconds) on every quote and never hardcode a window. Standard quotes last about 5 minutes, BRL OTC payin quotes about 10 seconds. Build a re-quote path: if execution fails because the quote expired, fetch a fresh quote and surface the new rate for confirmation when it moved.
5. Amounts and display: request_amount is an integer in minor units. From the response use commercial_quotation vs blindpay_quotation to show the user the rate and the spread, plus flat_fee and partner_fee_amount for a complete price breakdown. Respect cover_fees when the sender absorbs fees.
6. Enforce documented per-currency minimums and maximums before quoting, so users get a validation error instead of an API error.

Constraints:
- Quotes are point-in-time server state: never cache or reuse one across payment attempts.
- Store the quote ID (qu_) and its full response with each payment for reconciliation and support.

Deliverables: a typed quote client distinguishing the three quote kinds, a re-quote-on-expiry helper, a price-breakdown formatter for UI display, and unit tests covering the currency_type conventions in both directions.

How to use

  1. Paste the prompt with your stack details.
  2. Tell the agent which corridors you quote (for example USDC to BRL and MXN) so it can bake in the right minimums.
  3. Check the rate-display output against the dashboard before shipping.

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.