Skip to main content

Status Overview

Ramps progress through multiple statuses from creation to completion. Understanding these statuses helps you provide accurate updates to users.

Status Flow

Getting Ramp Status

GET /api/v2/ramps/{rampId}
const checkRampStatus = async (rampId) => {
  const response = await fetch(
    `https://teste-94u93qnn.uc.gateway.dev/api/v2/ramps/${rampId}`,
    {
      headers: {
        'Authorization': `Bearer ${token}`
      }
    }
  );
  
  const ramp = await response.json();
  return ramp.status;
};

Status Descriptions

StatusDescriptionUser Message
CREATEDRamp initialized”Please complete payment”
CASH_IN_PROCESSINGPayment being verified”Processing your payment”
CASH_IN_COMPLETEDPayment confirmed”Payment received, converting”
CONVERSION_PROCESSINGConverting currency”Converting funds”
CASH_OUT_PROCESSINGSending to destination”Delivering funds”
COMPLETEDTransaction done”Transaction complete!”
FAILEDTransaction failed”Transaction failed”
CANCELEDUser/system canceled”Transaction canceled”

Webhooks for Status Updates

Subscribe to ramp events:
app.post('/webhooks/killb', (req, res) => {
  const { event, data } = req.body;
  
  switch(event) {
    case 'ramp.cash_in_completed':
      updateUI(data.id, 'Payment confirmed');
      break;
    case 'ramp.completed':
      updateUI(data.id, 'Transaction complete');
      notifyUser(data.userId, 'Funds delivered');
      break;
    case 'ramp.failed':
      updateUI(data.id, 'Transaction failed');
      notifyUser(data.userId, data.details);
      break;
  }
  
  res.status(200).json({ received: true });
});

Status History

Get complete status history:
GET /api/v2/ramps/{rampId}/status-history
Response
[
  {
    "status": "CREATED",
    "timestamp": "2024-01-15T10:30:00.000Z"
  },
  {
    "status": "CASH_IN_PROCESSING",
    "timestamp": "2024-01-15T10:35:00.000Z"
  },
  {
    "status": "COMPLETED",
    "timestamp": "2024-01-15T10:45:00.000Z"
  }
]

Best Practices

Webhooks provide instant updates
Poll every 10-30 seconds if webhook fails
Display current status to users with progress bar
Check details field for failure reasons

Next Steps