Saltar al contenido principal
Update Quote Status
curl --request PUT \
  --url https://api.spherepay.co/v2/quote/{id} \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "status": "used"
}
'
import requests

url = "https://api.spherepay.co/v2/quote/{id}"

payload = { "status": "used" }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}

response = requests.put(url, json=payload, headers=headers)

print(response.text)
const options = {
method: 'PUT',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({status: 'used'})
};

fetch('https://api.spherepay.co/v2/quote/{id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));
<?php

$curl = curl_init();

curl_setopt_array($curl, [
CURLOPT_URL => "https://api.spherepay.co/v2/quote/{id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'status' => 'used'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
package main

import (
"fmt"
"strings"
"net/http"
"io"
)

func main() {

url := "https://api.spherepay.co/v2/quote/{id}"

payload := strings.NewReader("{\n \"status\": \"used\"\n}")

req, _ := http.NewRequest("PUT", url, payload)

req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")

res, _ := http.DefaultClient.Do(req)

defer res.Body.Close()
body, _ := io.ReadAll(res.Body)

fmt.Println(string(body))

}
HttpResponse<String> response = Unirest.put("https://api.spherepay.co/v2/quote/{id}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"status\": \"used\"\n}")
.asString();
require 'uri'
require 'net/http'

url = URI("https://api.spherepay.co/v2/quote/{id}")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Put.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"status\": \"used\"\n}"

response = http.request(request)
puts response.read_body
{
  "id": "quote_d243ab2b1de4447d8a046d87fefe58cf",
  "status": "active",
  "type": "off_ramp",
  "customerId": "customer_d243ab2b1de4447d8a046d87fefe58cf",
  "fees": {
    "integratorFee": {
      "fixedAmount": "0.00",
      "bpsRate": "0",
      "totalAmount": "0.00",
      "currency": "usdc"
    },
    "platformFee": {
      "fixedAmount": "0.00",
      "bpsRate": "20",
      "totalAmount": "2.00",
      "currency": "usdc"
    }
  },
  "source": {
    "currency": "usdc",
    "network": "polygon",
    "amount": "100.00"
  },
  "destination": {
    "currency": "brl",
    "network": "pix",
    "amount": "545.50",
    "exchangeRate": "5.455"
  },
  "expiresAt": "2025-01-01T00:01:00.000Z",
  "created": "2025-01-01T00:00:00.000Z",
  "updated": "2025-01-01T00:00:30.000Z"
}
{
"status": 400,
"detail": "Invalid request parameters",
"code": "address/invalid",
"correlationId": "28c61e885c6e5eaa78c1a2183a9b883c"
}
{
"status": 404,
"detail": "Resource not found",
"code": "resource/not-found",
"correlationId": "28c61e885c6e5eaa78c1a2183a9b883c"
}
{
"status": 422,
"detail": "Validation failed",
"code": "validation/failed",
"correlationId": "28c61e885c6e5eaa78c1a2183a9b883c",
"errors": [
{
"detail": "Invalid email format",
"pointer": "/email"
},
{
"detail": "Name is required",
"pointer": "/name"
}
]
}
Transiciona manualmente una cotización fuera del estado active. La mayoría de las transiciones de cotización ocurren automáticamente — una cotización se convierte en used cuando es canjeada por Crear Transferencia, y se convierte en expired cuando pasa su marca de tiempo expiresAt. Usa este endpoint cuando necesites anular explícitamente una cotización (p. ej. el cliente abandonó el flujo) o marcarla como consumida por un sistema externo que no la canjea a través de /v2/transfer.
Solo las cotizaciones con estado active pueden ser actualizadas. Intentar actualizar una cotización que ya está used o expired devuelve un error de validación 422.

Autorizaciones

Authorization
string
header
requerido

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Parámetros de ruta

id
string
requerido

The unique quote ID.

Pattern: ^quote_[a-z0-9]+$
Ejemplo:

"quote_d243ab2b1de4447d8a046d87fefe58cf"

Cuerpo

application/json
status
enum<string>
requerido

The new status for the quote. Only active quotes can be updated.

Opciones disponibles:
used,
expired
Ejemplo:

"used"

Respuesta

id
string
requerido

A unique identifier for the quote.

Pattern: ^quote_[a-z0-9]+$
Ejemplo:

"quote_d243ab2b1de4447d8a046d87fefe58cf"

status
enum<string>
requerido

The current status of the quote.

Opciones disponibles:
active,
used,
expired
Ejemplo:

"active"

type
enum<string>
requerido

The transfer type this quote is for.

Opciones disponibles:
on_ramp,
off_ramp
Ejemplo:

"off_ramp"

customerId
string
requerido

The customer ID.

Ejemplo:

"customer_d243ab2b1de4447d8a046d87fefe58cf"

fees
object
requerido
source
object
requerido
destination
object
requerido
expiresAt
string<date-time>
requerido

The datetime when this quote expires.

Ejemplo:

"2025-01-01T00:01:00.000Z"

created
string<date-time>
requerido

The datetime the quote was created.

Ejemplo:

"2025-01-01T00:00:00.000Z"

updated
string<date-time>
requerido

The datetime the quote was last updated.

Ejemplo:

"2025-01-01T00:00:30.000Z"

Última modificación el 22 de junio de 2026