Cancelling UPI Autopay Enrollments
Users can cancel their enrollments using their App anytime. Each time a user changes the status of the enrollment EBANX will send an enrollment status update notification to the merchant.
Requirements
- API credentials - Ensure you have your EBANX integration key. If not, complete the Merchant Signup Form.
Instructions
Follow the steps below.
Ensure enrollment status is Pending or Accepted
You can only cancel an enrollment if its
status
is equal to pending or accepted. You can check the status of your payment using the end-pointws/userenrollments/query
referencing to itsmerchant_enrollment_code
.Check the example:
curl -X POST 'https://api.ebanx.com/ws/userenrollments/query' \
--header 'Content-Type: application/json' \
--data '{
"integration_key": "{{integration_key}}",
"payment_type_code": "upi-collect-autopay",
"enrollment": {
"country": "in",
"merchant_enrollment_code": "{{unique_enrollment_code}}"
}
}'A successful request will return a JSON response like the one shown below. Enrollments with a status of
accepted
orpending
are eligible for cancellation. Other possible enrollment statuses includenot_accepted
,expired
,not_found
, andrevoked
, none of which can be cancelled{
"status": "SUCCESS",
"enrollment": {
"status": "accepted",
"email": "{{customer_email}}"
},
"subscription": {
"subscription_name": "Descriptor of the subscription.",
"expiration_date": "2025-12-30",
"frequency": "monthly",
"fixed_amount": 19.90,
"max_amount_floor": null,
"retry": "allow_3R_7D"
}
}Cancel the enrollment
To cancel an enrollment, you just need to call the end-point
/ws/userenrollment
(from your server) with the following required fields:Parameter Requirement Description integration_key
Required Your unique and secret integration key operation
Required Must be cancel
payment_type_code
Required Must be upi-collect-autopay
enrollment.country
Required Must be IN
enrollment.merchant_enrollment_code
Required The unique enrollment identifier Please, check the example below:
curl -X POST 'https://sandbox.ebanx.com/ws/userenrollment' \
--data '{
"integration_key": "{{integration_key}}",
"operation": "cancel",
"payment_type_code": "upi-collect-autopay",
"enrollment": {
"merchant_enrollment_code": "{{unique_enrollment_code}}",
"email": "email@example.com",
"country": "IN"
}'A successful request will return a JSON response similar to the one below, with a status
revoked
.{
"status": "SUCCESS",
"enrollment": {
"status": "revoked"
}
}Congratulations!
You have succesfully Cancelled a UPI Autopay Enrollment.
For more information, refer to theDirect API reference guidechevron_right
Still need help?
We hope this article was helpful. If you still have questions, you can explore the following options:
- Merchant support: Contact our support team at sales.engineering@ebanx.com for assistance.
- Not a partner yet? Please complete the Merchant Signup Form, and our commercial team will reach out to you.