Skip to main content

Overview

A digital goods purchase allows customers to buy virtual currency, in-game tokens, sweepstakes coins, and other digital products. This uses the line items checkout flow where you specify the products, prices, and quantities being purchased. Every Soap API request is authenticated with a bearer token in the Authorization header:
Your API key is in the Soap Dashboard under the Developers section. It looks like key_.... Requests with a missing or invalid API key return 422 — never 401 — with a JSON error field, usually {"error": "API key not found."}. Branch on the status code rather than the message: GET /api/v1/device_pings/latest_geo_check does not yet return the same wording. Never expose your API key in client-side code — it is server-side only.

How It Works

  1. Create products in Soap, or pass inline dynamic product details directly in line_items.
  2. Create a checkout session with type: "deposit" and include line_items.
  3. The customer is redirected to the Soap-hosted checkout page showing the items and total.
  4. The customer selects a payment method and completes the purchase.
  5. Upon completion, a webhook is fired and the customer is redirected back to your app.

API Request

You can also manage products from the Soap dashboard and reference them by ID. Simply pass line_items: [{ "product_id": "pr_XXX", "quantity": 1 }] instead of inline product details.

Key Parameters

Line Item Parameters

Each line item can reference an existing product or define a product inline.

When to Use

  • Virtual currency purchases (gold coins, tokens, credits, etc.)
  • Sweepstakes coin packages
  • Any digital goods tied to a product catalog or priced dynamically at checkout time

← Back to Create Checkout

View the full API reference for creating checkouts.