API reference

Payment intents

Create, read, list, confirm, and cancel payment intents.

POST/api/v1/payment-intents

Creates an intent. Returns 201 with the intent. Fields are described in Payment intents.

curl https://indeficient.com/api/v1/payment-intents \
  -H "Authorization: Bearer $PP_API_KEY" \
  -H "Content-Type: application/json" \
  -H "Idempotency-Key: order_1042" \
  -d '{"recipient":"RECIPIENT_WALLET_ADDRESS","amount":"25000000","asset":"6gpWDzHJF36N3zxKJKFTGvR1WHF5uvTBqocNPytCmdQZ","protectionPeriod":"sevenDays","merchantReference":"order_1042","metadata":{"customer_id":"cus_8812"}}'
Response
{
  "object": "payment_intent",
  "id": "pi_test_k3v7q2mz5hxa4wde6rtn2bpy",
  "status": "requires_payment",
  "recipient": "GkphMxyen3SSuENVGSTrTRMuMuMEn99jowYXe5SNJea5",
  "amount": "25000000",
  "asset": "6gpWDzHJF36N3zxKJKFTGvR1WHF5uvTBqocNPytCmdQZ",
  "protectionPeriod": "sevenDays",
  "merchantReference": "order_1042",
  "metadata": {
    "customer_id": "cus_8812"
  },
  "paymentId": "9182736455463728190",
  "payment": null,
  "environment": "test",
  "createdAt": "2026-10-10T14:02:11.000Z",
  "expiresAt": "2026-10-11T14:02:11.000Z",
  "canceledAt": null,
  "checkoutUrl": "https://indeficient.com/pay/i/pi_test_k3v7q2mz5hxa4wde6rtn2bpy"
}

A merchantReference already used by one of your open intents returns 409 reference_in_use with the existing intent’s id in error.intent.

GET/api/v1/payment-intents/{id}

One intent. checkoutUrl is set only while it is requires_payment.

curl https://indeficient.com/api/v1/payment-intents/pi_test_… \
  -H "Authorization: Bearer $PP_API_KEY"

GET/api/v1/payment-intents

Your intents, newest first. Filter with merchant_reference; paginate with limit and starting_after.

POST/api/v1/payment-intents/{id}/cancel

Cancels an unpaid intent and returns it. Anything past requires_payment returns 409 intent_not_cancelable.

curl -X POST https://indeficient.com/api/v1/payment-intents/pi_test_…/cancel \
  -H "Authorization: Bearer $PP_API_KEY" \
  -H "Idempotency-Key: cancel_order_1042"

POST/api/v1/payment-intents/{id}/confirm

For a checkout you run yourself: your server reports the signature of the transaction the buyer sent for this intent, and the payment is linked right away instead of waiting for the periodic sweep. The transaction is verified on chain first: it must have succeeded and created a payment carrying this intent’s paymentId, and the payment account itself must match the intent’s recipient, amount, asset, and protection period. Returns outcome (bound, duplicate for a second buyer, or already_recorded) and the intent. A transaction not yet confirmed returns 409 signature_unverified; send it again once it is.

curl -X POST https://indeficient.com/api/v1/payment-intents/pi_test_…/confirm \
  -H "Authorization: Bearer $PP_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"signature":"TRANSACTION_SIGNATURE"}'