Skip to main content

Tokenization Payment

{% raw %}

POST/v3/recurring-payment

What is this?

Tokenization replaces sensitive card data (PAN) with a secure token. Within the RM API, tokenization enables two use cases:

  • Recurring Payment — automatically charge a customer's card on a schedule (weekly, monthly, etc.)
  • Tokenized Payment — store card details once, then charge on your own terms (for merchants with their own recurring engine)

When to Use

Use tokenization when you:

  • Need to charge customers on a recurring basis (subscriptions, instalments)
  • Want to offer flexible, on-demand charges without storing card details
  • Are building a micromobility or other pay-per-use service

How to Use

Step 1: Create a Customer

Create a customer by sending their details and redirect URL. The customer is redirected to bind their card.

Step 2: Customer Binds Their Card

The customer completes card binding on the RM-hosted page. After binding, they are redirected back to your redirectUrl.

Step 3: Handle the Redirect

The redirect includes status and customerId. If status is "SUCCESS", the customer is ready for payments.

Step 4: For Recurring — Set Up Your Recurring Engine

For Recurring Payment, charges happen automatically based on your schedule. For Tokenized Payment, you call the Create Customer Order API to charge on demand.


Tokenization: Recurring Payment

Recurring payment lets you automatically charge a customer's card based on a defined schedule.

Create Recurring Customer

Request Parameters

storeIdStringrequired

Revenue Monster Store ID

emailStringrequired

Customer email address

nameStringrequired

Customer name

countryCodeStringrequired

Customer country code

Example: "60"

phoneNumberStringrequired

Customer phone number

productNameStringrequired

Recurring product name

productDescriptionStringrequired

Recurring product description

currencyStringrequired

Recurring payment currency

Example: "MYR"

amountUint64required

Recurring payment amount in smallest currency unit

redirectUrlStringrequired

URL to redirect the customer to after card binding

notifyUrlStringrequired

Server URL to receive payment notifications

recurringIntervalStringrequired

Recurring interval (WEEKLY, MONTHLY)

recurringTargetStringrequired

Day of the week or month to charge. See recurring target rules below.

recurringRepetitionUint64required

Number of times to charge the customer

Recurring Target Rules:

IntervalTargetPayment Behaviour
WEEKLY0Every Sunday
WEEKLY1Every Monday
WEEKLY2Every Tuesday
WEEKLY3Every Wednesday
WEEKLY4Every Thursday
WEEKLY5Every Friday
WEEKLY6Every Saturday
MONTHLY-1End of every month
MONTHLY0Start of every month
MONTHLY1–28Day of the month
Example Request
JSON
1{
2 "storeId": "1602660043994159611",
3 "email": "oska.ng@revenuemonster.my",
4 "name": "Oska Ng OpenAPI",
5 "countryCode": "60",
6 "phoneNumber": "187824152",
7 "currency": "MYR",
8 "amount": 120,
9 "redirectUrl": "https://google.com",
10 "notifyUrl": "https://google.com",
11 "productName": "Some Product Name",
12 "productDescription": "Some Product productDescription",
13 "recurringInterval": "WEEKLY",
14 "recurringTarget": "1",
15 "recurringRepetition": 10
16}

Response Parameters

item.idString

Recurring payment ID

item.merchantIdString

Merchant ID

item.storeIdString

Store ID

item.labelString

Customer card: front six and last four digits

item.emailString

Customer email

item.countryCodeString

Customer country code

item.phoneNumberString

Customer phone number

item.productNameString

Recurring product name

item.productDescriptionString

Recurring product description

item.isActiveBoolean

Whether the recurring payment is active. Becomes true after card is bound successfully.

item.createdAtString

Recurring created date time

item.updatedAtString

Recurring last updated date time

item.clientKeyString

Internal usage only

item.redirectUrlString

URL for customer to redirect after card binding

item.notifyUrlString

URL for payment notifications

item.paymentUrlString

URL for customer to bind their card

item.recurringPayment.amountUint64

Recurring payment amount

item.recurringPayment.currencyString

Recurring payment currency

item.recurringPayment.recurringIntervalString

Recurring interval

item.recurringPayment.recurringTargetString

Recurring target rules

item.recurringPayment.recurringRepetitionUint64

Number of repetitions

codeString

"SUCCESS" if the request succeeded, otherwise an error code.

error.codeString

Error code if the request failed.

error.messageString

Error message if the request failed.

error.debugString

Debug message (sandbox only).

Redirect Response

The redirect URL brings the customer back to your page after card binding. It can be any URL type (deep link, browser URL, server URL).

Method: GET

statusStringrequired

Card bind status

customerIdStringrequired

Card bind customer ID. Use this for subsequent API calls.

reasonString

Card bind failure reason

Notify Response

Notify URL informs your server when a recurring payment is made. Notify is only called on success — fail and refund do not trigger a notify. Use Query Transaction for full transaction details.

Method: GET

eventTypeStringrequired

Notify event type

data.amountUint64required

Recurring payment amount

data.currencyStringrequired

Recurring order currency

data.countryCodeStringrequired

Recurring customer country code

data.phoneNumberStringrequired

Recurring customer phone number

data.customerIdStringrequired

Recurring customer ID

data.emailStringrequired

Recurring customer email

data.nameStringrequired

Recurring customer name

data.merchantIdStringrequired

Merchant ID

data.storeIdStringrequired

Store ID

data.orderIdStringrequired

Recurring transaction order ID

data.statusStringrequired

Recurring order status

data.createdAtStringrequired

Recurring order created date time

data.updatedAtStringrequired

Recurring order updated date time


Tokenization: Tokenized Payment

Tokenized payment lets customers bind their card once, then you charge on your own schedule using your own recurring engine.

Create Tokenized Customer

Request Parameters

storeIdStringrequired

Revenue Monster Store ID

emailStringrequired

Customer email address

nameStringrequired

Customer name

countryCodeStringrequired

Customer country code

phoneNumberStringrequired

Customer phone number

productNameStringrequired

Tokenized product name

productDescriptionStringrequired

Tokenized product description

redirectUrlStringrequired

URL to redirect the customer to after card binding

Example Request
JSON
1{
2 "storeId": "1602660043994159611",
3 "email": "oska.ng@revenuemonster.my",
4 "name": "Oska Ng OpenAPI",
5 "countryCode": "60",
6 "phoneNumber": "187824152",
7 "redirectUrl": "https://google.com",
8 "productName": "Card Tokenized Binding",
9 "productDescription": "Some description for card tokenized"
10}

Response Parameters

item.idString

Recurring payment ID

item.merchantIdString

Merchant ID

item.storeIdString

Store ID

item.labelString

Customer card: front six and last four digits

item.emailString

Customer email

item.countryCodeString

Customer country code

item.phoneNumberString

Customer phone number

item.productNameString

Tokenized product name

item.productDescriptionString

Tokenized product description

item.isActiveBoolean

Whether the token is active. Becomes true after card is bound successfully.

item.createdAtString

Created date time

item.updatedAtString

Last updated date time

item.clientKeyString

Internal usage only

item.redirectUrlString

URL for customer to redirect after card binding

item.notifyUrlString

URL for payment notifications

item.paymentUrlString

URL for customer to bind their card

codeString

"SUCCESS" if the request succeeded, otherwise an error code.

error.codeString

Error code if the request failed.

error.messageString

Error message if the request failed.

error.debugString

Debug message (sandbox only).

Redirect Response

The redirect URL brings the customer back to your page after card binding.

Method: GET

statusStringrequired

Card bind status

customerIdStringrequired

Card bind customer ID

reasonString

Card bind failure reason


Tokenization Customer API

These APIs work for both Recurring Payment and Tokenized Payment customers.

These APIs are only available after a customer has bound their card at least once.

Get Customer Info

Request Parameters

customer_idStringrequired

Customer ID returned from Create Recurring Customer or Create Tokenized Customer

Response Parameters

item.idString

Recurring payment ID

item.merchantIdString

Merchant ID

item.storeIdString

Store ID

item.labelString

Customer card: front six and last four digits

item.emailString

Customer email

item.countryCodeString

Customer country code

item.phoneNumberString

Customer phone number

item.productNameString

Product name

item.productDescriptionString

Product description

item.isActiveBoolean

Whether the token is active

item.createdAtString

Created date time

item.updatedAtString

Last updated date time

item.clientKeyString

Internal usage only

item.redirectUrlString

Redirect URL

item.notifyUrlString

Notify URL

item.paymentUrlString

Card binding URL

item.recurringPayment.amountUint64

Recurring payment amount

item.recurringPayment.currencyString

Recurring payment currency

item.recurringPayment.recurringIntervalString

Recurring interval

item.recurringPayment.recurringTargetString

Recurring target rules

item.recurringPayment.recurringRepetitionUint64

Number of repetitions

codeString

"SUCCESS" if the request succeeded, otherwise an error code.

error.codeString

Error code if the request failed.

error.messageString

Error message if the request failed.

error.debugString

Debug message (sandbox only).

Get Customer Orders

Request Parameters

customer_idStringrequired

Customer ID returned from Create Recurring Customer or Create Tokenized Customer

Response Parameters

itemsArray

List of recurring order records

codeString

"SUCCESS" if the request succeeded, otherwise an error code.

error.codeString

Error code if the request failed.

error.messageString

Error message if the request failed.

error.debugString

Debug message (sandbox only).

Order record (items[*]):

idString

Recurring order ID

merchantIdString

Merchant ID

storeIdString

Store ID

recurringCustomerIdString

Customer ID

transactionIdString

Transaction ID

createdAtString

Order created date time

updatedAtString

Order last updated date time

amountUint64

Order payment amount

currencyString

Order currency

Toggle Customer Status

Request Parameters

customer_idStringrequired

Customer ID returned from Create Recurring Customer or Create Tokenized Customer

Response Parameters

item.idString

Recurring payment ID

item.merchantIdString

Merchant ID

item.storeIdString

Store ID

item.labelString

Customer card: front six and last four digits

item.emailString

Customer email

item.countryCodeString

Customer country code

item.phoneNumberString

Customer phone number

item.productNameString

Product name

item.productDescriptionString

Product description

item.isActiveBoolean

Whether the token is active

item.createdAtString

Created date time

item.updatedAtString

Last updated date time

item.clientKeyString

Internal usage only

item.redirectUrlString

Redirect URL

item.notifyUrlString

Notify URL

item.paymentUrlString

Card binding URL

item.recurringPayment.amountUint64

Recurring payment amount

item.recurringPayment.currencyString

Recurring payment currency

item.recurringPayment.recurringIntervalString

Recurring interval

item.recurringPayment.recurringTargetString

Recurring target rules

item.recurringPayment.recurringRepetitionUint64

Number of repetitions

codeString

"SUCCESS" if the request succeeded, otherwise an error code.

error.codeString

Error code if the request failed.

error.messageString

Error message if the request failed.

error.debugString

Debug message (sandbox only).

Create Customer Order (Payment)

This API uses the customer's bound card to make a payment — it is not a manual order creation. The charge is applied to the stored token.

Request Parameters

customer_idParamrequired

Customer ID returned from Create Recurring Customer or Create Tokenized Customer

currencyStringrequired

Payment currency

amountUint64required

Payment amount in smallest currency unit

titleString

Payment information title

descriptionString

Payment information description

Example Request
JSON
1{
2 "currency": "MYR",
3 "amount": 100,
4 "title": "Some order title",
5 "description": "Some order description"
6}

Response Parameters

itemObject

Transaction response object

codeString

"SUCCESS" if the payment succeeded, otherwise an error code.

error.codeString

Error code if the request failed.

error.messageString

Error message if the request failed.

error.debugString

Debug message (sandbox only).

{% endraw %}