Skip to content
Markets open

API reference

Top-ups

Add funds by card, crypto or wire.

13 operationsBase URL https://packetexchange.io/api/v1Postman collection

List your top-ups

GET/api/v1/topups

Access
API key. Full-access keys only; not reachable by scoped keys.
Rate limit
100 requests per second (the default)

Your 50 most recent top-ups of every method and status.

Response 200

FieldTypeDescription
datarequiredobject[]-
idrequireddata[].idstring (uuid)-
methodrequireddata[].methodstringstripe = cardOne of crypto, wire, stripe, x402
amountUsdrequireddata[].amountUsdmoneyUSD as a decimal string with exactly 6 places, e.g. "0.012500".
statusrequireddata[].statusstring-One of pending, confirmed, rejected
cryptoTokenrequireddata[].cryptoTokenstring | null-
cryptoNetworkrequireddata[].cryptoNetworkstring | null-
cryptoTxHashrequireddata[].cryptoTxHashstring | null-
wireReferencerequireddata[].wireReferencestring | null-
depositAddressrequireddata[].depositAddressstring | null-
depositMemorequireddata[].depositMemostring | null-
createdAtrequireddata[].createdAtstring (date-time)ISO-8601 timestamp (UTC)
confirmedAtrequireddata[].confirmedAtstring (date-time) | nullISO-8601 timestamp (UTC)

Errors

  • 400VALIDATION_ERROR, INVALID_INPUT or BAD_REQUEST. For VALIDATION_ERROR, error.details is an array of { path, message }.
  • 401UNAUTHORIZED: missing, invalid, expired or revoked credential.
  • 403FORBIDDEN: not allowed - a scoped key lacks the scope, or the endpoint is session-only.
  • 429RATE_LIMITED: slow down and retry after the Retry-After seconds.
  • 500INTERNAL_ERROR: unexpected failure. Quote X-Request-Id to support.

Start a card top-up

POST/api/v1/topups/stripe

Access
API key. Scoped keys need billing:write.
Rate limit
100 requests per second (the default)
Safe retries
Send X-Idempotency-Key; a replay within 24 hours returns the first response.
Moves money
Starts a payment to top up your balance.

Creates a pending top-up and a card payment to confirm client-side with clientSecret and publishableKey. The balance is credited when the card processor confirms the payment. If card payments are not enabled, the pending top-up is returned with a message instead. Requires identity verification when the platform enforces it (403 KYC_REQUIRED), and is subject to account flags and top-up velocity limits.

Parameters

NameInTypeDescription
X-Idempotency-KeyheaderstringAny unique string (a UUID is ideal). Replays within 24 hours return the first response instead of acting twice.

Request body (application/json)

FieldTypeDescription
amountUsdrequirednumber-5 to 10000

Response 201

FieldTypeDescription
datarequiredobject-
topupIdrequireddata.topupIdstring (uuid)-
amountUsdrequireddata.amountUsdnumberEcho of the requested amount (JSON number)
methodrequireddata.methodstring-One of stripe
statusrequireddata.statusstring-One of pending
clientSecretdata.clientSecretstring-
publishableKeydata.publishableKeystring | null-
messagedata.messagestring-

Errors

  • 400VALIDATION_ERROR, INVALID_INPUT or BAD_REQUEST. For VALIDATION_ERROR, error.details is an array of { path, message }.
  • 401UNAUTHORIZED: missing, invalid, expired or revoked credential.
  • 403FORBIDDEN: not allowed - a scoped key lacks the scope, or the endpoint is session-only.
  • 409CONFLICT (or a code-specific 409): the change clashes with existing state.
  • 429RATE_LIMITED: slow down and retry after the Retry-After seconds.
  • 500INTERNAL_ERROR: unexpected failure. Quote X-Request-Id to support.
  • AlsoKYC_REQUIRED, STRIPE_ERROR

Top up with an x402 USDC payment

POST/api/v1/topups/x402

Access
API key. Scoped keys need billing:write.
Rate limit
100 requests per second (the default)
Moves money
Starts a payment to top up your balance.

Pay-per-request top-up using the x402 protocol. Call once without an X-PAYMENT header to receive a 402 challenge with the payment requirements; retry with a signed X-PAYMENT header to settle and be credited in the same request. A replayed payment returns the original top-up with already: true. It settles real USDC on Base mainnet into your live balance, so test keys are refused with 403 TEST_KEY_NOT_ALLOWED. Requires identity verification when the platform enforces it (403 KYC_REQUIRED), and is subject to account flags and top-up velocity limits.

Request body (application/json)

FieldTypeDescription
amountUsdrequirednumber-5 to 50000

Response 200

FieldTypeDescription
datarequiredobject-
topupIdrequireddata.topupIdstring (uuid)-
amountUsdrequireddata.amountUsdnumber-
methodrequireddata.methodstring-One of x402
statusrequireddata.statusstring-One of pending, confirmed
networkdata.networkstring-
txHashdata.txHashstring-
payerdata.payerstring-
newBalancedata.newBalancenumberBalance after crediting (JSON number)
alreadydata.alreadyboolean-
messagedata.messagestring-

Errors

  • 400VALIDATION_ERROR, INVALID_INPUT or BAD_REQUEST. For VALIDATION_ERROR, error.details is an array of { path, message }.
  • 401UNAUTHORIZED: missing, invalid, expired or revoked credential.
  • 403FORBIDDEN: not allowed - a scoped key lacks the scope, or the endpoint is session-only.
  • 409CONFLICT (or a code-specific 409): the change clashes with existing state.
  • 429RATE_LIMITED: slow down and retry after the Retry-After seconds.
  • 500INTERNAL_ERROR: unexpected failure. Quote X-Request-Id to support.
  • AlsoKYC_REQUIRED, TEST_KEY_NOT_ALLOWED

Start a crypto top-up

POST/api/v1/topups/crypto

Access
API key. Scoped keys need billing:write.
Rate limit
10 requests per minute
Safe retries
Send X-Idempotency-Key; a replay within 24 hours returns the first response.
Moves money
Starts a payment to top up your balance.

Returns where to send funds. When a unique deposit address (or memo) could be allocated, autoCredit is true and the deposit credits automatically on confirmation; otherwise send to the shared address quoting reference and it is credited after manual verification. A memo, when present, is mandatory. Requires identity verification when the platform enforces it (403 KYC_REQUIRED), and is subject to account flags and top-up velocity limits.

Parameters

NameInTypeDescription
X-Idempotency-KeyheaderstringAny unique string (a UUID is ideal). Replays within 24 hours return the first response instead of acting twice.

Request body (application/json)

FieldTypeDescription
amountUsdrequirednumber-5 to 50000
tokenrequiredstring-One of BTC, ETH, USDT, USDC, SOL
networkrequiredstring-One of bitcoin, ethereum, solana, tron, polygon

Response 201

FieldTypeDescription
datarequiredobject-
topupIdrequireddata.topupIdstring (uuid)-
amountUsdrequireddata.amountUsdnumber-
tokenrequireddata.tokenstring-One of BTC, ETH, USDT, USDC, SOL
networkrequireddata.networkstring-One of bitcoin, ethereum, solana, tron, polygon
depositAddressrequireddata.depositAddressstring-
memorequireddata.memostring | null-
referencerequireddata.referencestring-
autoCreditrequireddata.autoCreditboolean-
statusrequireddata.statusstring-One of pending
messagerequireddata.messagestring-

Errors

  • 400VALIDATION_ERROR, INVALID_INPUT or BAD_REQUEST. For VALIDATION_ERROR, error.details is an array of { path, message }.
  • 401UNAUTHORIZED: missing, invalid, expired or revoked credential.
  • 403FORBIDDEN: not allowed - a scoped key lacks the scope, or the endpoint is session-only.
  • 409CONFLICT (or a code-specific 409): the change clashes with existing state.
  • 429RATE_LIMITED: slow down and retry after the Retry-After seconds.
  • 500INTERNAL_ERROR: unexpected failure. Quote X-Request-Id to support.
  • AlsoKYC_REQUIRED

Start a wire-transfer top-up

POST/api/v1/topups/wire

Access
API key. Scoped keys need billing:write.
Rate limit
100 requests per second (the default)
Safe retries
Send X-Idempotency-Key; a replay within 24 hours returns the first response.
Moves money
Starts a payment to top up your balance.

Returns bank details and a reference you must quote on the transfer. Credited within 1-3 business days of receipt. 503 WIRE_UNAVAILABLE when wire is not offered. Requires identity verification when the platform enforces it (403 KYC_REQUIRED), and is subject to account flags and top-up velocity limits.

Parameters

NameInTypeDescription
X-Idempotency-KeyheaderstringAny unique string (a UUID is ideal). Replays within 24 hours return the first response instead of acting twice.

Request body (application/json)

FieldTypeDescription
amountUsdrequirednumber-100 to 100000

Response 201

FieldTypeDescription
datarequiredobject-
topupIdrequireddata.topupIdstring (uuid)-
amountUsdrequireddata.amountUsdnumber-
wireReferencerequireddata.wireReferencestring-
bankDetailsrequireddata.bankDetailsobject-
bankNamerequireddata.bankDetails.bankNamestring-
accountNamerequireddata.bankDetails.accountNamestring-
ibanrequireddata.bankDetails.ibanstring-
swiftrequireddata.bankDetails.swiftstring-
currencyrequireddata.bankDetails.currencystring-One of USD
statusrequireddata.statusstring-One of pending
messagerequireddata.messagestring-

Errors

  • 400VALIDATION_ERROR, INVALID_INPUT or BAD_REQUEST. For VALIDATION_ERROR, error.details is an array of { path, message }.
  • 401UNAUTHORIZED: missing, invalid, expired or revoked credential.
  • 403FORBIDDEN: not allowed - a scoped key lacks the scope, or the endpoint is session-only.
  • 409CONFLICT (or a code-specific 409): the change clashes with existing state.
  • 429RATE_LIMITED: slow down and retry after the Retry-After seconds.
  • 500INTERNAL_ERROR: unexpected failure. Quote X-Request-Id to support.
  • AlsoKYC_REQUIRED, WIRE_UNAVAILABLE

List available top-up methods and their limits

GET/api/v1/topups/methods

Access
API key. Full-access keys only; not reachable by scoped keys.
Rate limit
100 requests per second (the default)

Response 200

FieldTypeDescription
datarequiredobject-
striperequireddata.stripeobject-
enabledrequireddata.stripe.enabledboolean-
minAmountrequireddata.stripe.minAmountnumber-
maxAmountrequireddata.stripe.maxAmountnumber-
currencyrequireddata.stripe.currencystring-
processingTimerequireddata.stripe.processingTimestring-
cryptorequireddata.cryptoobject-
enabledrequireddata.crypto.enabledboolean-
minAmountrequireddata.crypto.minAmountnumber-
maxAmountrequireddata.crypto.maxAmountnumber-
tokensrequireddata.crypto.tokensstring[]-
networksrequireddata.crypto.networksstring[]-
processingTimerequireddata.crypto.processingTimestring-
wirerequireddata.wireobject-
enabledrequireddata.wire.enabledboolean-
minAmountrequireddata.wire.minAmountnumber-
maxAmountrequireddata.wire.maxAmountnumber-
currencyrequireddata.wire.currencystring-
processingTimerequireddata.wire.processingTimestring-
bankDetailsrequireddata.wire.bankDetailsobject | null-
bankNamerequireddata.wire.bankDetails.bankNamestring-
accountNamerequireddata.wire.bankDetails.accountNamestring-
ibanrequireddata.wire.bankDetails.ibanstring-
swiftrequireddata.wire.bankDetails.swiftstring-
currencyrequireddata.wire.bankDetails.currencystring-One of USD

Errors

  • 400VALIDATION_ERROR, INVALID_INPUT or BAD_REQUEST. For VALIDATION_ERROR, error.details is an array of { path, message }.
  • 401UNAUTHORIZED: missing, invalid, expired or revoked credential.
  • 403FORBIDDEN: not allowed - a scoped key lacks the scope, or the endpoint is session-only.
  • 429RATE_LIMITED: slow down and retry after the Retry-After seconds.
  • 500INTERNAL_ERROR: unexpected failure. Quote X-Request-Id to support.

Start saving a card for auto-recharge

POST/api/v1/topups/setup-intent

Access
API key. Full-access keys only; not reachable by scoped keys.
Rate limit
100 requests per second (the default)
Moves money
Starts a payment to top up your balance.

Returns a client secret to collect and save a card for later unattended charges. 503 STRIPE_DISABLED when card payments are off.

Response 201

FieldTypeDescription
datarequiredobject-
clientSecretrequireddata.clientSecretstring | null-
publishableKeyrequireddata.publishableKeystring | null-

Errors

  • 400VALIDATION_ERROR, INVALID_INPUT or BAD_REQUEST. For VALIDATION_ERROR, error.details is an array of { path, message }.
  • 401UNAUTHORIZED: missing, invalid, expired or revoked credential.
  • 403FORBIDDEN: not allowed - a scoped key lacks the scope, or the endpoint is session-only.
  • 409CONFLICT (or a code-specific 409): the change clashes with existing state.
  • 429RATE_LIMITED: slow down and retry after the Retry-After seconds.
  • 500INTERNAL_ERROR: unexpected failure. Quote X-Request-Id to support.
  • AlsoSTRIPE_DISABLED, STRIPE_ERROR

List your saved cards

GET/api/v1/topups/payment-methods

Access
API key. Full-access keys only; not reachable by scoped keys.
Rate limit
100 requests per second (the default)

Brand, last 4 and expiry only. Empty when card payments are off or no card is saved.

Response 200

FieldTypeDescription
datarequiredobject[]-
idrequireddata[].idstring-
brandrequireddata[].brandstring-
last4requireddata[].last4string-
expMonthrequireddata[].expMonthinteger | null-
expYearrequireddata[].expYearinteger | null-
isDefaultrequireddata[].isDefaultboolean-

Errors

  • 400VALIDATION_ERROR, INVALID_INPUT or BAD_REQUEST. For VALIDATION_ERROR, error.details is an array of { path, message }.
  • 401UNAUTHORIZED: missing, invalid, expired or revoked credential.
  • 403FORBIDDEN: not allowed - a scoped key lacks the scope, or the endpoint is session-only.
  • 429RATE_LIMITED: slow down and retry after the Retry-After seconds.
  • 500INTERNAL_ERROR: unexpected failure. Quote X-Request-Id to support.

Set your default card

POST/api/v1/topups/payment-methods/default

Access
API key. Full-access keys only; not reachable by scoped keys.
Rate limit
100 requests per second (the default)
Moves money
Starts a payment to top up your balance.

The default card is the one auto-recharge charges.

Request body (application/json)

FieldTypeDescription
paymentMethodIdrequiredstring-

Response 200

FieldTypeDescription
datarequiredobject-
defaultPaymentMethodIdrequireddata.defaultPaymentMethodIdstring-

Errors

  • 400VALIDATION_ERROR, INVALID_INPUT or BAD_REQUEST. For VALIDATION_ERROR, error.details is an array of { path, message }.
  • 401UNAUTHORIZED: missing, invalid, expired or revoked credential.
  • 403FORBIDDEN: not allowed - a scoped key lacks the scope, or the endpoint is session-only.
  • 409CONFLICT (or a code-specific 409): the change clashes with existing state.
  • 429RATE_LIMITED: slow down and retry after the Retry-After seconds.
  • 500INTERNAL_ERROR: unexpected failure. Quote X-Request-Id to support.
  • AlsoSTRIPE_DISABLED

Remove a saved card

DELETE/api/v1/topups/payment-methods/{id}

Access
API key. Full-access keys only; not reachable by scoped keys.
Rate limit
100 requests per second (the default)
Moves money
Starts a payment to top up your balance.

Removing the default card also clears it as default, which stops auto-recharge from charging.

Parameters

NameInTypeDescription
idrequiredpathstring-

Response 200

FieldTypeDescription
datarequiredobject-
removedrequireddata.removedstring-

Errors

  • 400VALIDATION_ERROR, INVALID_INPUT or BAD_REQUEST. For VALIDATION_ERROR, error.details is an array of { path, message }.
  • 401UNAUTHORIZED: missing, invalid, expired or revoked credential.
  • 403FORBIDDEN: not allowed - a scoped key lacks the scope, or the endpoint is session-only.
  • 404NOT_FOUND: no such resource on your account.
  • 409CONFLICT (or a code-specific 409): the change clashes with existing state.
  • 429RATE_LIMITED: slow down and retry after the Retry-After seconds.
  • 500INTERNAL_ERROR: unexpected failure. Quote X-Request-Id to support.

Get your auto-recharge settings

GET/api/v1/topups/auto-recharge

Access
API key. Full-access keys only; not reachable by scoped keys.
Rate limit
100 requests per second (the default)

Response 200

FieldTypeDescription
datarequiredobject-
enabledrequireddata.enabledboolean-
thresholdrequireddata.thresholdstring | nullUSD, 2-decimal string: recharge when the balance falls below this
amountrequireddata.amountstring | nullUSD, 2-decimal string: how much each recharge adds
dailyCaprequireddata.dailyCapstring | nullUSD, 2-decimal string: most that auto-recharge may charge per UTC day
hasDefaultCardrequireddata.hasDefaultCardboolean-

Errors

  • 400VALIDATION_ERROR, INVALID_INPUT or BAD_REQUEST. For VALIDATION_ERROR, error.details is an array of { path, message }.
  • 401UNAUTHORIZED: missing, invalid, expired or revoked credential.
  • 403FORBIDDEN: not allowed - a scoped key lacks the scope, or the endpoint is session-only.
  • 429RATE_LIMITED: slow down and retry after the Retry-After seconds.
  • 500INTERNAL_ERROR: unexpected failure. Quote X-Request-Id to support.

Update your auto-recharge settings

PUT/api/v1/topups/auto-recharge

Access
API key. Full-access keys only; not reachable by scoped keys.
Rate limit
100 requests per second (the default)
Moves money
Starts a payment to top up your balance.

Send only the fields to change; null clears a value. Enabling requires a default card and both a threshold and an amount.

Request body (application/json)

FieldTypeDescription
enabledboolean-
thresholdnumber | null-0 to 100000
amountnumber | null-5 to 10000
dailyCapnumber | null-0 to 100000

Response 200

FieldTypeDescription
datarequiredobjectSame fields as AutoRecharge, shown earlier on this page.

Errors

  • 400VALIDATION_ERROR, INVALID_INPUT or BAD_REQUEST. For VALIDATION_ERROR, error.details is an array of { path, message }.
  • 401UNAUTHORIZED: missing, invalid, expired or revoked credential.
  • 403FORBIDDEN: not allowed - a scoped key lacks the scope, or the endpoint is session-only.
  • 409CONFLICT (or a code-specific 409): the change clashes with existing state.
  • 429RATE_LIMITED: slow down and retry after the Retry-After seconds.
  • 500INTERNAL_ERROR: unexpected failure. Quote X-Request-Id to support.

List your pending top-ups with payment instructions

GET/api/v1/topups/pending

Access
API key. Full-access keys only; not reachable by scoped keys.
Rate limit
100 requests per second (the default)

Pending crypto and wire top-ups with the address or bank details to complete them. Pending top-ups expire after 7 days. amountUsd here is a plain JSON number.

Response 200

FieldTypeDescription
datarequiredobject[]-
idrequireddata[].idstring (uuid)-
methodrequireddata[].methodstring-One of crypto, wire, stripe, x402
amountUsdrequireddata[].amountUsdnumber-
statusrequireddata[].statusstring-One of pending
referencerequireddata[].referencestring | null-
createdAtrequireddata[].createdAtstring (date-time)ISO-8601 timestamp (UTC)
ageHoursrequireddata[].ageHoursinteger-
expiresInDaysrequireddata[].expiresInDaysinteger-
tokendata[].tokenstring | null-
networkdata[].networkstring | null-
depositAddressdata[].depositAddressstring | null-
bankDetailsdata[].bankDetailsobject | null-
bankNamerequireddata[].bankDetails.bankNamestring-
accountNamerequireddata[].bankDetails.accountNamestring-
ibanrequireddata[].bankDetails.ibanstring-
swiftrequireddata[].bankDetails.swiftstring-
currencyrequireddata[].bankDetails.currencystring-One of USD
instructionsrequireddata[].instructionsstring-

Errors

  • 400VALIDATION_ERROR, INVALID_INPUT or BAD_REQUEST. For VALIDATION_ERROR, error.details is an array of { path, message }.
  • 401UNAUTHORIZED: missing, invalid, expired or revoked credential.
  • 403FORBIDDEN: not allowed - a scoped key lacks the scope, or the endpoint is session-only.
  • 429RATE_LIMITED: slow down and retry after the Retry-After seconds.
  • 500INTERNAL_ERROR: unexpected failure. Quote X-Request-Id to support.