Skip to main content

1. Get your API key

Sign up at the Cherp dashboard to get your API keys. You receive two keys:
Key formatEnvironment
pk_live_<32chars>Production — real funds, real chains
pk_test_<32chars>Test mode — testnets, no real funds, free
Use your test key during development. Both keys use the same base URL and code path.

2. Create a Payment Intent

A Payment Intent represents a single payment request. Create one by calling the API:
curl -X POST https://api.cherp.dev/v1/intents \
  -H "Authorization: Bearer pk_test_..." \
  -H "Content-Type: application/json" \
  -d '{
    "chain": "solana:5eykt4UsFv8P8NJdTREpY1vzqKq2Kvdp",
    "token": "USDC",
    "amount": "10.50",
    "requestor": "7xKXtg2...",
    "idempotencyKey": "order_982734",
    "metadata": { "orderId": "982734" }
  }'
The response includes the full Payment Intent object in created state.

3. Track the payment

Poll the intent status or use webhooks to get notified on state transitions:
curl https://api.cherp.dev/v1/intents/pi_abc123... \
  -H "Authorization: Bearer pk_test_..."
The state field tells you where the payment is in its lifecycle:
StateMeaning
createdIntent exists, no transaction submitted yet
pendingTransaction broadcast, awaiting confirmation
confirmedSufficient confirmations — user-facing completion signal
finalizedChain-level finality (background signal)

4. Simulate in test mode

Use the simulate endpoint to test your integration without waiting for real chain confirmations:
curl -X POST https://api.cherp.dev/v1/test/intents/pi_abc123.../simulate \
  -H "Authorization: Bearer pk_test_..." \
  -H "Content-Type: application/json" \
  -d '{ "targetState": "confirmed" }'
The simulate endpoint is only available with pk_test_ keys. See the testing guide for more details.

Next steps

Payment intents

Understand the full Payment Intent lifecycle and state machine.

SDK integration

Add Cherp to your mobile app with the SDK.

Webhooks

Set up real-time notifications for payment events.

API reference

Explore all available endpoints.