Skip to main content

← All Payment Providers

Overview

Drawdown lets you pay for orders directly from your pre-funded Rye account balance. Unlike card-based payment methods, drawdown requires no tokenization or sensitive card handling. You simply fund your balance ahead of time and reference { "type": "drawdown" } as the payment method when placing orders. In this flow, the developer is responsible for collecting funds from the user, making the developer the merchant of record. The order cost (minus any surcharge) is deducted from your balance at purchase time. If an order fails, the deducted amount is automatically credited back to your balance.

How It Works

  1. Fund your balance — Top up your Rye account balance via Stripe invoices.
  2. Place an order — Submit a checkout intent with "type": "drawdown" as the payment method.
  3. Balance deducted — The order cost is deducted from your balance when the order is placed.

Usage

Single-Step Purchase

curl -X POST https://api.rye.com/v1/checkout-intents/purchase \
  -H "Authorization: Bearer $RYE_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "productUrl": "https://example-store.myshopify.com/products/example-product",
    "quantity": 1,
    "buyer": {
      "firstName": "Jane",
      "lastName": "Doe",
      "email": "jane@example.com",
      "phone": "+15551234567",
      "address1": "123 Main St",
      "city": "New York",
      "province": "NY",
      "postalCode": "10001",
      "country": "US"
    },
    "paymentMethod": {
      "type": "drawdown"
    }
  }'

Two-Step Flow (Add Payment to Existing Intent)

curl -X POST https://api.rye.com/v1/checkout-intents/{id}/payment \
  -H "Authorization: Bearer $RYE_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "paymentMethod": {
      "type": "drawdown"
    }
  }'

Checking Your Balance

You can check your current drawdown balance at any time:
curl -X GET https://api.rye.com/v1/billing/balance \
  -H "Authorization: Bearer $RYE_API_KEY"
To list past transactions against your balance:
curl -X GET https://api.rye.com/v1/billing/transactions \
  -H "Authorization: Bearer $RYE_API_KEY"

Notes

  • Drawdown billing must be enabled on your Rye account. Contact the Rye team to get set up.
  • If an order fails after the balance has been deducted, the amount is automatically refunded to your balance.