Received unknown parameters: billing_details, payment_method_details. Did you mean payment_user_agent?
Published: 2022-01-19 11:11:53

Please guid me for solve this problem. I'm try integrate api charge only, The given below error(InvalidRequestException) occurred when try to create charge.
at ApiErrorException::factory('Received unknown parameters: billing_details, payment_method_details. Did you mean payment_user_agent?', 400, '{ "error": { "code": "parameter_unknown", "doc_url": "https://stripe.com/docs/error-codes/parameter-unknown", "message": "Received unknown parameters: billing_details, payment_method_details. Did you mean payment_user_agent?", "param": "billing_details", "type": "invalid_request_error" }}', array('error' => array('code' => 'parameter_unknown', 'doc_url' => 'https://stripe.com/docs/error-codes/parameter-unknown', 'message' => 'Received unknown parameters: billing_details, payment_method_details. Did you mean payment_user_agent?', 'param' => 'billing_details', 'type' => 'invalid_request_error')), object(CaseInsensitiveArray), 'parameter_unknown')
in InvalidRequestException.php line 35

My payload for charge is(in PHP):
$chargeCreate = $stripe->charges->create([
			'amount' => 2500,
			'currency' => 'cad',
			'source' => 'tok_mastercard',
			//'metadata' => $metaData,
			// "amount_captured" => 0,
			// "amount_refunded" => 0,
			// "application" => null,
			// "application_fee" => null,
			// "application_fee_amount" => null,
			//"balance_transaction" => "txn_1KENtxACxperSoQATLhXurQ9",
			'billing_details' => [
				'address' => [
					'city' => 'Chennai',
					'country' => 'India',
					'line1' => 'Karapakkam',
					'line2' => 'test',
					'postal_code' => '600091',
					'state' => 'Tamil Nadu'
				],
				'email' => "kalimuthudce2@gmail.com",
				'name' => "Jenny Rosen",
				'phone' => "9999992299"
			],
			//"calculated_statement_descriptor" => null,
			'capture' => false,
			//"created" => 1640350309,
			//"customer" => null,
			"description" => $notes,
			// "disputed" => false,
			// "failure_code" => null,
			// "failure_message" => null,
			// "fraud_details" => [],
			//"invoice" => null,
			//"livemode" => false,
			//"metadata" => [],
			//"on_behalf_of" => null,
			//"order" => null,
			//"outcome" => null,
			//"paid" => true,
			//"payment_intent" => null,
			//"payment_method" => "card_1KADFRACxperSoQAdHPSl8tE",
			"payment_method_details" => [
				"card" => [
					"brand" => "mastercard",
					"checks" => [
						"address_line1_check" => null,
						"address_postal_code_check" => null,
						"cvc_check" => "pass"
					],
					"country" => "US",
					"exp_month" => 7,
					"exp_year" => 2022,
					//"fingerprint" => "D1ORUVKk02xzXhsZ",
					"funding" => "credit",
					"installments" => null,
					"last4" => "4444",
					"network" => "mastercard",
					"three_d_secure" => null,
					"wallet" => null
				],
				"type" => "card"
			],
			"receipt_email" => "k.kalimuthu@claritytts.com",
			//"receipt_number" => "+91 9952826952",
			//"receipt_url" => "https://pay.stripe.com/receipts/acct_1JwEH0ACxperSoQA/ch_3KADFRACxperSoQA05fPIcJ6/rcpt_Kpt1f5Dh2c77fOKsYLUClePa9i2pepL",
			//"refunded" => false,
			// "refunds" => {
			//   "object" => "list",
			//   "data": [],
			//   "has_more" => false,
			//   "url" => "/v1/charges/ch_3KADFRACxperSoQA05fPIcJ6/refunds"
			// },
			//"review" => null,
			//"shipping" => null,
			//"source_transfer" => null,
			//"statement_descriptor" => null,
			//"statement_descriptor_suffix" => null,
			//"status" => "succeeded",
			//"transfer_data" => null,
			//"transfer_group" => null
				  
		  ]);