Skip to content

Payments

PaymentIntents are the core resource. Full lifecycle + state machine: Payments concept.

Base path: /v1/payment_intents

Create

bash
curl https://api.digid.cc/v1/payment_intents \
  -u sk_live_...: \
  -H "Idempotency-Key: order-1001" \
  -H "Content-Type: application/json" \
  -d '{
    "amount": 2490,
    "currency": "eur",
    "merchant_reference": "order-1001",
    "metadata": { "customer_id": "cus_123" }
  }'
FieldTypeNotes
amountintMinor units (cents for eur). Required.
currencystringISO 4217. Required.
merchant_referencestringYour order reference.
descriptionstringHuman-readable descriptor.
metadataobjectFree-form key/value strings.
capture_methodautomatic | manualautomatic at launch; manual capture is a planned contract extension.

Response:

json
{
  "id": "pi_1Ab...",
  "object": "payment_intent",
  "amount": 2490,
  "currency": "eur",
  "status": "requires_payment_method",
  "livemode": true,
  "client_secret": "pi_1Ab..._secret_...",
  "created_at": "2026-09-08T09:00:00Z"
}

Confirm

Confirm with a payment token from digid pay Secure Fields:

bash
curl https://api.digid.cc/v1/payment_intents/pi_1Ab.../confirm \
  -u sk_live_...: \
  -H "Idempotency-Key: order-1001-confirm" \
  -H "Content-Type: application/json" \
  -d '{ "payment_method": "pmt_..." }'

payment_method is the token returned by Secure Fields. Confirmations never accept raw card fields — a number-shaped field is rejected (invalid_request_error, code raw_card_rejected) per the token-only contract.

Possible resulting statuses:

StatusMeaning
processingAuthorising.
requires_actionSCA challenge pending (see SCA).
succeededAuthorised and captured.
failedDeclined (card_declined, insufficient_funds, …).

Retrieve

bash
curl https://api.digid.cc/v1/payment_intents/pi_1Ab... -u sk_live_...:

List

bash
curl "https://api.digid.cc/v1/payment_intents?limit=25&starting_after=pi_..." -u sk_live_...:

Pagination is cursor-based: has_more + starting_after (see Rate limits & pagination).

Cancel

Cancels an intent that has not reached a terminal state. Allowed from requires_payment_method, requires_action, and requires_approval:

bash
curl -X POST https://api.digid.cc/v1/payment_intents/pi_1Ab.../cancel \
  -u sk_live_...: \
  -H "Idempotency-Key: order-1001-cancel" \
  -H "Content-Type: application/json"

status becomes cancelled; a payment_intent.cancelled webhook fires.

Approve (agent-initiated payments)

Intents created by an agent start in requires_approval. A designated human approver moves them to processing:

bash
curl -X POST https://api.digid.cc/v1/payment_intents/pi_1Ab.../approve \
  -u sk_live_...: \
  -H "Idempotency-Key: approval-order-1001" \
  -H "Content-Type: application/json"

See Agents for approval semantics. Declining an agent intent = cancelling it.

Idempotency

Every mutating call accepts Idempotency-Key. Replays with the same key return the original result with no second authorisation; a reused key with a different payload returns idempotency_key_reused.

Webhooks

Every state transition emits a webhook (see Webhooks):

payment_intent.processing, .succeeded, .payment_failed, .cancelled, .requires_action, .requires_approval.

Further reading

  • Errors — the envelope and codes.
  • Refunds — reverse a succeeded intent.

digid pay — built in Europe.