Skip to main content

Maya Recurring enables merchants to collect subscription or recurring payments directly from a customer's Maya wallet. Customers authorize a recurring payment mandate (or enrollment) during the initial transaction, allowing merchants to perform future debits without requiring manual approval for every payment.

This payment method is widely used in the Philippines for subscription-based services, including streaming platforms, gaming services, digital memberships, and SaaS products. Maya Recurring helps merchants reduce churn by offering a familiar local wallet experience.

This capability is commonly used for SaaS and digital subscriptions, gaming memberships and in-app subscriptions, streaming and entertainment services, e-learning platforms, and utilities and telecom services.

Key Features

FeaturePurposeBenefit
Enrollment AuthorizationCustomer enrollment approval.Enables secure customer consent while eliminating the need for repeated authorization per payment.
Merchant Initiated ChargesCreate new charges linked to a previously accepted and valid enrollment.Simplifies billing automation and reduces friction for subscription-based services.
Subscription Lifecycle ManagementProvides the ability to query, cancel, or manage subscription enrollments.Gives merchants operational control over subscriptions and improves customer account management.
Payment NotificationsSends asynchronous updates whenever payment status changes.Ensures merchants receive real-time transaction updates for reconciliation and order fulfillment.

How it works

  1. Subscription Enrollment - Merchant registers the subscription and redirects the user to authorize it within the Maya app.
  2. Recurring Payment Request - Merchant triggers a recurring charge linked to the enrollment when required.
  3. Payment Confirmation - EBANX sends payment status notifications to the merchant.
Transaction Limits

Maya has a minimum amount limit of 1 PHP and a maximum limit between 50,000 and 100,000, depending on the type of wallet.

Requirements

  • API credentials - Ensure you have your EBANX integration key. If not, complete the Merchant Signup Form.

Instructions

Follow the steps below.

  1. Select your environment

    Select the appropriate environment for your integration. Use the sandbox environment for testing or the production environment for live transactions.

    Select the appropriate environment for your integration. Use the sandbox environment for testing, or the production environment for live transactions. Use the URL for your HTTP requests based on your selection.

    https://sandbox.ebanx.com/ws/direct
  2. Define enrollment parameters

    To start the recurring payment process, enroll the subscription using the /ws/direct endpoint. This step involves collecting essential customer details and subscription parameters to establish the recurring billing agreement.

    Users will be required to complete 2FA/login to accept this enrollment in their app. Once the process is complete, the customer will be enrolled for the recurring payment cycle.

    Basic parameters

    ParameterRequirementDescription
    integration_keyRequiredYour integration key.
    operationRequiredMust be request.

    Enrollment parameters

    ParameterRequirementDescription
    payment.nameRequiredFull name of the payer.
    payment.emailRequiredCustomer email.
    payment.phone_numberRequiredCustomer phone number.
    payment.countryRequiredSet to ph for Philippines.
    payment.payment_type_codeRequiredMust be paymaya-recurring.
    payment.merchant_payment_codeRequiredUnique code for the payment.
    payment.currency_codeRequiredSet to PHP.
    payment.amount_totalRequiredPayment amount.
    payment.enrollment.merchant_enrollment_codeRequiredUnique identifier for the enrollment.
    payment.enrollment.back_urls.successRequiredURL to redirect on success.
    payment.enrollment.back_urls.failureRequiredURL to redirect on failure.
    payment.enrollment.subscription.subscription_nameRequiredSubscription description (1-35 characters).
    payment.enrollment.subscription.expiration_dateRequiredExpiration date in YYYY-MM-DD format (must be a future date).
    payment.enrollment.subscription.frequencyRequiredSet to ondemand.
  3. Enrollment request

    Enroll the customer in Maya Recurring using the /ws/direct endpoint.


    Sample request

    curl -X POST \
    --location 'https://sandbox.ebanx.com/ws/direct' \
    --header 'Content-Type: application/json' \
    --data '{
    "integration_key": "{{integration_key}}",
    "operation": "request",
    "payment": {
    "name": "John Doe",
    "email": "john.doe@example.com",
    "country": "ph",
    "phone_number": "5555555555",
    "payment_type_code": "paymaya-recurring",
    "merchant_payment_code": "{{merchant_payment_code}}",
    "currency_code": "PHP",
    "amount_total": 1,
    "enrollment": {
    "merchant_enrollment_code": "{{unique_enrollment_code}}",
    "back_urls": {
    "success": "https://your-success-url.com",
    "failure": "https://your-failure-url.com"
    },
    "subscription": {
    "subscription_name": "{{description}}",
    "expiration_date": "{{YYYY-MM-DD}}",
    "frequency": "ondemand"
    }
    }
    }
    }'
  4. Enrollment response

    A successful request will return a JSON response like the one below:

    {
    "payment": {
    "hash": "59acc5f00945fa382ab051651440826da7701533249b3a475",
    "country": "ph",
    "merchant_payment_code": "{{merchant_payment_code}}",
    "order_number": null,
    "status": "PE",
    "status_date": "{{YYYY-MM-DD HH:mm:ss}}",
    "open_date": "{{YYYY-MM-DD HH:mm:ss}}",
    "confirm_date": "{{YYYY-MM-DD HH:mm:ss}}",
    "transfer_date": "{{YYYY-MM-DD HH:mm:ss}}",
    "amount_br": "99.85",
    "amount_ext": "99.85",
    "amount_iof": "1",
    "currency_rate": "1.0000",
    "currency_ext": "PHP",
    "due_date": "{{YYYY-MM-DD}}",
    "instalments": "1",
    "payment_type_code": "paymaya-recurring",
    "redirect_url": "https://merchant.example.com/callback",
    "pre_approved": false,
    "capture_available": null,
    "customer": {
    "email": "john.doe@example.com",
    "name": "John Doe"
    },
    "currency_ext_base": "PHP"
    },
    "status": "SUCCESS",
    "redirect_url": "https://merchant.example.com/callback"
    }
    Important notes about enrollment
    • On-demand frequency provides merchants with the flexibility to initiate charges at any time within the subscription validity period, without being restricted to a fixed billing schedule.
    • The enrollment is automatically created and accepted upon the initial payment confirmation.
    Subsequent payments

    Save the merchant_enrollment_code for subsequent payment requests.

  5. Confirm the enrollment

    As soon as the payment is confirmed by the customer in their e-wallet app, the enrollment status is modified from pending to accepted, and a Status Update Notification is sent to the URL defined in your merchant configuration.

    Notification example:

    operation=enrollment_status_change&notification_type=update&merchant_enrollment_code={{merchant_enrollment_code}}

    To ensure efficient and compliant interactions, EBANX allows merchants to confirm a user's enrollment status before sending multiple notifications or processing transactions.

  6. Query enrollment status

    Before requesting any payments, call the /ws/userenrollments/query endpoint using the merchant_enrollment_code to get the latest status of the enrollment.


    Sample request

    curl -X POST \
    --location 'https://sandbox.ebanx.com/ws/userenrollments/query' \
    --header 'Content-Type: application/json' \
    --data '{
    "integration_key": "{{integration_key}}",
    "payment_type_code": "paymaya-recurring",
    "enrollment": {
    "country": "ph",
    "merchant_enrollment_code": "{{unique_enrollment_code}}"
    }
    }'

    Sample response

    {
    "status": "SUCCESS",
    "payment_type": "paymaya-recurring",
    "enrollment": {
    "status": "accepted"
    }
    }

    The response will indicate one of the following values for enrollment status:

    • accepted - Enrollment approved by the customer.
    • not accepted - Enrollment rejected by the customer.
    • pending - Enrollment awaiting customer action.
    • expired - Enrollment expired.
    • not_found - Enrollment not found.
    • revoked - Enrollment cancelled.

    If your enrollment has the status accepted, you can start requesting recurring payments.

  7. Define payment parameters

    After the enrollment is accepted, you can create recurring payment requests. The payment follows the usual standards of /ws/direct payment requests, with the addition of specific parameters related to enrollment.

    ParameterRequirementDescription
    integration_keyRequiredYour EBANX integration key.
    operationRequiredSet to request.
    payment.nameRequiredFull name of the payer.
    payment.emailRequiredCustomer email.
    payment.phone_numberRequiredCustomer contact number.
    payment.countryRequiredSet to ph for Philippines.
    payment.payment_type_codeRequiredSet to paymaya-recurring.
    payment.merchant_payment_codeRequiredUnique code for the payment.
    payment.currency_codeRequiredSet to PHP.
    payment.amount_totalRequiredPayment amount.
    payment.enrollment.merchant_enrollment_codeRequiredUnique identifier associated with the enrollment.
  8. Create payment request

    Sample request

    curl -X POST \
    --location 'https://sandbox.ebanx.com/ws/direct' \
    --header 'Content-Type: application/json' \
    --data '{
    "integration_key": "{{integration_key}}",
    "operation": "request",
    "payment": {
    "name": "John Doe",
    "email": "john.doe@example.com",
    "country": "ph",
    "phone_number": "5555555555",
    "payment_type_code": "paymaya-recurring",
    "merchant_payment_code": "{{merchant_payment_code}}",
    "currency_code": "PHP",
    "amount_total": 99.85,
    "enrollment": {
    "merchant_enrollment_code": "{{unique_enrollment_code}}"
    }
    }
    }'
    Important

    The merchant_enrollment_code associated with the enrollment is required for every subsequent charge.

  9. Payment response

    A successful request will return a JSON response like the one below. The Maya Recurring payment will have a pending (PE) status until confirmed.

    {
    "payment": {
    "hash": "59acc5f00945fa382ab051651440826da7701533249b3a475",
    "country": "ph",
    "merchant_payment_code": "{{merchant_payment_code}}",
    "order_number": null,
    "status": "PE",
    "status_date": "{{YYYY-MM-DD HH:mm:ss}}",
    "open_date": "{{YYYY-MM-DD HH:mm:ss}}",
    "confirm_date": "{{YYYY-MM-DD HH:mm:ss}}",
    "transfer_date": "{{YYYY-MM-DD HH:mm:ss}}",
    "amount_br": "99.85",
    "amount_ext": "99.85",
    "amount_iof": "1",
    "currency_rate": "1.0000",
    "currency_ext": "PHP",
    "due_date": "{{YYYY-MM-DD}}",
    "instalments": "1",
    "payment_type_code": "paymaya-recurring",
    "pre_approved": false,
    "capture_available": null,
    "customer": {
    "email": "john.doe@example.com",
    "name": "John Doe"
    },
    "currency_ext_base": "PHP"
    },
    "status": "SUCCESS"
    }
    Billing engine

    EBANX does not offer a recurrent billing engine. Merchants are required to maintain their own charge schedules.

  10. Monitor payment for status changes

    Notifications

    Status

  11. Congratulations!

    You have successfully integrated Maya Recurring.

    For more information, refer to the
    Direct API reference guidechevron_right

Error Scenarios

This section outlines potential errors that may occur during enrollment creation and recurring payment requests in Maya Recurring. These are synchronous error scenarios triggered by EBANX, in accordance with the product business rules and required fields.

EBANX CodeEBANX MessageDetails
BP-UE-18Field enrollment.subscription.expiration_date must be a future dateIncorrect expiration date.
BP-UE-03Field enrollment.email or enrollment.phone_number is requiredMandatory field is missing.
BP-UE-30The field subscription_name size must be between 1 and 35 characters.Subscription name character limit exceeded.
BP-UE-23Field enrollment.subscription.frequency is requiredFrequency field is blank.

Cancel Enrollment

Merchants can revoke an active subscription by sending a cancel request with the merchant enrollment code.

Ensure enrollment status is Pending or Accepted

You can only cancel an enrollment if its status is pending or accepted. You can check the status using the /ws/userenrollments/query endpoint referencing its merchant_enrollment_code.

Sample request

curl -X POST \
--location 'https://sandbox.ebanx.com/ws/userenrollments/query' \
--header 'Content-Type: application/json' \
--data '{
"integration_key": "{{integration_key}}",
"payment_type_code": "paymaya-recurring",
"enrollment": {
"country": "ph",
"merchant_enrollment_code": "{{unique_enrollment_code}}"
}
}'

Sample response

{
"status": "SUCCESS",
"payment_type": "paymaya-recurring",
"enrollment": {
"status": "accepted"
}
}

Enrollments with a status of accepted or pending are eligible for cancellation. Other possible enrollment statuses include expired, not_found, and revoked, none of which can be cancelled.

Cancel the enrollment

To cancel an enrollment, call the /ws/userenrollment endpoint (from your server) with the following required fields:

ParameterRequirementDescription
integration_keyRequiredYour unique and secret integration key.
operationRequiredMust be cancel.
payment_type_codeRequiredMust be paymaya-recurring.
enrollment.countryRequiredMust be ph.
enrollment.merchant_enrollment_codeRequiredThe unique enrollment identifier.

Sample request

curl -X POST \
--location 'https://sandbox.ebanx.com/ws/userenrollment' \
--header 'Content-Type: application/json' \
--data '{
"integration_key": "{{integration_key}}",
"operation": "cancel",
"payment_type_code": "paymaya-recurring",
"enrollment": {
"merchant_enrollment_code": "{{unique_enrollment_code}}",
"country": "ph"
}
}'

Sample response

A successful request will return a JSON response with a status of revoked.

{
"status": "SUCCESS",
"payment_type": "paymaya-recurring",
"enrollment": {
"status": "revoked"
}
}

Resources

Use the following resources when testing in your sandbox environment.


Still need help?

Help Image

We hope this article was helpful. If you still have questions, you can explore the following options: