Skip to content

Via One Cash App Payments API

Version: 1.0 Base URL: https://latcom-fix-production.up.railway.app


Overview

The Via One Cash App Payments API allows you to accept Cash App payments from your customers. The API provides a seamless, white-label payment experience with automatic mobile/desktop detection.

Features

  • Accept Cash App payments
  • White-label payment pages (no third-party branding)
  • QR code generation for desktop users
  • Deep link support for mobile users
  • Real-time payment status updates
  • Webhook notifications

Authentication

Contact Via One to obtain your API credentials. Include your credentials in the request headers:

x-api-key: YOUR_API_KEY
x-client-id: YOUR_CLIENT_ID

Note: During beta, authentication headers are optional.


Endpoints

Create Payment

Create a new Cash App payment request.

Endpoint: POST /api/cashapp/create

Headers:

Content-Type: application/json

Request Body:

Field Type Required Description
amount number Yes Payment amount in USD (e.g., 10.00)
reference string No Your unique order/transaction reference
description string No Payment description shown to customer
webhookUrl string No URL to receive payment notifications
customerId string No Your internal customer identifier

Example Request:

curl -X POST "https://latcom-fix-production.up.railway.app/api/cashapp/create" \
  -H "Content-Type: application/json" \
  -d '{
    "amount": 25.00,
    "reference": "ORDER-12345",
    "description": "Monthly subscription",
    "webhookUrl": "https://your-site.com/webhooks/payment"
  }'

Example Response:

{
  "success": true,
  "paymentId": "PAY_A33145A1875841F6",
  "reference": "ORDER-12345",
  "amount": 25.00,
  "currency": "USD",
  "status": "pending",
  "paymentUrl": "https://latcom-fix-production.up.railway.app/pay/PAY_A33145A1875841F6",
  "qrCode": "data:image/png;base64,iVBORw0KGgo...",
  "deepLink": "https://..."
}

Response Fields:

Field Type Description
success boolean Whether the request was successful
paymentId string Via One payment identifier
reference string Your reference (or auto-generated if not provided)
amount number Payment amount
currency string Currency code (always "USD")
status string Payment status: pending, completed, failed, expired
paymentUrl string URL to redirect customer for payment
qrCode string Base64-encoded QR code image
deepLink string Direct payment link for custom integrations

Check Payment Status

Query the current status of a payment.

Endpoint: GET /api/cashapp/status/:paymentId

Example Request:

curl "https://latcom-fix-production.up.railway.app/api/cashapp/status/PAY_A33145A1875841F6"

Example Response:

{
  "success": true,
  "paymentId": "PAY_A33145A1875841F6",
  "reference": "ORDER-12345",
  "amount": 25.00,
  "currency": "USD",
  "status": "completed",
  "createdAt": "2025-12-12T15:30:00.000Z",
  "updatedAt": "2025-12-12T15:32:45.000Z"
}

Payment Statuses:

Status Description
pending Payment created, awaiting customer action
completed Payment successful
failed Payment failed or declined
expired Payment link expired (not completed within time limit)

Integration Guide

The simplest integration - redirect your customer to our hosted payment page.

// 1. Create payment on your server
const response = await fetch('https://latcom-fix-production.up.railway.app/api/cashapp/create', {
  method: 'POST',
  headers: { 'Content-Type': 'application/json' },
  body: JSON.stringify({
    amount: 25.00,
    reference: 'ORDER-12345',
    description: 'Your purchase'
  })
});

const payment = await response.json();

// 2. Redirect customer to payment page
window.location.href = payment.paymentUrl;

What the customer sees: - On Desktop: QR code to scan with their phone - On Mobile: "Pay with Cash App" button that opens the Cash App


Option 2: Embed QR Code

Display the QR code directly in your application.

<!-- After creating payment -->
<div class="payment-container">
  <h2>Scan to Pay $25.00</h2>
  <img src="${payment.qrCode}" alt="Scan with Cash App" />
  <p>Open Cash App and scan this code</p>
</div>

Option 3: Custom Mobile Button

For mobile apps, use the deep link to open Cash App directly.

// For mobile users
if (isMobile) {
  window.location.href = payment.deepLink;
}

Webhooks

When a payment status changes, Via One will send a POST request to your webhookUrl.

Webhook Payload:

{
  "event": "payment.success",
  "paymentId": "PAY_A33145A1875841F6",
  "reference": "ORDER-12345",
  "amount": 25.00,
  "currency": "USD",
  "status": "completed",
  "timestamp": "2025-12-12T15:32:45.000Z"
}

Event Types:

Event Description
payment.success Payment completed successfully
payment.failed Payment failed or was declined

Webhook Best Practices: 1. Respond with HTTP 200 within 10 seconds 2. Verify the paymentId matches a payment you created 3. Use the reference field to match to your order 4. Implement idempotency (you may receive duplicate webhooks)


Error Handling

Error Response Format:

{
  "success": false,
  "error": "Error message describing the issue"
}

Common Errors:

HTTP Code Error Description
400 "Valid amount is required" Amount missing or invalid
404 "Payment not found" Invalid payment ID
503 "Payment service not configured" Service temporarily unavailable

Code Examples

Node.js

const axios = require('axios');

async function createCashAppPayment(amount, orderId) {
  const response = await axios.post(
    'https://latcom-fix-production.up.railway.app/api/cashapp/create',
    {
      amount: amount,
      reference: orderId,
      description: `Payment for order ${orderId}`,
      webhookUrl: 'https://your-site.com/webhooks/payment'
    }
  );

  return response.data;
}

// Usage
const payment = await createCashAppPayment(25.00, 'ORDER-12345');
console.log('Payment URL:', payment.paymentUrl);

Python

import requests

def create_cashapp_payment(amount, order_id):
    response = requests.post(
        'https://latcom-fix-production.up.railway.app/api/cashapp/create',
        json={
            'amount': amount,
            'reference': order_id,
            'description': f'Payment for order {order_id}',
            'webhookUrl': 'https://your-site.com/webhooks/payment'
        }
    )
    return response.json()

# Usage
payment = create_cashapp_payment(25.00, 'ORDER-12345')
print(f"Payment URL: {payment['paymentUrl']}")

PHP

<?php
function createCashAppPayment($amount, $orderId) {
    $data = [
        'amount' => $amount,
        'reference' => $orderId,
        'description' => "Payment for order $orderId",
        'webhookUrl' => 'https://your-site.com/webhooks/payment'
    ];

    $ch = curl_init('https://latcom-fix-production.up.railway.app/api/cashapp/create');
    curl_setopt($ch, CURLOPT_POST, true);
    curl_setopt($ch, CURLOPT_POSTFIELDS, json_encode($data));
    curl_setopt($ch, CURLOPT_HTTPHEADER, ['Content-Type: application/json']);
    curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);

    $response = curl_exec($ch);
    curl_close($ch);

    return json_decode($response, true);
}

// Usage
$payment = createCashAppPayment(25.00, 'ORDER-12345');
echo "Payment URL: " . $payment['paymentUrl'];
?>

Testing

Test Payment Flow

  1. Create a payment using the API
  2. Visit the paymentUrl in your browser
  3. Complete the payment using Cash App
  4. Check the status using the status endpoint

Test Webhook

Use a service like webhook.site to test webhook delivery:

curl -X POST "https://latcom-fix-production.up.railway.app/api/cashapp/create" \
  -H "Content-Type: application/json" \
  -d '{
    "amount": 1.00,
    "reference": "TEST-001",
    "webhookUrl": "https://webhook.site/your-unique-url"
  }'

Support

For technical support or questions about the Via One Cash App Payments API:

  • Email: support@viaone.com
  • Documentation: This document
  • API Status: https://latcom-fix-production.up.railway.app/health

Changelog

v1.0 (December 2025)

  • Initial release
  • Cash App payment support
  • QR code generation
  • Webhook notifications
  • Mobile deep link support