baseUrl property

String get baseUrl

Returns the base API URL for this environment.

  • Sandbox → https://api-preprod.phonepe.com/apis/pg-sandbox
  • Production → https://api.phonepe.com/apis/hermes

Implementation

String get baseUrl => switch (this) {
      PhonePeEnvironment.sandbox =>
        'https://api-preprod.phonepe.com/apis/pg-sandbox',
      PhonePeEnvironment.production => 'https://api.phonepe.com/apis/hermes',
    };