Cancel Charge

Cancels a pending charge. Only charges with PENDING status can be cancelled.

DELETE /v1/charges/:id

Request

Headers

Header
Required
Description

X-API-Key

Yes

Your API key

Path Parameters

Parameter
Type
Description

id

string

The charge ID

Example Request

curl -X DELETE https://api.bedrock.io/v1/charges/chrg_abc123def456 \
  -H "X-API-Key: sk_live_your_api_key"

Response

Success (200 OK)

{
  "id": "chrg_abc123def456",
  "orderId": "order-123",
  "amount": "25.00",
  "amountReceived": null,
  "feeAmount": null,
  "netAmount": null,
  "currency": "USDC",
  "status": "CANCELLED",
  "cloneAddress": null,
  "chainId": null,
  "paymentUrl": "https://pay.bedrock.io/chrg_abc123def456",
  "explorerUrl": null,
  "feeBps": 100,
  "flushTxHash": null,
  "expiresAt": "2024-01-15T12:30:00Z",
  "createdAt": "2024-01-15T12:00:00Z",
  "completedAt": null,
  "deployedAt": null
}

Errors

Status
Code
Description

400

invalid_status

Only pending charges can be cancelled

401

unauthorized

Invalid or missing API key

403

forbidden

Not authorized to cancel this charge

404

not_found

Charge not found

Example Error Response

Notes

  • Cancelled charges cannot be reactivated

  • If a clone was already deployed, cancelling the charge won't affect the deployed contract

  • Consider setting appropriate expiration times instead of manually cancelling charges

Last updated