Skip to main content

Tokenization Payment

Tokenization involves the substitution of sensitive data with non-sensitive data. Within the payments sector, it is employed to protect a card's Primary Account Number (PAN) by substituting it with a distinctive sequence of numbers. Payment tokens are issued in real-time used at online payment scenario only example recurring, subscription and mobility or even micromobility transactions.

Tokenization: Recurring Payment

Recurring payment is for your customer to bind their card and our system able to take the fund from customer card and receive payment based on the recurring rules been defined and pass to recurring engine.

Create Recurring Customer

Method : POST
URL : https://open.revenuemonster.my/v3/recurring-payment
Sandbox URL : https://sb-open.revenuemonster.my/v3/recurring-payment

Request Parameters

ParameterTypeValidationRequiredDescription
storeIdStringYesStore ID
emailStringYesCustomer email
nameStringYesCustomer name
countryCodeStringYesCustomer country code
phoneNumberStringYesCustomer phone number
productNameStringYesRecurring product name
productDescriptionStringYesRecurring product description
currencyStringENUM("MYR")YesRecurring payment currency
amountUint64YesRecurring payment amount
redirectUrlStringYesRedirect URL after customer bind card
notifyUrlStringYesNotify URL when payment has made
recurringIntervalStringENUM("MONTHLY", "WEEKLY", "DAILY")Yes
recurringTargetStringYesRecurring target rules can be different values based on interval
recurringRepetitionUint64YesRecurring repetition rules, how many times charge the customer card
Recurring Target Rules:
IntervalTargetPayment Behaviour
WEEKLY0Every week of Sunday
WEEKLY1Every week of Monday
WEEKLY2Every week of Tuesday
WEEKLY3Every week of Wednesday
WEEKLY4Every week of Thursday
WEEKLY5Every week of Friday
WEEKLY6Every week of Saturday
MONTHLY-1End of every month e.g. 2022/10/31
MONTHLY0Start of every month, e.g. 2022/10/01
MONTHLY1 - 28Day of month
Example Request
{
"storeId": "1602660043994159611",
"email": "oska.ng@revenuemonster.my",
"name":" Oska Ng OpenAPI",
"countryCode": "60",
"phoneNumber": "187824152",
"currency":"MYR",
"amount": 120,
"redirectUrl": "https://google.com",
"notifyUrl": "https://google.com",
"productName": "Some Product Name",
"productDescription": "Some Product productDescription",
"recurringInterval": "WEEKLY",
"recurringTarget": "1",
"recurringRepetition": 10
}

Response Parameters

ParameterTypeValidationDescription
item.idStringRecurring payment id
item.merchantIdStringMerchant ID
item.storeIdStringStore ID
item.labelStringCustomer card front six last four digits
item.emailStringCustomer email
item.countryCodeStringCustomer country code
item.phoneNumberStringCustomer phone number
item.productNameStringRecurring product name
item.productDescriptionStringRecurring product description
item.isActiveStringRecurring payment is active, when card bind successfully will automatically become active
item.createdAtStringRFC3339Recurring created date time
item.updatedAtStringRFC3339Recurring last updated date time
item.clientKeyStringInternal usage only
item.redirectUrlStringURL for customer to redirect after card bind
item.notifyUrlStringURL for notify when transaction made
item.paymentUrlStringURL for customer bind their card
item.recurringPayment.amountUint64Recurring payment amount
item.recurringPayment.currencyUint64ENUM("MYR")Recurring payment currency
item.recurringPayment.recurringIntervalUint64ENUM("MONTHLY", "WEEKLY", "DAILY")Recurring payment interval
item.recurringPayment.recurringTargetUint64Recurring target rules can be different values based on interval
item.recurringPayment.recurringRepetitionUint64Recurring repetition rules, how many times charge the customer card
codeStringENUM("SUCCESS")Determine request have success
error.codeStringError code
error.messageStringError message
error.debugStringDebug message ( sandbox only )

Redirect Response

info

Redirect URL to redirect your customer back to your page after card bind, it's can be any of the URL ( deeplink, browser url, server url ) as long as the browser itself can go and process.

Method : GET

ParameterTypeValidationRequiredDescription
statusStringEnum("SUCCESS", "FAILED", "CANCELLED")YesCard bind status
customerIdStringYesCard bind customer id
reasonStringNoCard bind fail reason

Notify Response

info

Notify URL or Callback URL to inform server on transaction status after payment made.

Notify will call only when the transaction is success, fail and refund will not fired a notify to your server. We suggest you to do a query transaction to get full transaction info if you need full info, for notify will only response the partial transaction info.

Reference: Query Transaction

Method : GET

ParameterTypeValidationRequiredDescription
eventTypeStringEnum("RECURRING_PAYMENT")YesNotify event type
data.amountUint64YesRecurring payment amount
data.currencyStringENUM("MYR")YesRecurring order currency
data.countryCodeStringYesRecurring customer country code
data.phoneNumberStringYesRecurring customer phone number
data.customerIdStringYesRecurring customer id
data.emailStringYesRecurring customer email
data.nameStringYesRecurring customer name
data.merchantIdStringYesMerchant id
data.storeIdStringYesStore id
data.orderIdStringYesRecurring transaction order id
data.statusStringENUM("SUCCESS")Yes
data.createdAtStringRFC3339YesRecurring order created date time
data.updatedAtStringRFC3339YesRecurring order updated date time

Tokenization: Tokenized Payment

Tokenized payment is for your to let your customer bind their card and you can take the fund from customer and receive payment based on your own requirements. If you have own recurring engine to process payment you can using this API instead of our recurring payment example like WooCommerce Subscription Plugin.

Create Tokenized Customer

Method : POST
URL : https://open.revenuemonster.my/v3/tokenized-payment
Sandbox URL : https://sb-open.revenuemonster.my/v3/tokenized-payment

Request Parameters

ParameterTypeValidationRequiredDescription
storeIdStringYesStore ID
emailStringYesCustomer email
nameStringYesCustomer name
countryCodeStringYesCustomer country code
phoneNumberStringYesCustomer phone number
productNameStringYesTokenized product name
productDescriptionStringYesTokenized product description
redirectUrlStringYesRedirect URL after customer bind card
Example Request
{
"storeId": "1602660043994159611",
"email": "oska.ng@revenuemonster.my",
"name":" Oska Ng OpenAPI",
"countryCode": "60",
"phoneNumber": "187824152",
"redirectUrl": "https://google.com",
"productName": "card tokenized binding",
"productDescription": "some description for card tokenized"
}

Response Parameters

ParameterTypeValidationDescription
item.idStringRecurring payment id
item.merchantIdStringMerchant ID
item.storeIdStringStore ID
item.labelStringCustomer card front six last four digits
item.emailStringCustomer email
item.countryCodeStringCustomer country code
item.phoneNumberStringCustomer phone number
item.productNameStringRecurring product name
item.productDescriptionStringRecurring product description
item.isActiveStringRecurring payment is active, when card bind successfully will automatically become active
item.createdAtStringRFC3339Recurring created date time
item.updatedAtStringRFC3339Recurring last updated date time
item.clientKeyStringInternal usage only
item.redirectUrlStringURL for customer to redirect after card bind
notifyUrlStringNotify URL when payment has made
item.paymentUrlStringURL for customer bind their card
codeStringENUM("SUCCESS")Determine request have success
error.codeStringError code
error.messageStringError message
error.debugStringDebug message ( sandbox only )

Redirect Response

info

Redirect URL to redirect your customer back to your page after card bind, it's can be any of the URL ( deeplink, browser url, server url ) as long as the browser itself can go and process.

Method : GET

ParameterTypeValidationRequiredDescription
statusStringEnum("SUCCESS", "FAILED", "CANCELLED")YesCard bind status
customerIdStringYesCard bind customer id
reasonStringNoCard bind fail reason

Tokenization Customer API

This section's api is available for both recurirng payment and tokenized payment's customer mainly just for partner to able utilize the tokenize payment features and also the customer informations.

note

These API will be available only when the customer been binded once else you will not able to use this API to request the customer information.

Get Customer Info

Method : GET
URL :https://open.revenuemonster.my/v3/customer/{customer_id}
Sandbox URL :https://sb-open.revenuemonster.my/v3/customer/{customer_id}

Request Parameters

ParameterTypeValidationRequiredDescription
customer_idParamYesCustomer ID return from the creation of recurring payment / tokenize payment

Response Parameters

ParameterTypeValidationDescription
item.idStringRecurring payment id
item.merchantIdStringMerchant ID
item.storeIdStringStore ID
item.labelStringCustomer card front six last four digits
item.emailStringCustomer email
item.countryCodeStringCustomer country code
item.phoneNumberStringCustomer phone number
item.productNameStringRecurring product name
item.productDescriptionStringRecurring product description
item.isActiveStringRecurring payment is active, when card bind successfully will automatically become active
item.createdAtStringRFC3339Recurring created date time
item.updatedAtStringRFC3339Recurring last updated date time
item.clientKeyStringInternal usage only
item.redirectUrlStringURL for customer to redirect after card bind
item.notifyUrlStringURL for notify when transaction made
item.paymentUrlStringURL for customer bind their card
item.recurringPayment.amountUint64Recurring payment amount
item.recurringPayment.currencyUint64ENUM("MYR")Recurring payment currency
item.recurringPayment.recurringIntervalUint64ENUM("MONTHLY", "WEEKLY", "DAILY")Recurring payment interval
item.recurringPayment.recurringTargetUint64Recurring target rules can be different values based on interval
item.recurringPayment.recurringRepetitionUint64Recurring repetition rules, how many times charge the customer card
codeStringENUM("SUCCESS")Determine request have success
error.codeStringError code
error.messageStringError message
error.debugStringDebug message ( sandbox only )

Get Customer Orders

Method : GET
URL :https://open.revenuemonster.my/v3/customer/{customer_id}/orders
Sandbox URL :https://sb-open.revenuemonster.my/v3/customer/{customer_id}/orders

Request Parameters

ParameterTypeValidationRequiredDescription
customer_idParamYesCustomer ID return from the creation of recurring payment / tokenize payment

Response Parameters

ParameterTypeValidationDescription
item.*.idStringRecurring order id
item.merchantIdStringMerchant ID
item.storeIdStringStore ID
item.*.recurringCustomerIdStringCustomer ID
item.*.transactionIdStringTransaction ID
item.*.createdAtStringRFC3339Recurring order created date time
item.*.updatedAtStringRFC3339Recurring order last updated date time
item.*.amountUint64Recurring order payment amount
item.*.currencyStringENUM("MYR")Recurring order currency
codeStringENUM("SUCCESS")Determine request have success
error.codeStringError code
error.messageStringError message
error.debugStringDebug message ( sandbox only )

Toggle Customer Status

Method : PUT
URL :https://open.revenuemonster.my/v3/customer/{customer_id}/status
Sandbox URL :https://sb-open.revenuemonster.my/v3/customer/{customer_id}/status

Request Parameters

ParameterTypeValidationRequiredDescription
customer_idParamYesCustomer ID return from the creation of recurring payment / tokenize payment

Response Parameters

ParameterTypeValidationDescription
item.idStringRecurring payment id
item.merchantIdStringMerchant ID
item.storeIdStringStore ID
item.labelStringCustomer card front six last four digits
item.emailStringCustomer email
item.countryCodeStringCustomer country code
item.phoneNumberStringCustomer phone number
item.productNameStringRecurring product name
item.productDescriptionStringRecurring product description
item.isActiveStringRecurring payment is active, when card bind successfully will automatically become active
item.createdAtStringRFC3339Recurring created date time
item.updatedAtStringRFC3339Recurring last updated date time
item.clientKeyStringInternal usage only
item.redirectUrlStringURL for customer to redirect after card bind
item.notifyUrlStringURL for notify when transaction made
item.paymentUrlStringURL for customer bind their card
item.recurringPayment.amountUint64Recurring payment amount
item.recurringPayment.currencyUint64ENUM("MYR")Recurring payment currency
item.recurringPayment.recurringIntervalUint64ENUM("MONTHLY", "WEEKLY", "DAILY")Recurring payment interval
item.recurringPayment.recurringTargetUint64Recurring target rules can be different values based on interval
item.recurringPayment.recurringRepetitionUint64Recurring repetition rules, how many times charge the customer card
codeStringENUM("SUCCESS")Determine request have success
error.codeStringError code
error.messageStringError message
error.debugStringDebug message ( sandbox only )

Create Customer Order ( Payment )

Method : POST
URL :https://open.revenuemonster.my/v3/customer/{customer_id}/order
Sandbox URL :https://sb-open.revenuemonster.my/v3/customer/{customer_id}/order

caution

This API will use the customer binded card to make a payment, it's not a manual order creation.

Request Parameters

ParameterTypeValidationRequiredDescription
customer_idParamYesCustomer ID return from the creation of recurring payment / tokenize payment
currencyStringENUM("MYR")YesPayment currency
amountUint64YesPayment amount
titleStringNoPayment information title
descriptionStringNoPayment information description
Example Request
{
"currency": "MYR",
"amount": 100,
"title": "Some order title",
"description": "Some order description"
}

Response Parameters

ParameterTypeValidationDescription
itemJSONTransaction ObjectTransaction response
codeStringENUM("SUCCESS")Determine request have success
error.codeStringError code
error.messageStringError message
error.debugStringDebug message ( sandbox only )