RazorpayPaymentUpiCreateRequestBody constructor

  1. @JsonSerializable(includeIfNull: false)
const RazorpayPaymentUpiCreateRequestBody({
  1. required dynamic amount,
  2. required String currency,
  3. required String order_id,
  4. required String email,
  5. required dynamic contact,
  6. required String method,
  7. IMap<String>? notes,
  8. String? description,
  9. String? customer_id,
  10. String? subscription_id,
  11. PaymentAuthentication? authentication,
  12. @JsonKey(toJson: _boolToInt, fromJson: _intToBool) bool? save,
  13. String? callback_url,
  14. PaymentUpiDetails? upi,
  15. String? token,
})

Implementation

@JsonSerializable(includeIfNull: false)
const factory RazorpayPaymentUpiCreateRequestBody({
  // Base fields (customer_id is optional)
  required dynamic amount, // number | string
  required String currency,
  required String order_id,
  required String email,
  required dynamic contact, // UPI specific
  required String
      method, // Should be 'upi', required String ip, required String referer, required String user_agent, // string | number
  IMap<String>? notes,
  String? description,
  String? customer_id, // Optional
  String? subscription_id,
  PaymentAuthentication? authentication,
  @JsonKey(toJson: _boolToInt, fromJson: _intToBool) bool? save, // 1 | 0
  String? callback_url,
  PaymentUpiDetails? upi,
  String? token, // Token of saved VPA
}) = _RazorpayPaymentUpiCreateRequestBody;