Skip to main content
GET
Get a credit top-up

Overview

Returns a top-up’s checkout status and whether it has been credited. This is the read behind morph billing topup-status. Each call re-reads the checkout from Coinbase and credits the balance as soon as the payment settles, so there is no need to wait for a webhook. Gate on credited. FAILED, EXPIRED and DEACTIVATED are terminal and unpaid: create a new top-up. While the checkout is still ACTIVE, x402_url is returned again so a retry can pay it.

Authorizations

Authorization
string
header
required

Morph API key, passed as Authorization: Bearer sk-.... Create keys at https://www.morphllm.com/dashboard/api-keys.

Path Parameters

checkoutId
string
required

Identifies the top-up to read. Checkout id returned when the top-up was created.

Pattern: ^[0-9a-f]{24}$
Example:

"6ae3c4f9b78e569c621631be"

Response

The top-up state.

Current state of a top-up.

checkoutId
string
required

Checkout id.

Example:

"6ae3c4f9b78e569c621631be"

status
enum<string>
required

Coinbase checkout status. ACTIVE accepts payment at x402_url; PROCESSING means capture is under way; COMPLETED means settled. FAILED, EXPIRED and DEACTIVATED are terminal and unpaid, so start a new top-up. A completed top-up can later become REFUNDED or PARTIALLY_REFUNDED.

Available options:
ACTIVE,
PROCESSING,
COMPLETED,
FAILED,
EXPIRED,
DEACTIVATED,
REFUNDED,
PARTIALLY_REFUNDED
Example:

"ACTIVE"

amount
string
required

USD amount of the top-up, two decimals.

Example:

"25.00"

currency
enum<string>
required

Currency the top-up settles in.

Available options:
USDC
Example:

"USDC"

credited
boolean
required

True once the amount has been added to the balance. Gate on this.

Example:

true

transactionHash
string | null
required

On-chain capture transaction on Base, once settled.

Example:

"0x8f5c0e5b8d1f6a3c9e2b7d4a1f0c3e6b9a2d5f8c1e4b7a0d3f6c9e2b5a8d1f4c"

x402_url
string<uri> | null
required

Payment URL while the checkout is still ACTIVE and unpaid; null otherwise.

Example:

null