When creating payment_method using your own web page, you need to create a customer first to avoid the USER_NOT_FOUND error in your API payload response.
Here are the steps you need to follow to not receive the error.
- Before creating a subscription plan, create a Customer Object using the Create Customer API.
- Input the correct mobile number, especially if your customer wants to use Ewallet.
- After creating a customer, create a Payment Method Object using the Create Payment Method API endpoint.
- Once the customer has successfully authorized the payment method, use the Create Plan endpoint.
- Enter the customer_id and the payment_method_id retrieved from the previous request of Plan Creation API.
- It's possible to input more than one payment_method_id in one plan and rank them by preference.
-
Note that the status of the Payment Method must be ACTIVE for the plan to be successfully activated.
- During this step, configure a wide range of settings for your end users. Refer to our API reference for more information.
- Enter the customer_id and the payment_method_id retrieved from the previous request of Plan Creation API.
To know more, please visit our documentation here: https://docs.xendit.co/subscriptions/using-your-own-linking-ui