BlendFi
APIConversionsTest helpers

Simulate offramp crypto deposit

Sandbox-only. Simulates the USDT deposit for an offramp conversion. A full deposit drives the conversion to `funded` and starts the Pix payout; an underpaid or overpaid `amount` routes it to `standby`. Partners should listen for the resulting webhook events or poll `GET /v1/conversions/{id}`. Pass `{"settle": true}` to also settle the PIX, drive the conversion to `completed`, and debit the user wallet by the sold USDT (floored at zero) in one call.

POST
/v1/test_helpers/conversions/{id}/simulate-offramp-deposit
AuthorizationBearer <token>

Paste your BlendFi API key. Sandbox keys start with sk_test_. The Bearer prefix is added automatically.

In: header

Path Parameters

id*string
Formatuuid

Header Parameters

idempotency-key*string

Client-generated unique key to make the mutation safe to retry.

Length1 <= length

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

application/json

application/json

application/json

application/json

application/json

application/json

application/json

curl -X POST "https://api.sandbox.blendfi.com.br/v1/test_helpers/conversions/497f6eca-6276-4993-bfeb-53cbbbba6f08/simulate-offramp-deposit" \  -H "idempotency-key: 0196c5d9-2e34-7c24-a47e-a0e1f89bb8a9" \  -H "Content-Type: application/json" \  -d '{}'
{
  "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
  "user_id": "a169451c-8525-4352-b8ca-070dd449a1a5",
  "quote_id": "3c071a1d-db86-46a7-9dc8-72ba3fbca992",
  "liquidation_quote_id": "9db94b06-1bfa-408b-8e64-fc1b9457fe91",
  "transaction_type": "pix_onramp",
  "status": "awaiting_deposit",
  "expected_source_amount": "string",
  "received_amount": "string",
  "source_currency": "string",
  "target_amount": "string",
  "target_currency": "string",
  "deposit_window_expires_at": "2019-08-24T14:15:22Z",
  "standby_at": "2019-08-24T14:15:22Z",
  "standby_expires_at": "2019-08-24T14:15:22Z",
  "standby_reason": "string",
  "deposit_address": "string",
  "deposit_address_network": "polygon",
  "pix_qr_code": "string",
  "pix_tx_id": "string",
  "pix_e2e_id": "string",
  "usdt_tx_hash": "string",
  "completed_at": "2019-08-24T14:15:22Z",
  "failure_reason": "string",
  "created_at": "2019-08-24T14:15:22Z",
  "updated_at": "2019-08-24T14:15:22Z"
}

{
  "code": "idempotency_key_required",
  "message": "Idempotency-Key header is required for this method.",
  "request_id": "01KPR9F6MM8G147177J7ZQPJHG"
}

{
  "code": "authentication_required",
  "message": "No valid credentials provided.",
  "request_id": "01KPR9F6MM8G147177J7ZQPJHG"
}

{
  "code": "missing_capability",
  "message": "Your API key does not have the required capability for this endpoint.",
  "request_id": "01KPR9F6MM8G147177J7ZQPJHG"
}
{
  "code": "conversion_not_found",
  "message": "Conversion not found.",
  "request_id": "01KPR9F6MM8G147177J7ZQPJHG"
}

{
  "code": "idempotency_key_reused",
  "message": "Idempotency-Key was previously used with a different request body.",
  "request_id": "01KPR9F6MM8G147177J7ZQPJHG"
}

{
  "code": "rate_limit_exceeded",
  "message": "Too many requests. Try again after the retry_after_seconds window.",
  "request_id": "01KPR9F6MM8G147177J7ZQPJHG",
  "details": {
    "retry_after_seconds": 60
  }
}
{
  "code": "internal_error",
  "message": "Internal server error.",
  "request_id": "01KPR9F6MM8G147177J7ZQPJHG"
}