Creem Payment Provider

Add creemPaymentProvider() to PaymentService.providers. CREEM_API_KEY, CREEM_PRODUCT_ID, and CREEM_WEBHOOK_SECRET are all required. CREEM_PRODUCT_ID must reference a one-time product with tax included in its price, and CREEM_CURRENCY must match that product's currency. Payment passes the server-side order amount as Creem custom_price, which must be between 100 and 99,999,999 minor currency units.

await city.payment.method("creem").invoke({ topup_amount_minor: 500, idempotency_key: "order_123" });

Use on_paid(record, fulfillment) to fulfill the order snapshot; free-amount topups call credits.topup() idempotently with payment:${record.payment_id}. Paid status is independent from wallet fulfillment. Confirmation takes order.amount_paid from the signed event when present, otherwise order.amount, and uses order.currency. The amount must be a nonnegative safe integer in minor units; amount and currency must match the local order, and an external transaction ID is required. Missing, invalid, or mismatched facts cause a 422 failure and move the event to review. Request metadata is not proof of payment. Arbitrary tax, discount, or currency-conversion schemes are not automatically reconciled. Verified events are persisted and queued before acknowledgment. See Payment crediting for recovery and administrator replay.