POST
/
api
/
v0
/
payment-intents
/
stablecoin
Create a stable payment intent
curl --request POST \
  --url https://api.devdraft.ai/api/v0/payment-intents/stablecoin \
  --header 'Content-Type: application/json' \
  --header 'idempotency-key: <idempotency-key>' \
  --header 'x-client-secret: <api-key>' \
  --data '{
  "sourceCurrency": "usdc",
  "sourceNetwork": "ethereum",
  "destinationCurrency": "eurc",
  "destinationNetwork": "polygon",
  "destinationAddress": "0x742d35Cc6634C0532925a3b8D4C9db96c4b4d8e1",
  "amount": "100.50",
  "customer_first_name": "John",
  "customer_last_name": "Doe",
  "customer_email": "john.doe@example.com",
  "customer_address": "123 Main St, New York, NY 10001",
  "customer_country": "United States",
  "customer_countryISO": "US",
  "customer_province": "New York",
  "customer_provinceISO": "NY",
  "phoneNumber": "+1-555-123-4567"
}'
{
  "id": "txn_01HZXK8M9N2P3Q4R5S6T7U8V9W",
  "bridge_transfer_id": "transfer_abc123xyz456",
  "state": "pending",
  "amount": "100.00",
  "source": {
    "payment_rail": "ethereum",
    "currency": "usdc"
  },
  "destination": {
    "payment_rail": "polygon",
    "currency": "eurc",
    "to_address": "0x742d35Cc6634C0532925a3b8D4C9db96c4b4d8e1"
  },
  "customer": {
    "first_name": "John",
    "last_name": "Doe",
    "email": "john.doe@example.com",
    "address": "123 Main St, New York, NY 10001",
    "country": "United States",
    "phone_number": "+1-555-123-4567"
  },
  "created_at": "2023-07-01T12:00:00.000Z",
  "updated_at": "2023-07-01T12:00:00.000Z"
}

Authorizations

x-client-secret
string
header
required

Your secret API key. Keep this secure and never expose it in client-side code.

Headers

idempotency-key
string
required

Unique UUID v4 for idempotent requests. Prevents duplicate payments.

Body

application/json

Stable payment intent creation data

sourceCurrency
enum<string>
required

The stablecoin currency to convert FROM. This is the currency the customer will pay with.

Available options:
usdc,
eurc
Example:

"usdc"

sourceNetwork
enum<string>
required

The blockchain network where the source currency resides. Determines gas fees and transaction speed.

Available options:
ethereum,
solana,
polygon,
avalanche_c_chain,
base,
arbitrum,
optimism,
stellar,
tron,
bridge_wallet,
wire,
ach,
ach_push,
ach_same_day,
sepa,
swift,
spei
Example:

"ethereum"

destinationNetwork
enum<string>
required

The blockchain network where the converted currency will be delivered. Must support the destination currency. The blockchain network where the source currency resides. Determines gas fees and transaction speed.

Available options:
ethereum,
solana,
polygon,
avalanche_c_chain,
base,
arbitrum,
optimism,
stellar,
tron,
bridge_wallet,
wire,
ach,
ach_push,
ach_same_day,
sepa,
swift,
spei
Example:

"polygon"

destinationCurrency
enum<string>

The stablecoin currency to convert TO. If omitted, defaults to the same as source currency (cross-chain transfer). The stablecoin currency to convert FROM. This is the currency the customer will pay with.

Available options:
usdc,
eurc
Example:

"eurc"

destinationAddress
string

The wallet address where converted funds will be sent. Supports Ethereum (0x...) and Solana address formats.

Example:

"0x742d35Cc6634C0532925a3b8D4C9db96c4b4d8e1"

amount
string

Payment amount in the source currency. Omit for flexible amount payments where users specify the amount during checkout.

Example:

"100.50"

customer_first_name
string

Customer's first name. Used for transaction records and compliance. Required for amounts over $1000.

Maximum length: 100
Example:

"John"

customer_last_name
string

Customer's last name. Used for transaction records and compliance. Required for amounts over $1000.

Maximum length: 100
Example:

"Doe"

customer_email
string<email>

Customer's email address. Used for transaction notifications and receipts. Highly recommended for all transactions.

Maximum length: 255
Example:

"john.doe@example.com"

customer_address
string

Customer's full address. Required for compliance in certain jurisdictions and high-value transactions.

Maximum length: 500
Example:

"123 Main St, New York, NY 10001"

customer_country
string

Customer's country of residence. Used for compliance and tax reporting.

Maximum length: 100
Example:

"United States"

customer_countryISO
string

Customer's country ISO 3166-1 alpha-2 code. Used for automated compliance checks.

Maximum length: 2
Example:

"US"

customer_province
string

Customer's state or province. Required for US and Canadian customers.

Maximum length: 100
Example:

"New York"

customer_provinceISO
string

Customer's state or province ISO code. Used for automated tax calculations.

Maximum length: 10
Example:

"NY"

phoneNumber
string

Customer's phone number with country code. Used for SMS notifications and verification.

Maximum length: 20
Example:

"+1-555-123-4567"

Response

Stable payment intent created successfully

The response is of type any.