@extends('backend.template.layouts.template-base') @section('title') Razorpay Settings | {{ config('app.name') }} @endsection @section('content')
@include('backend.template.settings.sidebar')
@if(session('message')) @endif
@csrf

Razorpay Settings

Must match the secret configured for the webhook URL below in Razorpay Dashboard.
{{-- API Reference card --}}
Mobile API Reference

Mobile app fetches credentials from:

GET /api/settings/razorpay

After Razorpay checkout succeeds, mobile sends payment ID to:

POST /api/payments/razorpay
{
  "payment_reference_no": "pay_xxxxxxxxxxxx",
  "amount": 299.00,
  "payment_type": "order",
  "resource_id": 123   // optional – order ID
}

Check raw payment status:

GET /api/payments/razorpay/{pay_xxxx}/status
{{-- Webhook setup card --}}
Webhook Setup (Reconciliation Backstop)

Add this URL in Razorpay Dashboard → Settings → Webhooks, subscribe to the payment.captured event, and paste the generated secret into the "Webhook Secret" field above (same value both places):

{{ url('/api/webhooks/razorpay') }}

This catches payments Razorpay captured where the customer's app/browser never called back (lost connection, closed app, crash) — those get logged to Order Failure Logs automatically instead of sitting untracked.

@endsection