Skip to main content
You can create and pay invoices programmatically without the customer going through checkout. There are two approaches depending on your use case:
  • One-step: use the Merchant Initiate Transaction (MIT) endpoint POST /v1/sessions/pay. Best for automated invoicing or recurring billing.
  • Two-step: create a session via POST /v1/sessions or POST /v1/sessions-profile, then call POST /v1/sessions/{session_id}/pay to complete it. Useful when you want to set up the session first and pay it later, or when integrating with existing session creation flows.

Billing Address Requirements

Both flows require a billing address with the same fields as customer checkout. The location differs: in one-step it’s in session.order.billing_address, in two-step it’s in the pay request body.

One-Step: Create and Pay

A single call creates the session and registers the invoice: Identity verification is automatically skipped. The billing address is provided in session.order.billing_address (see required fields). The transaction is AUTHORIZED on creation and moves to CAPTURED once Kravia confirms the shopper has paid.

B2B Example

B2C Example

For B2C invoices, omit business_name and organization_number:

One-Step Payment Fields

Two-Step: Create Session, Then Pay

Create a session first, then programmatically call the pay endpoint. We recommend setting require_identity_verification: false on the payment type configuration to skip identity verification.

Step 1: Create the Session

For B2B
For B2C, set the same flags:

Step 2: Pay the Session

Call the pay endpoint with the payment_product_type and billing_address. Note that the billing address is provided in the pay request body, not in the session order: B2B:
B2C:

Two-Step Pay Fields

Response

Both approaches return a transaction with status AUTHORIZED. An INITIATE_CAPTURE event is added automatically as Kravia begins delivery. The transaction moves to CAPTURED (or PARTIALLY_CAPTURED) once Kravia confirms the shopper has paid.

Cancellations

Refund is not supported for Kravia. To cancel an invoice, call POST /v1/transactions/{id}/void. Void is allowed on AUTHORIZED (cancels the invoice) and on PARTIALLY_CAPTURED (cancels the remaining amount). See Cancellations in Customer checkout for the full rules per state.

Duplicate Prevention

Use the Dintero-Feature-Toggles header to prevent duplicate invoices:

See Also

Last modified on May 13, 2026