Skip to main content
POST
/
v1
/
cpn
/
payments
/
{paymentId}
/
transactions
Create a transaction
curl --request POST \
  --url https://api.circle.com/v1/cpn/payments/{paymentId}/transactions \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{
  "idempotencyKey": "ETH-SEPOLIA",
  "senderAccountType": "EOA"
}'
{
  "data": {
    "id": "c4d1da72-111e-4d52-bdbf-2e74a2d803d5",
    "paymentId": "c4d1da72-111e-4d52-bdbf-2e74a2d803d5",
    "status": "PENDING",
    "failureReason": "FAILED_ONCHAIN",
    "expireDate": "2023-01-01T12:04:05Z",
    "senderAddress": "0xe01be9cdd9e744ae6a709794bfe531ec3ec0671c",
    "senderAccountType": "EOA",
    "blockchain": "ETH-SEPOLIA",
    "amount": {
      "amount": "110.270000",
      "currency": "USDC"
    },
    "destinationAddress": "0xe01be9cdd9e744ae6a709794bfe531ec3ec0671c",
    "estimatedFee": {
      "type": "EIP1559",
      "payload": {
        "gasLimit": "21000",
        "maxFeePerGas": "5935224468",
        "maxPriorityFeePerGas": "1022783914"
      }
    },
    "messageType": "EIP3009",
    "messageToBeSigned": {},
    "signedTransaction": "AgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABpzlAhqqen7eyTe0KQ3w+9NS4E+7sscb+Cr...",
    "transactionHash": "2vmEDSBThR143WJyJePkpKVQcERVo9KePuCUwYU8fkoJaQjarTMj6sZG7DNnJ4zjhtRz6hDruqEFEkD4wJpGviiW"
  }
}

Authorizations

Authorization
string
header
required

Circle's API Keys are formatted in the following structure "PREFIX:ID:SECRET". All three parts are requred to make a successful request.

Path Parameters

paymentId
string<uuid>
required

The payment id created previously.

Example:

"c4d1da72-111e-4d52-bdbf-2e74a2d803d5"

Body

application/json

Create an on-chain transaction to fulfil the payment to BFI, the request will assemble an unsigned on chain transaction.

idempotencyKey
string<uuid>
required

Idempotency key to ensure transaction is only created once

Example:

"a0eebc99-9c0b-4ef8-bb6d-6bb9bd380a11"

senderAccountType
enum<string>
required

The OFI address. Should include the address and the network.

Available options:
EOA
Example:

"EOA"

Response

Transaction created successfully.

data
object
required

Response schema for a blockchain transaction containing details about the transaction amount, addresses, fees, and status

I