The payment adapter will send the fix response for success and error.
Success Response Object
Attributes
- success Boolean
- Success will always be true in payment response success object
- payment_type String
- Payment type can `razorpay`, `razorpay_recurring`, `paypal`, `paypal_recurring` etc
- payment_token String
- payment token from the payment gateway
- payload Json
- Any external data from the payment gateway can be included in payload
- payment_gateway_fee Integer
- Fee taken from the payment gateway
- payment_gateway_fee_currency String
- Fee currency in which fee has been taken from the payment gateway
- status String
- Payment status received from the payment gateway
- amount_currency String
- Currency in which payment has been done
- amount_cents Integer
- Paid amount on the payment gateway
- international Boolean
- Payment is internation or not
- skip_invoice Boolean
- Invoice has been skipped for payment or not
- metadata Json
- metadata if any present
- external_payment_id String
- Id of the payment on the payment gateway
- external_refund_id String
- Id of the refund received from the payment gateway
- client_payload JSON
- contains payment details to be shared with browser
{
	success: true,
	payment_type: "razorpay",
	payment_token: "token_abcder",
	payload: nil,
	payment_gateway_fee: 1100,
	payment_gateway_fee_currency: "INR",
	status: "capture",
	amount_currency: "INR",
	amount_cents: 34900,
	international: false
	skip_invoice: true
	metadata: nil,
	external_payment_id: nil,
	external_refund_id: nil,
  client_payload: nil
}
Error Response Object
Attributes
- success Boolean
- Success will always be false in payment response error object
- payment_type String
- Payment type can `razorpay`, `razorpay_recurring`, `paypal`, `paypal_recurring` etc
- code String
- Error code received from payment gateway, it can be `BadGatewayError`, `GatewayTimeoutError` etc
- message String
- Erorr message received from the payment gateway
- payload Json
- Any external data from the payment gateway can be included in payload
- status String
- Payment status received from the payment gateway
- authorize_uri String
- If we get any authorize_uri from payment gateway
{
	success: false,
	code: "BadGatewayError",
	message: "Recieved BAD_REQUEST_ERROR - The id provided does not exist",
	payment_type: "razorpay",
	status: nil,
	payload: nil,
	authorize_uri: nil
}