Merchant On-ramp (Fiat Deposit) Integration

Accept fiat payments and receive cryptocurrency payouts. This hosted integration handles the entire payment flow, from user authorization to crypto settlement.

Integration Type

External Link Hosted - Payment flow is hosted by Yugo

Process Overview

  1. Merchant Onboarding (one-time setup) - Yugo configures your account with payment currency, cryptocurrency, blockchain network, and wallet address
  2. Create Session - Call the generate-link endpoint with payment details and user information
  3. Redirect User - Send the user to the hosted payment link
  4. Payment Processing - Yugo handles the payment flow
  5. Settlement - Yugo executes the crypto payout to your wallet

Merchant Onboarding

Before using the API, your account must be configured by Yugo administrators:

ConfigurationDescriptionCommon Values
Payment CurrencyFiat currency for paymentsEUR
CryptocurrencyCrypto asset for payoutsUSDC
Blockchain NetworkNetwork for crypto payoutsPolygon
Wallet AddressYour wallet for receiving payoutsYour Web3 address

Contact your Yugo integration team to complete onboarding.


API Endpoints

Generate Hosted Payment Link

Create a hosted payment session and get a redirect URL.

POST https://api.yugo.finance/payments/on-ramp-merchant/hosted/generate-link

Headers

HeaderValue
x-api-keyYour API key

Request Body

json
{
  "amount": 100.0,
  "names": "John Doe",
  "userId": "merchant-123",
  "userEmail": "john.doe@gmail.com",
  "userAddress1": "123 Main St, Sofia, Bulgaria",
  "userIpAddress": "87.126.116.201",
  "webhookUrl": "https://yourdomain.com/webhook",
  "webhookPayload": "internal-order-id-xyz",
  "revision": "internal-order-id-xyz",
  "hostedRedirectUrl": "https://yourdomain.com/users/merchant-123"
}

Parameters

FieldTypeRequiredDescription
amountnumberAmount in EUR. Minimum: 5 EUR, Maximum: 5000 EUR
namesstringFull name of the user
userIdstringUnique user ID in your system
userEmailstringUser's email address
userAddress1stringUser's residential address
userIpAddressstringEnd-user's public IP address
webhookUrlstringYour backend endpoint for status updates
webhookPayloadstringArbitrary string echoed back in webhooks
revisionstringInternal reference ID
hostedRedirectUrlstringURL to redirect user after clicking "back to merchant"

Note: Payment currency, cryptocurrency, blockchain network, and wallet address are configured during onboarding and not included in API requests.

Response

json
{
  "hostedLink": "https://checkout.yugo.finance/s/sess_a1b2c3d4e5f6g7h8i9j",
  "expiresAt": "2025-04-17T11:12:34.567Z"
}

Important:

  • OTT (One-Time Token) expires 2 minutes after link generation
  • Session expires 15 minutes after link generation

Get Transaction

Retrieve transaction details and status.

GET https://api.yugo.finance/transaction?transactionId={transactionId}

Headers

HeaderValue
x-api-keyYour API key

Response

json
{
  "uuid": "5d141fb0-dea0-4499-8361-0915807d1151",
  "type": "MerchantOnRampTransfer",
  "names": "John Doe",
  "chainId": 137,
  "address": "0xB8C043De299eC1C12840979F7Ea230A9b22dDE3B",
  "currency": "EUR",
  "cryptoCurrency": "USDC",
  "paymentLink": "https://oba.revolut.com/ui/index.html?transactionId=3e5...",
  "paymentStatus": "PROCESSING",
  "bankDepositStatus": "SUCCESS",
  "createdAt": "2025-04-17T10:12:34.567Z",
  "lastUpdated": "2025-04-17T10:14:22.001Z"
}

Status Reference

Payment Status

StatusDescription
INTENTTransaction created; authorization flow not yet started
STARTEDAuthorization with the bank has started
FAILED_INTENTAuthorization failed or was rejected by the bank
PROCESSINGTransaction is being processed
COMPLETEDFunds settled and crypto transferred to merchant's Web3 address

Bank Deposit Status

StatusDescription
PENDINGWaiting for funds to be received
SUCCESSFunds successfully received in bank account
FAILEDBank deposit failed or timed out

Webhooks

Bank Deposit Webhook

When Yugo receives funds (typically within 1 minute after bank authorization), a webhook is sent to your backend.

Webhook Requirements

RequirementValue
MethodPOST
Content-Typeapplication/json
Expected ResponseHTTP 200
Retry PolicyUp to 5 retries with exponential backoff

Webhook Payload

json
{
  "eventType": "merchant_on_ramp_success",
  "transactionId": "5d141fb0-dea0-4499-8361-0915807d1151",
  "amount": 100.0,
  "currency": "EUR",
  "timestamp": "2025-04-17T10:14:22.001Z",
  "webhookPayload": "internal-order-id-xyz"
}

Required Response

Your endpoint must respond with HTTP 200:

json
{
  "message": "merchant_on_ramp_success event processed successfully"
}

Transaction Verification

After receiving a webhook, verify the transaction status:

GET https://api.yugo.finance/transaction?transactionId=5d141fb0-dea0-4499-8361-0915807d1151

Expected Response

json
{
  "uuid": "5d141fb0-dea0-4499-8361-0915807d1151",
  "bankDepositStatus": "SUCCESS",
  "paymentStatus": "PROCESSING"
}

Important: Only proceed with your business logic after confirming bankDepositStatus: "SUCCESS".


Additional Configuration

Contact your Yugo integration team during onboarding to configure:

Custom Webhook Events

  • Payment Status Updates - Notifications for all payment status changes
  • Payout Confirmations - Notifications when crypto payout is completed
  • Error Notifications - Alerts for failed transactions or processing errors

Enhanced Payment Information

  • Exchange Rate Details - Real-time exchange rates applied to transactions
  • Payout Transaction Hash - Blockchain transaction hash for crypto payouts
  • Additional fields as needed
Was this page helpful?