Create a quote

POST
/v1/quotes

Freezes a price for a short time. A quote is used by at most one payout.

Autorización

apiKey
headerAuthorizationBearer <clave>

Your secret API key, sent as Authorization: Bearer <key>. A key names its environment: psp_test_… works only against sandbox (https://api-sandbox.caibopay.app), psp_live_… only against live (https://api.caibopay.app). Keys are issued by Caibo when your account is opened; the dashboard (Developers) shows the key in use.

Encabezados

Idempotency-Key*string

A unique key for this request, 8 to 128 characters.

Match^[A-Za-z0-9._:-]{8,128}$
application/json
  1. body
amount*string

The fixed amount. A decimal string in the currency's precision.

Match^[0-9]+(\.[0-9]+)?$
amount_side*string

Which amount is fixed: what is paid (source) or what is received (destination).

Valor en"source""destination"
destination_currency*string

The currency delivered.

method?string

The payout method the quote is for. Omit for a conversion with no payout rail.

payer?

Price the quote from a payer's side: the payer pays in currency by method, converted into source_currency (an on-ramp priced with the platform's rates, margins and the method's pay_in fee), and source_currency pays the beneficiary. With amount_side source, amount is in the payer's currency: what the payer sends to be converted, fees on top. The answer says what the payer pays (payer).

source_currency*string

The currency debited from the balance.

Cuerpo de la respuesta

The request was already made: the existing resource is returned.

application/json
  1. response
created_at*string

When it was priced.

Formatodate-time
destination*
expires_at*string

Until when it can be used.

Formatodate-time
id*string

The id of the quote.

Match^quo_[0-9a-z]+$
method?string

The payout method the quote is for.

payer?

What the payer pays, in their own currency, when the quote was priced from a payer's side.

rate*string

Destination units per source unit, all margins included.

source*
status*string

open: can still be used. used: an operation took it. expired: its time passed unused.

Valor en"open""used""expired"
Ejemplo de solicitud
curl -X POST 'https://api-sandbox.caibopay.app/v1/quotes' \  -H 'Idempotency-Key: string' \  -H 'Content-Type: application/json' \  -d '{  "amount": "string",  "amount_side": "source",  "destination_currency": "string",  "source_currency": "string"}'
Ejemplo de respuesta
{  "created_at": "2019-08-24T14:15:22Z",  "destination": {    "amount": "string",    "currency": "string"  },  "expires_at": "2019-08-24T14:15:22Z",  "id": "string",  "method": "string",  "payer": {    "amount": "string",    "currency": "string",    "effective_rate": "string",    "fee": "string",    "method": "string",    "principal": "string"  },  "rate": "string",  "source": {    "currency": "string",    "platform_fee": "string",    "principal": "string",    "tenant_markup": "string",    "total": "string"  },  "status": "open"}