For the complete documentation index, see llms.txt. This page is also available as Markdown.

API Reference Overview

Complete reference for all Prism API services, request/response types, and error handling.

Overview

Prism provides a unified gRPC API for payment processing across 100+ payment processors. The API is organized into services that handle different aspects of the payment lifecycle.

Services

Service
Description
Key Operations

Core payment lifecycle

Authorize, Capture, Void, Refund, CreateOrder

Refund operations

Get refund status

Stored payment methods

Charge, Revoke mandate

Chargeback handling

Accept, Defend, SubmitEvidence

Webhook processing

Handle connector events

Customer management

Create customer

Payment method storage

Tokenize

3DS authentication

Pre-authenticate, Authenticate, Post-authenticate

Session management

CreateAccessToken, CreateSessionToken, CreateSdkSessionToken

Error Object

All API errors return a structured ErrorInfo object with detailed information about what went wrong.

ErrorInfo Fields

Field
Type
Description

unified_details

UnifiedErrorDetails

Machine-readable unified error code and user-facing message

issuer_details

IssuerErrorDetails

Card issuer-specific error information (scheme, network details)

connector_details

ConnectorErrorDetails

Connector-specific error code and message from the PSP

UnifiedErrorDetails Fields

Field
Type
Description

code

string

Machine-readable error code (e.g., INSUFFICIENT_FUNDS)

message

string

Human-readable error message

description

string

Detailed explanation of the error

user_guidance_message

string

User-facing message with guidance on next steps

IssuerErrorDetails Fields

Field
Type
Description

code

string

Card scheme code (e.g., VISA, MASTERCARD)

message

string

Human-readable message from the issuer

network_details

NetworkErrorDetails

Network-specific error details (advice code, decline code)

NetworkErrorDetails Fields

Field
Type
Description

advice_code

string

Network advice code for retry logic

decline_code

string

Card scheme decline code

error_message

string

Network-specific error details

ConnectorErrorDetails Fields

Field
Type
Description

code

string

Connector-specific error code (e.g., Stripe's card_declined)

message

string

Human-readable message from the connector

reason

string

Detailed explanation of why the error occurred

Error Response Example

Domain Schema

See Domain Schema for complete documentation of all data types, enums, and structures used across the API.

Proto Files

The API is defined in Protocol Buffer files located at:

  • backend/grpc-api-types/proto/payment.proto - Core payment types and errors

  • backend/grpc-api-types/proto/sdk_config.proto - SDK and network error types

  • backend/grpc-api-types/proto/services.proto - Service definitions

Last updated

Was this helpful?