Skip to main content
POST
/
api
/
v1
/
billing
/
drawdown
/
topup
JavaScript
import CheckoutIntents from 'checkout-intents';

const client = new CheckoutIntents({
  apiKey: process.env['CHECKOUT_INTENTS_API_KEY'], // This is the default and can be omitted
});

const response = await client.billing.createTopupInvoice({ amountSubunits: 500000 });

console.log(response.id);
{
  "bankTransferDetails": {
    "routingNumber": "<string>",
    "accountNumber": "<string>",
    "bankName": "<string>",
    "accountHolderName": "<string>"
  },
  "url": "https://invoice.stripe.com/i/acct_xxx/test_xxx",
  "amount": {
    "currencyCode": "USD",
    "amountSubunits": 1500
  },
  "status": "draft",
  "id": "in_abc123"
}

Authorizations

Authorization
string
header
required

Rye API key

Body

application/json

Top-up parameters

amountSubunits
integer<int32>
required

Amount in smallest currency unit (e.g. cents).

Required range: x >= 1
Example:

500000

chargeAutomatically
boolean

Override whether to automatically charge the invoice. Defaults to the developer's drawdown config value if not specified.

Example:

false

Response

Created

bankTransferDetails
object
required

Vendor-agnostic bank transfer details for push-based payment

url
string | null
required
Example:

"https://invoice.stripe.com/i/acct_xxx/test_xxx"

amount
object
required
status
enum<string>
required

Vendor-agnostic provider types

Available options:
draft,
open,
paid,
uncollectible,
void,
unknown
id
string
required
Example:

"in_abc123"