Skip to main content
POST
/
api
/
v1
/
sellAndPays
/
{sell_and_pay_id}
/
execute
Execute Sell and Pay transaction
curl --request POST \
  --url https://skala-sandbox.ripio.com/api/v1/sellAndPays/{sell_and_pay_id}/execute \
  --header 'Authorization: Bearer <token>'
{
  "id": "a3b2c1d0-1234-5678-90ab-cdef12345678",
  "createdAt": "2024-01-26T12:45:00.078230Z",
  "expiresAt": "2024-01-26T13:45:00.078230Z",
  "customerId": "b6cecc1f-c90d-424b-adaa-c82b780696c1",
  "trade": {
    "id": "<string>",
    "createdAt": "2023-11-07T05:31:56Z",
    "externalRef": "<string>",
    "customerId": "<string>",
    "quoteId": "<string>",
    "txnId": "<string>",
    "baseAsset": "<string>",
    "quoteAsset": "<string>",
    "baseAmount": "<string>",
    "quoteAmount": "<string>",
    "rate": "<string>",
    "marketRate": "<string>",
    "chargedFee": "<string>",
    "cryptoChargedFee": "<string>",
    "deferredChargedFee": "<string>",
    "feeChargedInFiat": "<string>"
  },
  "paymentOrder": {
    "id": "<string>",
    "customerId": "<string>",
    "createdAt": "2023-11-07T05:31:56Z",
    "merchant": "<string>",
    "qrCode": "<string>",
    "amount": "<string>",
    "currency": "<string>",
    "providerTxnId": "<string>"
  },
  "amount": "10000.50",
  "cryptoAmount": "10.25",
  "paymentCurrency": "ARS",
  "depositCurrency": "USDC",
  "depositNetwork": "ETHEREUM",
  "depositAddress": "0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D",
  "cryptoDeposit": {
    "id": "<string>",
    "txnId": "<string>",
    "hash": "<string>",
    "currencyCode": "<string>",
    "addressDestination": "<string>",
    "confirmationDate": "2023-11-07T05:31:56Z",
    "amount": "<string>",
    "createdAt": "2023-11-07T05:31:56Z",
    "customerId": "<string>",
    "status": "<string>",
    "network": "<string>"
  },
  "status": "PENDING",
  "refundAddress": "<string>"
}

Authorizations

Authorization
string
header
required

Access token obtained via /oauth2/token/. Use as Authorization: Bearer <access_token>.

Path Parameters

sell_and_pay_id
string<uuid>
required

Unique identifier of the Sell and Pay transaction to execute

Response

Sell and Pay transaction successfully executed

id
string

Unique identifier for the Sell and Pay transaction assigned by the B2B Service

Example:

"a3b2c1d0-1234-5678-90ab-cdef12345678"

createdAt
string<date-time>

Timestamp when the Sell and Pay transaction was created in ISO 8601 format

Example:

"2024-01-26T12:45:00.078230Z"

expiresAt
string<date-time>

Timestamp when the transaction will expire if not completed in ISO 8601 format. After expiration, cryptocurrency deposits will not be processed.

Example:

"2024-01-26T13:45:00.078230Z"

customerId
string<uuid>

Unique identifier of the customer who initiated the transaction

Example:

"b6cecc1f-c90d-424b-adaa-c82b780696c1"

trade
object

Trade execution details. This will be null until the trade is executed and contains information about the cryptocurrency-to-fiat conversion. Details of the cryptocurrency-to-fiat trade execution

paymentOrder
object

Payment order details for the merchant payment. Contains information about the QR code payment and merchant details. Details of the payment order to the merchant

amount
string

Payment amount in fiat currency to be paid to the merchant

Example:

"10000.50"

cryptoAmount
string

Amount of cryptocurrency required to complete the payment, calculated based on current exchange rates and fees

Example:

"10.25"

paymentCurrency
string

Fiat currency code for the payment (e.g., ARS, MXN, USD)

Example:

"ARS"

depositCurrency
string

Cryptocurrency code for the deposit (e.g., BTC, ETH, USDC)

Example:

"USDC"

depositNetwork
string

Blockchain network identifier for the cryptocurrency deposit (e.g., ETHEREUM, POLYGON, BITCOIN)

Example:

"ETHEREUM"

depositAddress
string

Cryptocurrency address where the customer should send the deposit. This is a unique address generated for this transaction.

Example:

"0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D"

cryptoDeposit
object

Information about the cryptocurrency deposit made by the customer. This will be null until a deposit is detected on the blockchain. Information about the cryptocurrency deposit received from the customer

status
enum<string>

Current status of the Sell and Pay transaction. INCOMPLETE: missing required fields. PENDING: ready to execute. WAITING_DEPOSIT: executed and ready to receive crypto deposit. RECEIVED_DEPOSIT: crypto deposit detected on blockchain. CONFIRMED_DEPOSIT: crypto deposit confirmed. TRADE_COMPLETED: cryptocurrency successfully converted to fiat. QR_EXECUTION_PENDING: preparing payment to merchant. COMPLETED: payment successfully made to merchant. CANCELED: transaction cancelled. REFUND_PENDING: refund being processed. REFUNDED: funds refunded to customer.

Available options:
INCOMPLETE,
PENDING,
WAITING_DEPOSIT,
RECEIVED_DEPOSIT,
CONFIRMED_DEPOSIT,
TRADE_COMPLETED,
QR_EXECUTION_PENDING,
COMPLETED,
CANCELED,
REFUND_PENDING,
REFUNDED
Example:

"PENDING"

refundAddress
string | null

Cryptocurrency address for refunds in case of transaction failure or cancellation