# Choose a quote version

Payments Direct offers two versions of the quote endpoints, `/v2/quotes` and `/v3/quotes`. You create a payment the same way with a quote from either version. This page describes how each version works so you can choose the one that fits your integration.

## How each version works

### `/v2/quotes`

- A quote collection contains one quote.
- You set the payout type with `payoutCategory`: `BANK` for a payout to a bank account, or `CRYPTO` for a stablecoin payout. For a stablecoin payout, you also set the blockchain network with `destinationBlockchainNetwork`.
- A quote created with `/v2/quotes` doesn't include `paymentRail`.
- The `payinCategory` values `FUNDED` and `T_PLUS_ONE` are deprecated, but `/v2/quotes` still accepts them if your account is configured for them.


### `/v3/quotes`

- A quote collection contains one quote for each payment rail available for the corridor, leaving out any that Ripple can't price. Not every payment rail for a corridor is available with `/v3/quotes`. Each quote has its own `quoteId`, `paymentRail`, exchange rate, and fees. All quotes in a collection have the same expiry time.
- You choose the payment rail you want by choosing a quote. The payment records it in `destination.selectedPaymentRail`. When present, `payoutExecutionDetails.paymentRailUsed` reports the rail used for the payout, which can differ.
- To request a quote for one payment rail only, include `paymentRail`.
- `payoutCategory` and `destinationBlockchainNetwork` aren't part of the request. For a stablecoin payout, the blockchain network is the payment rail, for example `ETHEREUM`, and quotes are returned only for the networks enabled for your account. Omit `destinationCountry` from a stablecoin request, or the request fails.
- The `payinCategory` values `FUNDED` and `T_PLUS_ONE` aren't accepted. Use `PRE_FUNDING` or `CREDIT_FUNDING` instead.
- If the corridor isn't available with `/v3/quotes`, the request fails with `USR_026`, whose description suggests `/v2/quotes`, or with `SYS_017` when `/v3/quotes` has no payment rail for the corridor. If you sent `paymentRail`, retry without it first: a payment rail that isn't available with `/v3/quotes` returns `USR_026` even when other payment rails for the corridor are.


## Which version to use

`/v2/quotes` is deprecated
`/v2/quotes` is supported until **October 16, 2027**, and is removed after that date. Plan to move
your integration to `/v3/quotes` before then. Both versions work side by side until then, so you
can move one corridor at a time.

Consider `/v3/quotes` if you want to:

- See a quote for each payment rail available for a corridor, with its fees, before you choose one.
- Choose the payment rail you want for each payment.


Consider `/v2/quotes` if:

- Your integration already uses `/v2/quotes`, and choosing the payment rail doesn't matter for your payments.
- You use the `payinCategory` values `FUNDED` or `T_PLUS_ONE` and aren't ready to change them.
- You still use legacy v2 identities. `/v3/quotes` requires identities created with the v3 identity operations.
- A corridor you pay into returns `USR_026` from `/v3/quotes`, or returns `SYS_017` every time you request it.


You can use both versions in the same integration, for example `/v3/quotes` where it's available and `/v2/quotes` for a corridor that returns `USR_026` or `SYS_017`.

## Differences at a glance

| Behavior  | `/v2/quotes`  | `/v3/quotes`  |
|  --- | --- | --- |
| Quotes in a collection | One | One for each payment rail available for the corridor |
| `paymentRail` in the request | Not part of the request | Optional. Requests a quote for that payment rail only. |
| `paymentRail` on each quote | Not included | Included |
| `payoutCategory` | Required | Not part of the request |
| `destinationBlockchainNetwork` | Required for a stablecoin payout | Not part of the request. The blockchain network is the payment rail. |
| `destinationCountry` | Required for a fiat payout. Ignored for a stablecoin payout. | Required for a fiat payout. Omit it for a stablecoin payout. |
| `payinCategory` values `FUNDED` and `T_PLUS_ONE` | Deprecated, but accepted if your account is configured for them | Rejected with `USR_025` |
| Fee line items (`feeBreakdown`) | No `paymentRail` | A line item can include the `paymentRail` it applies to |


## Move from v2 to v3

`/v2/quotes` is supported until **October 16, 2027**. Move your integration to `/v3/quotes` before
that date.

`/v3/quotes` requires identities created with the v3 identity operations, which are the ones this
version of the API documents. If your integration still creates identities with `/v2/identities`
from an earlier version of this API, move it to `/v3/identities` before you move your quotes. See
[Create and manage identities](/pt-br/products/payments-direct-2/api-docs/developer-guides/create-and-manage-identities).

To move a `/v2/quotes` integration to `/v3/quotes`:

1. Send quote requests to `POST /v3/quotes/quote-collection`, and retrieve quotes with `GET /v3/quotes/quote-collection/{quote-collection-id}` and `GET /v3/quotes/{quote-id}`.
2. Remove `payoutCategory` from your requests. For a stablecoin payout, also remove `destinationBlockchainNetwork` and `destinationCountry`. To request quotes for one network only, send the network as `paymentRail`.
3. Replace the `payinCategory` value `FUNDED` with `PRE_FUNDING`, and `T_PLUS_ONE` with `CREDIT_FUNDING`. If your account isn't configured for the new value, the request fails with `USR_014`; contact your Ripple representative.
4. Handle a collection that contains more than one quote: choose one, and use its `quoteId` to create the payment. To receive one quote only, include `paymentRail`.


For valid `paymentRail` values, see [Payment rail reference](/pt-br/products/payments-direct-2/api-docs/integration-resources/payment-rail-reference).

## What stays the same

- **Expiry:** quotes expire. Before you create a payment, check that the quote's `quoteStatus` is `ACTIVE`.
- **Payment creation:** you create the payment with `POST /v3/payments` and the `quoteId` of the quote you chose. The `quoteId` becomes the `paymentId`. A payment created from a `/v3/quotes` quote has `destination.selectedPaymentRail` set and no `destination.payout` value. For a stablecoin payout, it also has no `destination.destinationBlockchainNetwork` value, because the network is the payment rail.
- **Pricing:** the payment uses the exchange rate and fees of the quote you chose.


## Related pages

- [Fetch a quote collection (v2)](/pt-br/products/payments-direct-2/api-docs/developer-guides/fetch-a-quote-collection)
- [Fetch a quote collection (v3)](/pt-br/products/payments-direct-2/api-docs/developer-guides/fetch-a-quote-collection-v3)
- [Quotes](/pt-br/products/payments-direct-2/introduction/concepts/quotes)
- [Payment rail reference](/pt-br/products/payments-direct-2/api-docs/integration-resources/payment-rail-reference)
- [API errors](/pt-br/products/payments-direct-2/api-docs/error-handling/api-errors)