$this->uuid, 'provider' => $this->provider, 'provider_payment_id' => $this->provider_payment_id, 'amount' => (float) $this->amount, 'currency' => $this->currency, 'status' => $this->status, 'return_url' => $this->return_url, 'created_at' => $this->created_at?->toIso8601String(), ]; if ($this->provider === 'stripe' && is_array($this->raw_payload)) { $clientSecret = $this->raw_payload['client_secret'] ?? null; if (is_string($clientSecret) && $clientSecret !== '') { $data['stripe'] = [ 'payment_intent_id' => $this->provider_payment_id, 'client_secret' => $clientSecret, 'publishable_key' => config('services.stripe.key'), ]; } } return $data; } }