Overview
The ProcessPaymentCommand initiates a payment transaction. It contains all necessary information to authorize and capture payment from a customer.
Command Schema
Schema Definition
{ "commandId": "uuid", "commandType": "ProcessPaymentCommand", "timestamp": "2025-12-11T10:30:00Z", "version": "1.0.0", "data": { "paymentId": "string", "customerId": "string", "amount": { "value": "number", "currency": "string" }, "paymentMethodId": "string", "invoiceId": "string (optional)", "orderId": "string (optional)", "description": "string", "captureMethod": "automatic | manual", "idempotencyKey": "string", "metadata": {} }}Example
{ "commandId": "cmd_a1b2c3d4", "commandType": "ProcessPaymentCommand", "timestamp": "2025-12-11T10:30:00Z", "version": "1.0.0", "data": { "paymentId": "pay_1234567890", "customerId": "cus_johndoe", "amount": { "value": 99.99, "currency": "USD" }, "paymentMethodId": "pm_card_visa_4242", "invoiceId": "INV-2025-000123", "description": "Payment for Invoice INV-2025-000123", "captureMethod": "automatic", "idempotencyKey": "idem_xyz789" }}Validation Rules
- Amount must be positive
- Currency must be supported (USD, EUR, GBP, etc.)
- Customer must exist
- Payment method must be valid and not expired
- Idempotency key prevents duplicate processing
17 properties
commandIdstring<uuid>
requiredUnique command identifier
commandTypestringconstant:
requiredProcessPaymentCommandtimestampstring<date-time>
requiredversionstring
requiredMatch pattern:
^\d+\.\d+\.\d+$dataobject
required