Charges

A Charge represents a payment request. When you want to collect a payment from a customer, you create a Charge with the amount and your order ID.

The Charge Object

{
  "id": "chrg_abc123def456",
  "orderId": "order-123",
  "amount": "25.00",
  "amountReceived": "25.00",
  "feeAmount": "0.25",
  "netAmount": "24.75",
  "currency": "USDC",
  "status": "COMPLETED",
  "cloneAddress": "0x1234...5678",
  "chainId": 8453,
  "paymentUrl": "https://pay.bedrock.io/chrg_abc123def456",
  "explorerUrl": "https://basescan.org/address/0x1234...5678",
  "feeBps": 100,
  "flushTxHash": "0xabcd...ef01",
  "expiresAt": "2024-01-15T12:30:00Z",
  "createdAt": "2024-01-15T12:00:00Z",
  "completedAt": "2024-01-15T12:15:00Z",
  "deployedAt": "2024-01-15T12:05:00Z"
}

Attributes

Attribute
Type
Description

id

string

Unique identifier for the charge

orderId

string

Your unique order identifier

amount

string

Requested payment amount in USDC

amountReceived

string | null

Actual amount received (after payment)

feeAmount

string | null

Protocol fee amount

netAmount

string | null

Amount sent to merchant (after fee)

currency

string

Always "USDC"

status

string

Current status of the charge

cloneAddress

string | null

Payment contract address (after chain selection)

chainId

number | null

Chain ID where payment is expected

paymentUrl

string

URL for the hosted payment page

explorerUrl

string | null

Block explorer URL for the clone

feeBps

number

Fee in basis points (100 = 1%)

flushTxHash

string | null

Settlement transaction hash

expiresAt

string

ISO 8601 expiration timestamp

createdAt

string

ISO 8601 creation timestamp

completedAt

string | null

ISO 8601 completion timestamp

deployedAt

string | null

ISO 8601 clone deployment timestamp

Charge Status

Status
Description

PENDING

Waiting for customer payment

RECEIVED

Payment detected, settlement in progress

COMPLETED

Payment settled to merchant

EXPIRED

Charge expired without payment

CANCELLED

Charge cancelled by merchant

Endpoints

Method
Endpoint
Description

POST

/v1/charges

GET

/v1/charges/:id

GET

/v1/charges

DELETE

/v1/charges/:id

Last updated