@include('user.store._sidebar', ['current' => 'payments', 'cfg' => $cfg, 'sf' => $sf])
{{ __('Store / Payments') }}

{{ __('WhatsApp Pay') }} {{ __('in-chat') }}

{{ __('Let customers pay for their order WITHOUT leaving WhatsApp — they tap “Review and Pay” right in the chat (UPI / cards / netbanking / wallets via your gateway). You collect the money in your own Razorpay / PayU / BillDesk / Zaakpay account.') }}

{{ __('Outside India? Configure hosted checkout gateways (Stripe, Paystack, Flutterwave & 29 more) →') }}
{{-- India-only banner --}}
{{ __('India only.') }} {{ __('Native in-chat WhatsApp Pay is currently live only for businesses in India (Meta restriction). Your WABA number was detected as') }} {{ $country ?: __('unknown') }}. @unless ($regionOk) {{ __('Outside India, use a payment link instead (Store → Orders → “Send payment link”).') }} @endunless
@if (session('status'))
{{ session('status') }}
@endif @error('wapay')
{{ $message }}
@enderror @error('config_name')
{{ $message }}
@enderror {{-- KPIs --}}
{{ __('Configs') }}
{{ number_format($configs->count()) }}
{{ __('Active') }}
{{ number_format($configs->where('is_active', true)->count()) }}
{{ __('WABA') }}
{{ $waba ? ($waba->phone_number ?: $waba->display_label) : __('Not connected') }}
{{-- Add / update configuration --}}

{{ __('Add a payment configuration') }}

{{ __('Paste the Direct-Pay-Method name you created in WhatsApp Manager and pick its gateway.') }}

@csrf

{{ __('Must EXACTLY match the name in') }} WhatsApp Manager → Payment configurations → India.

{{-- How-to helper --}}

{{ __('How to set it up') }}

  1. {{ __('In') }} WhatsApp Manager → Payments → India, {{ __('create a “Direct Pay Method” and link your Razorpay / PayU / BillDesk / Zaakpay account.') }}
  2. {{ __('Give it a name and copy that name here (it can’t be created from our app — it’s a Meta-side step).') }}
  3. {{ __('Save above, then go to') }} {{ __('Store → Orders') }} {{ __('and use “Request payment on WhatsApp” on any order.') }}
  4. {{ __('The customer taps Review and Pay → pays in-chat → the order is marked paid automatically (confirmed via Meta’s lookup, never trusting the webhook alone).') }}
{{-- Existing configs --}}
{{ __('Your configurations') }}
@forelse ($configs as $c)
{{ $c->config_name }}
{{ strtoupper($c->payment_type) }} · {{ $c->currency }} · {{ $c->country }}
{{ $c->is_active ? __('Active') : __('Off') }}
@csrf @method('DELETE')
@empty
{{ __('No payment configurations yet. Add one above to start collecting in-chat payments.') }}
@endforelse