A Payment could can be cancelled when it is in one of these statuses: requires_payment_method, requires_capture, requires_confirmation, requires_customer_action.
Use the API key created under your merchant account from the GreenBanana dashboard. API key is used to authenticate API requests from your merchant server only. Don't expose this key on a website or embed it in a mobile application.
Path Parameters
payment_id
string
required
The identifier for payment
Body
application/json
amount_to_cancel
integer<int64> | null
This Unit struct represents MinorUnit in which core amount works
cancellation_reason
string | null
The reason for the payment cancel
merchant_connector_details
object | null
Merchant connector details used to make payments.
Show child attributes
order_details
object[] | null
Use this object to capture the details about the different products for which the payment is being made. The sum of amount across different products here should be equal to the overall payment amount