Payment test page URL:

Payment Flow

Responsive image
  • Customer places order and wants to make payment via Alipay/WeChat pay.
  • eCommerce Website calls any PayMeMate APIs (getHostedPage OR directPay) for payment of a dollar amount via Alipay or WeChat.
  • PayMeMate identifies it as an Alipay or a WeChat payment request and calls ePayments.
  • ePayments calls Alipay or WeChat with a request for a QR code associated with the merchant “eCommerce” for the requested dollar amount.
  • Alipay or WeChat generate the QR Code/Page for that transaction (eCommerce & Amount) and pass it to ePayments.
  • ePayments displays the QR Code on a payment page.
  • Customer scans the QR Code with their Alipay or WeChat eWallet.
  • Customer enters the payment password to authorise payment in their eWallet.
  • Alipay or WeChat authorise payment and inform the Customer in their eWallet that payment has been successfully completed (or was unsuccessful).
  • Alipay or WeChat informs ePayments payment was successful (or was unsuccessful).
  • ePayments displays the payment was successful or unsuccessful on the ePayments payment page.
  • ePayments informs PayMeMate that payment was successful (or was unsuccessful)
  • PayMeMate informs eCommerce Website payment was successful (notification URL).
  • eCommerce Website calls getTransactionDetail API (https://paymemate.com/api/v1/getTransactionDetail) which returns details associated with the transaction. (As good practice, in the record with the order store trade_status, Amount, payment_channels and trade_no as it will be helpful if ever an issue is found)
  • eCommerce Website system looks for trade_status to be “TRADE_SUCCESS”(it means transaction was successful) and informs the customer the order is confirmed and successfully completed.

Abandoned payment or non receipt of notification.

eCommerce Website’s system waits for 310 seconds (minimum time a QR payment page is displayed is 5 minutes 300 seconds) and if in that time no response has been received via notification URL, eCommerce Website calls getTransactionDetail API, it looks for trade_status to be “TRADE_SUCCESS” if that is the case it follows the payment success steps. If it is not the case it follows the payment unsuccessful steps.

Responsive image

Steps to Initiate a Payment on PayMeMate Platform

1) Collect all your parameters and arrange them in an Alphabetical order with respect to keys.
Example
When usemyfee is set to False :
{
notificationURL=http: //192.168.0.67: 8080/testPost,
paymemateMerchantID=d0t1l2m3s4c5i6v7p8e9y10k11m12l1388,
directContainerId=XZ3FGHLIEBO9, scheme=Alipay1
randomstr=1549447607058,
redirectionURL=http: //192.168.0.67: 8080/testGet,,
totalamount=0.01,
uniqueReference=test2,
usemyfee=false
}

When usemyfee set to True:
{
amount=0.01,
fee=0.01,
usemyfee=true,
notificationURL=http: //192.168.0.67: 8080/testPost,
paymemateMerchantID=d0t1l2m3s4c5i6v7p8e9y10k11m12l1388,
directContainerId=XZ3FGHLIEBO9, scheme=Alipay1
randomstr=1549449030819,
redirectionURL=http: //192.168.0.67: 8080/testGet,
totalamount=0.02,
uniqueReference=test4,
usemyfee=true
}
2) After arranging them in alphabetical order make a parameter based URL like the example below :
When usemyfee = false :
directContainerId=XZ3FGHLIEBO9&notificationURL=http://192.168.0.67:8080/testPost&paymemateMerchantID=d0t1l2m3s4c5i6v7p8e9y10k11m12l1388&randomstr=1549447607058&redirectionURL=http://192.168.0.67:8080/testGet&scheme=Alipay1&totalamount=0.01&uniqueReference=test2&usemyfee=false

When usemyfee = true :
amount=0.01&directContainerId=XZ3FGHLIEBO9&fee=0.01&notificationURL=http://192.168.0.67:8080/testPost&paymemateMerchantID=d0t1l2m3s4c5i6v7p8e9y10k11m12l1388&randomstr=1549449030819&redirectionURL=http://192.168.0.67:8080/testGet&scheme=Alipay&totalamount=0.02&uniqueReference=test4&usemyfee=true
3) Append your API ID provided at the end of the parameter result example as above, which would then look like below :
When usemyfee = false :
directContainerId=XZ3FGHLIEBO9&notificationURL=http://192.168.0.67:8080/testPost&paymemateMerchantID=d0t1l2m3s4c5i6v7p8e9y10k11m12l1388&randomstr=1549447607058&redirectionURL=http://192.168.0.67:8080/testGet&scheme=Alipay1&totalamount=0.01&uniqueReference=test2&usemyfee=falseIMOQIXphUtehe0tE/R596ZTmzcGhPN6jnduYNSxCwjjIumurSWXusFEQ9VxutCpIYYYPWN+bfGquFUUo5Tl/e8rc2x+IhKl/GvZNgjkUqEU=

When usemyfee = true :
amount=0.01&directContainerId=XZ3FGHLIEBO9&fee=0.01&notificationURL=http://192.168.0.67:8080/testPost&paymemateMerchantID=d0t1l2m3s4c5i6v7p8e9y10k11m12l1388&randomstr=1549449030819&redirectionURL=http://192.168.0.67:8080/testGet&scheme=Alipay1&totalamount=0.02&uniqueReference=test4&usemyfee=trueIMOQIXphUtehe0tE/R596ZTmzcGhPN6jnduYNSxCwjjIumurSWXusFEQ9VxutCpIYYYPWN+bfGquFUUo5Tl/e8rc2x+IhKl/GvZNgjkUqEU=
4) Then Encrypt the above String using SHA-512 to get the HASH key as per the example below :
When usemyfee = false :
60f53754a6712a3b5f22a85fef282073dfb472f8556d0219a8cb8f6ffe29cc2a769678743cdc57e5bcac9533818ca5061e5b1d37c589faa1c111571f2e2421a9

When usemyfee = true :
a425e195c6b49c72c228d0f705cd094fce25e8777034f41e8f3c95611ec919dbfd076d2bf87dcc0583fcbb05684e1ce0584021111b86e93ba198707ea80ff2a
5) Add the above generated HASH Key in your collection of parameters before step 1 and it would look like the example below :
When usemyfee = false :
{
directContainerId=XZ3FGHLIEBO9,notificationURL=http: //192.168.0.67: 8080/testPost,
uniqueReference=test2,
randomstr=1549447607058,
scheme=Alipay1, totalamount=0.01,
paymemateMerchantID=d0t1l2m3s4c5i6v7p8e9y10k11m12l1388,
usemyfee=false,
redirectionURL=http: //192.168.0.67: 8080/testGet,
signature=60f53754a6712a3b5f22a85fef282073dfb472f8556d0219a8cb8f6ffe29cc2a769678743cdc57e5bcac9533818ca5061e5b1d37c589faa1c111571f2e2421a9
}

When usemyfee = true :
{
directContainerId=XZ3FGHLIEBO9, notificationURL=http: //192.168.0.67: 8080/testPost,
amount=0.01,
uniqueReference=test4,
randomstr=1549449030819,
totalamount=0.02,
paymemateMerchantID=d0t1l2m3s4c5i6v7p8e9y10k11m12l1388,
redirectionURL=http: //192.168.0.67: 8080/testGet,
scheme=Alipay1, fee=0.01,
fee=0.01,
redirectionURL=http: //192.168.0.67: 8080/testGet,
signature=signature=a425e195c6b49c72c228d0f705cd094fce25e8777034f41e8f3c95611ec919dbfd076d2bf87dcc0583fcbb05684e1ce0584021111b86e93ba198707ea80ff2a
}
6) Now, pass the above data to the API to process the transaction.

You would able to redirect to the desired payment gateway page for the payment.

At the PayMeMate Server, the Signature provided is validated before initiating the payment page.

NOTE: Do not add any keys with null or blank values while encrypting.
For example, If 'tokenid' value is blank or null. then that must not be included while encrypting.
7)Test Page : -

Hosted Payment Page

This API gives the ability to make payment via one of the Hosted Payment Page which is configured with many different gateway options available on PayMeMate by Merchants.
Example:- BASE URL/getHostedPage

Request Header:-

content-type : application/json

Requesting Parameters for /api/v1/getHostedPage API below:
Parameter Values (Example) Description Required Data Type
totalamount 0.02 The total Amount of transaction to be made will be formatted to upto two decimal places. Eg.10 OR 10.00 OR 10.01
Y Number (Will be rounded upto two places of decimal)
Example - 102.55
paymemateMerchantID
d0t1l2m3s4c5i6v7p8e9y10k11m12l1388
Unique Merchant ID assigned to the Merchant by PayMeMate Y Text
randomstr
1549449030819
Any random string Y Text
hostedPageId
BOK12DV3D5D2
Unique Hosted Page ID assigned to the Hosted Page by PayMeMate Y Text
uniqueReference test4 Unique Reference given by the Merchant for each transaction. Y Text
redirectionURL http: //192.168.0.67: 8080/testGet After the transaction is completed, user will be redirected to this URL. Y Text
notificationURL http: //192.168.0.67: 8080/testPost After the transaction is completed, the merchant will be notified the status of the transaction to this URL. Y Text
cancelURL http: //192.168.0.67: 8080/testPost Will be redirected to this if payment is cancelled. Y Text
tokenise 1 1 = To create Token from Merchant Application.
2= To create Token from Gateway.
3 = Use token created by Merchant application.
4 = Use token created by Gateway for the payment
Only one-digit number should be inserted.
N Text
tokenId
0000010000972745
1) If “tokenise” field = 1, 3 or 4 then “tokenid” field cannot be blank.
2) Use Merchant created token if tokenise field = 3.
3) Use Gateway token Eg: “0000010000972745” if tokenise field = 4.
N Text
custemail
xyz@gmail.com
Should be a Valid eMail Address. N Text
signature
a425e195c6b49c72c228d0f705cd094fce25e8777034f41e8f3c95611ec919dbfd076dbf87dcc0583fcbb05684e1ce0584021111b86e93ba198707ea80ff2a
It is the Signature which has to be generated at the merchant/client end. Using this signature validation will be done at the PayMeMate server. Y Text

Hosted Payment Page Link

This API gives the ability to generate direct link to Hosted Payment Page.
Example:- BASE URL/getHostedPageUrl

Request Header:-

content-type : application/json

Requesting Parameters for /api/v1/getHostedPageUrl API below:
Parameter Values (Example) Description Required Data Type
totalamount 0.02 The total Amount of transaction to be made will be formatted to upto two decimal places. Eg.10 OR 10.00 OR 10.01
Y Number (Will be rounded upto two places of decimal)
Example - 102.55
randomstr
1549449030819
Any random string Y Text
paymemateMerchantID
d0t1l2m3s4c5i6v7p8e9y10k11m12l1388
Unique Merchant ID assigned to the Merchant by PayMeMate Y Text
hostedPageUrlId
1dc3db1358f518338dddf61999889a30
Unique Hosted Page URL ID assigned to the Hosted Page Link Config by PayMeMate Y Text
uniqueReference test4 Unique Reference given by the Merchant for each transaction. Y Text
merchantEmails abc@gmail.com,abc2@gmail.com,acd@gmail.com.... Merchant will receive transaction receipt in mentioned emails. Y Text
invoiceNumber 9901381 Invoice number if any. N Text
shortCode a45ca Short code if any. N Text
descriptionOne Latice Hawaii Strategy Board Game Product description in few lines . N Text
descriptionOneUrl https://www.amazon.com/Latice-Hawaii-Strategy-Board-Multi-Award-Winning/ Product website link. N Text
descriptionTwo test4 More Product description in few lines . N Text
amountEditable on if value is set to "on", Customer will be provided with a editable amount field during payment process. N Text
emailCustomerReceipt on if value is set to "on", Customer will be provided with a field to enter email during payment process. N Text
signature
a425e195c6b49c72c228d0f705cd094fce25e8777034f41e8f3c95611ec919dbfd076dbf87dcc0583fcbb05684e1ce0584021111b86e93ba198707ea80ff2a
It is the Signature which has to be generated at the merchant/client end. Using this signature validation will be done at the PayMeMate server. Y Text

Transaction Details API

This API gives the current status of the transaction and any associated data it may have available at that point in time.
Example:- BASE URL/getTransactionDetail

In order to initiate and trigger this API, the Signature has to be generated first and then appended in the request before calling the /getTransactionDetail API.

Request Parameters:

Fields values(example) Description
uniqueReference test4 Unique Reference given by the Merchant for that transaction.
paymemateMerchantID
d0t1l2m3s4c5i6v7p8e9y10k11m12l1388
Merchant ID.
randomstr Any Random String Any Random String
signature
62b8410ca2ac0132081de....
It is the Signature which has to be generated at client end, using this signature, validation will be done at the PayMeMate Server.
Response :-
The Response will be same as the RESPONSE TABLE.
RESPONSE will be a JSON Object in String format.
Example:-

When usemyfee = false :
{
"amount": "0.01",
"merchantNotificationURL": "http://192.168.0.67:8080/testPost",
"paymemateGatewayName": "fusion-WECHAT",
"fee": "0.00",
"paymemateGatewayID": 14,
"createdOn": "2019-02-01 22:41:43.0",
"merchantUniqueReference": "merchant7",
"gatewayTransactionID": "4200000260201902015275392008",
"paymemateGatewayCompanyName": "ePayments",
"totalamount": "0.01",
"merchantRedirectionURL": "http://192.168.0.67:8080/testGet",
"paymemateMerchantID": "z0y1x2j3p4d5e6t7i8f9n10n11v12o1388",
"currency": "NZD",
"paymemateTransactionID": "Q4HYABRU8PIZ",
"status": "success"
}

When usemyfee = true :
{
"amount": "0.01",
"merchantNotificationURL": "http://192.168.0.67:8080/testPost",
"paymemateGatewayName": "fusion-WECHAT",
"fee": "0.01",
"paymemateGatewayID": 14,
"createdOn": "2019-02-06 23:36:38.0",
"merchantUniqueReference": "test4",
"gatewayTransactionID": "4200000260201902064786824382",
"paymemateGatewayCompanyName": "ePayments",
"totalamount": "0.02",
"merchantRedirectionURL": "http://192.168.0.67:8080/testGet",
"paymemateMerchantID": "d0t1l2m3s4c5i6v7p8e9y10k11m12l1388",
"currency": "NZD",
"paymemateTransactionID": "1YHV85KLM9SR",
"status": "success"
}

directPay - POST API

This API gives the ability to make payment via one of the many different gateway options available on PayMeMate.

Example:- BASE URL / directPay

Requesting Parameters for /directPay API below:
Parameter Values (Example) Description Required Data Type
totalamount 0.02 The total Amount of transaction to be made will be formatted to upto two decimal places. Eg.10 OR 10.00 OR 10.01
Y Number (Will be rounded upto two places of decimal)
Example - 102.55
usemyfee true/false When True - Merchant will pass: 1) totalamount 2) amount 3) fee (The fee calculation will be done by the Merchant before sending these parameters)
Note :- These fields should be added in your list of parameters while creating the Signature.
When False - Merchant will pass only the totalamount field.
Important: Do not use 1) amount, 2) fee fields while creating the Signature
Note:-When False, Fee will be calculated based on the settings done by the merchant in PayMeMate.
Y boolean
amount 0.01 The Actual amount charged (without the fee)
Note :- Do not include this parameter if usemyfee is set to False
Eg. in 2 decimal Fraction. Eg. 10.00 OR 10.01
Required when usemyfee is set to true Number (In Two Decimal Format) = Double Take this parameter as Double Data Type and send only upto two decimals.
Example - 10.06
isQrMode 1/0 If is set to 1 will show the payment QR. N String
fee 0.01 The Amount of convenience fee to be charged to the customer.
Note :- Do not include this parameter if usemyfee is set to False
Eg. in 2 decimal Fraction. Eg. 10.00 OR 10.01
Required when usemyfee is set to true Number (In Two Decimal Format)= Double Take this parameter as Double Data Type and send only upto two decimals.
Example - 2.55
directContainerId XZ3FGHLIEBO9 Direct container to be used. Containers can be found under your account in section named Manage-> Direct Connect Container in the paymemate portal. Y String
scheme Alipay1 Scheme to be used, with the passed direct container ID. Schemes can be found under your account in section named Manage-> Direct Connect Container -> Edit Container in the paymemate portal. Y String
paymemateMerchantID
d0t1l2m3s4c5i6v7p8e9y10k11m12l1388
Unique Merchant ID assigned to the Merchant by PayMeMate Y Text
randomstr
1549449030819
Any random string Y Text
signature
a425e195c6b49c72c228d0f705cd094fce25e8777034f41e8f3c95611ec919dbfd076dbf87dcc0583fcbb05684e1ce0584021111b86e93ba198707ea80ff2a
It is the Signature which has to be generated at the merchant/client end. Using this signature validation will be done at the PayMeMate server. Y Text
uniqueReference test4 Unique Reference given by the Merchant for each transaction. Y Text
redirectionURL http: //192.168.0.67: 8080/testGet After the transaction is completed, user will be redirected to this URL. Y Text
notificationURL http: //192.168.0.67: 8080/testPost After the transaction is completed, the merchant will be notified the status of the transaction to this URL. Y Text
tokenise 1 1 = To create Token from Merchant Application.
2= To create Token from Gateway (user not prompted).
3 = Use token created by Merchant application.
4 = Use token created by Gateway for the payment
5 = To create Token from Gateway (user prompted)
Only one-digit number should be inserted.
N Text
tokenId
0000010000972745
1) If “tokenise” field = 1, 3 or 4 then “tokenid” field cannot be blank.
2) Use Merchant created token if tokenise field = 3.
3) Use Gateway token Eg: “0000010000972745” if tokenise field = 4.
N Text
custemail
xyz@gmail.com
Should be a Valid eMail Address. N Text
info1
112243
Any Random String for Future Reference for Merchants N Text
info2
112243
Any Random String for Future Reference for Merchants N Text
info3
112243
Any Random String for Future Reference for Merchants N Text
info4
112243
Any Random String for Future Reference for Merchants N Text
info5
112243
Any Random String for Future Reference for Merchants N Text
auth_code
112243
This parameter required when make payment using MyPOsMate UnionPay, Alipay and wechat QR display N Text

Note: Tokenization is only available with Payment Express Gateway.

Redirection and Async Notification fields (Hosted Page)

Once the transaction is completed, PayMeMate will notify the merchant with the response described in the table below:-

Response fields
Fields values(example) Description
totalamount 0.02 (Amount + fee ) Total Amount of Transaction that has to be paid.
amount 0.01 The Actual amount charged (without the fee)
fee 0.01 The amount of convenience fee to be paid by the customer.
paymemateGatewayName fusion-WECHAT The Payment Gateway and type, that the transaction was paid through.
paymemateGatewayID 14 The PayMeMate Gateway ID associated with the Payment Gateway and type, that the transaction was paid through.
merchantUniqueReference test4 Unique reference assigned by Merchant to this transaction.
gatewayTransactionID
4200000260201902064786824382
This ID maps the Transaction ID between PayMeMate and the Payment Gateway. (The Id assigned by Payment Gateway to this transaction)
paymemateGatewayCompanyName
ePayments Name of Payment Gateway company.
paymemateMerchantID
d0t1l2m3s4c5i6v7p8e9y10k11m12l1388
Unique Merchant Id through which this transaction was carried out.
currency NZD Currency the payment was done in. Note: Currency is set in the Admin panel for the merchant.
paymemateTransactionID 1YHV85KLM9SR This is an unique ID given by PayMeMate, once the transaction request is received.
signature de372160377ed6c98a0... It is the Signature which has to be generated at the merchant/client end. Using this signature validation will be done.
createdOn 2020-05-13T13:55:51.000 0530 yyyy-MM-dd'T'HH:mm:ss.SSSZ
status success Status of the transaction can be the following:
1) success - For successful transaction
2) failed - When the transaction failed
3) false - In case of any Error that occurs.
4)Trade_Not_Pay - In case of any unexpected event, like the user closes the browser or internet connection snapped before the transaction was completed.
Note:- Please refer to the Error table below when status is false.
Sample response (below) is sent to the Merchant on the Redirection / Notification URL:-

Example

When usemyfee = false :
{
"amount": "0.01",
"paymemateGatewayName": "fusion-WECHAT",
"fee": "0.00",
"paymemateGatewayID": 14,
"createdOn": "2020-05-13T13:55:51.000 0530",
"merchantUniqueReference": "test2",
"gatewayTransactionID": "4200000270201902060035529102",
"signature": "de372160377ed6c98a0...",
"paymemateGatewayCompanyName": "ePayments",
"totalamount": "0.01" ,
"paymemateMerchantID": "d0t1l2m3s4c5i6v7p8e9y10k11m12l1388",
"currency": "NZD",
"paymemateTransactionID": "DTFYR04WM5SO",
"status": "success"
}

When usemyfee = false :
{
"amount": "0.01" ,
"paymemateGatewayName": "fusion-WECHAT",
"fee": "0.01",
"paymemateGatewayID": 14,
"createdOn": "2020-05-13T13:55:51.000 0530",
"merchantUniqueReference": "test4",
"gatewayTransactionID": "4200000260201902064786824382",
"signature": "de372160377ed6c98a0...",
"paymemateGatewayCompanyName": "ePayments",
"totalamount": "0.02" ,
"paymemateMerchantID": "d0t1l2m3s4c5i6v7p8e9y10k11m12l1388",
"currency": "NZD",
"paymemateTransactionID": "1YHV85KLM9SR",
"status": "success"
}

Payment Gateway Table

Payment Gateways available via PayMeMate:

Payment Gateway ID Payment Gateway Provider Payment Gateway Name
1001 Dynamic Payment Gateway (For Demo/Sandbox Account) UnionPay
1002 PayPal Payment Gateway (For Demo/Sandbox Account) PayPal
1 Dynamic Payment Gateway UnionPay
3 Payment Express Payment Express
4 Poli Poli
5 Alipay Alipay
6 eWay eWay
8 Paypal Paypal
9 ePayments Wechat
10 ePayments Alipay
11 ePayments JDPay
12 ePayments BestPay
13 ePayments Aggregate QR (For WeChat And Alipay)
14 ePayments Fusion Page WECHAT
15 ePayments Fusion Page ALIPAY
16 ePayments Fusion Page JDPAY
17 ePayments Fusion Page BESTPAY
18 AttractPay WECHAT
19 AttractPay ALIPAY
20 PayPlus WECHAT
21 PayPlus ALIPAY
22 AttractPay Fusion WECHAT
23 AttractPay Fusion ALIPAY
24 Stripe Stripe
25 Paymark Paymark
26 Paymark Online EFTPOS Paymark EFTPOS
27 Centra Pay Centra Pay
29 Binance e-Payments Binance
31 UnionPay Attractpay UnionPay Direct Attractpay
34 MyPosMate UnionPay QR Scanning
35 MyPosMate UnionPay QR Display
36 MyPosMate Alipay QR Scanning
37 MyPosMate Alipay QR Display
38 MyPosMate WeChat QR Scanning
39 MyPosMate WeChat QR Display
41 NOVATTI Novatti
42 World Play WORLD PLAY

Hosted Payment Page Direct Link Integration

Steps to initialize hosted payment page direct link request:

  1. Collect all your parameters and generate signature
  2. To create a signature arrange them in an Alphabetical order with respect to keys.
    Example:
    {
        "totalamount":1.3,
        "randomstr":"546584",
        "paymemateMerchantID":"n0o1g2o3d4k5l6y7r8m9t10h11e12f1388",
        "hostedPageUrlId":"1dc3db1358f518338dddf61999889a30",
        "uniqueReference":"548147865445",
        "merchantEmails":"abc@gmail.com",
        "hostedPageId":"V0DB3",
        "apiId":"R50rvx6jvmPo7JQJQV/8gIEULI2l8Hi23rinBDspJXG2FMNuTCPCgBFdQoTvJ4SqLZ90CJoPKKlsRQrk18u9VabwJ6C8E4A49q9FSryTm/D6YxkMXzXZU7fHWkpdYHTUImCzbiHT1a48fgejIoMrzQ==",
        "paymentGatewayId":"0",
        "editedAmount":"0.0",
        "fee":"0.0",
        "generateUrl":"false",
        "grossamount":"0.0",
        "usemyfee":"false",
        "amount":"0.0"
    }

    Note: The apiId is a merchant API ID, which should be encrypted. To encrypt it, first encrypt it with a cipher, then again encrypt it with base64.

  3. After arranging them in alphabetical order make a parameter based URL like the example below :
  4. Append your API ID provided at the end of the parameter result example as above, which would then look like below :
  5. Then Encrypt the above String using SHA-512 to get the HASH key as per the example below

    e92d1af8f55f8f1f8881dc566c39efa83ff7208ba9667cd50b47d3d301583627129fc65d14afc9caef09db13b0108ddad901eb6e726fdd6637e84668f52a347e

  6. Add the above generated HASH Key in your collection of parameters before step 1 and it would look like the example below :
    {
        "totalamount":1.3,
        "randomstr":"5784256iui",
        "paymemateMerchantID":"n0o1g2o3d4k5l6y7r8m9t10h11e12f1388",
        "hostedPageUrlId":"86566064afec1e543c2848832f607756",
        "uniqueReference":"548147865445",
        "merchantEmails":"abc@gmail.com",
        "hostedPageId":"V0DB3",
        "apiId":"R50rvx6jvmPo7JQJQV/8gIEULI2l8Hi23rinBDspJXG2FMNuTCPCgBFdQoTvJ4SqLZ90CJoPKKlsRQrk18u9VabwJ6C8E4A49q9FSryTm/D6YxkMXzXZU7fHWkpdYHTUImCzbiHT1a48fgejIoMrzQ==",
        "paymentGatewayId":"0",
        "editedAmount":"0.0",
        "fee":"0.0",
        "generateUrl":"false",
        "grossamount":"0.0",
        "usemyfee":"false",
        "amount":"0.0",
        "signature":"e92d1af8f55f8f1f8881dc566c39efa83ff7208ba9667cd50b47d3d301583627129fc65d14afc9caef09db13b0108ddad901eb6e726fdd6637e84668f52a347e" }
  7. Now pass the above data to generate the link.

Sample Request Parameter:

https://www.paymemate.com/api/v1/getHostedPageUrl?totalamount=1.3&randomstr=5784256iui&paymemateMerchantID=n0o1g2o3d4k5l6y7r8m9t10h11e12f1388&hostedPageUrlId=86566064afec1e543c2848832f607756&uniqueReference=548147865445&merchantEmails=ritesh.paymemate@gmail.com&paymentGatewayId=0&editedAmount=0.0&fee=0.0&generateUrl=false&grossamount=0.0&hostedPageId=V0DB3&usemyfee=false&amount=0.0&apiId=R50rvx6jvmPo7JQJQV/8gIEULI2l8Hi23rinBDspJXG2FMNuTCPCgBFdQoTvJ4SqLZ90CJoPKKlsRQrk18u9VabwJ6C8E4A49q9FSryTm/D6YxkMXzXZU7fHWkpdYHTUImCzbiHT1a48fgejIoMrzQ==&signature=e92d1af8f55f8f1f8881dc566c39efa83ff7208ba9667cd50b47d3d301583627129fc65d14afc9caef09db13b0108ddad901eb6e726fdd6637e84668f52a347e

Sample response (below ) is sent on request succeed.

{
    "success": true,
    "message": "Request is successful",
    "short_url": https://www.paymemate.com/api/v1/hostpage/5b801726846157348b984af70
}

Note: This can be done using Hosted Payment Page Link

ERROR

If any error occurs after calling the /directPay Or /getTransactionDetail API then the system would show the status as false along with the appropriate error message in the response.The status of the transaction with the error details will also be sent to the given notification URL along with the unique reference set by the Merchant for that transaction.

The response will be in JSON to the given Notification URL in the following format:-

{“uniqueReference”:“”,“status”: “”,“msg”:“”}

Example - {“uniqueReference” : “test4”, “status” : “false”, “msg” : “Merchant not found with the given ID.”}

We have described the triggering event and the messages in a table below:

Triggering Event status Message
When the given parameters do not match with respect to:
1) Datatype: Example - If some Alphabets are passed in totalamount field.
2) Logical calculations: Example - If the total of given amount + fee does not match with totalamount
false Validation Failed! Kindly refer the API document provided and check your requested Parameters.
When the client Signature does not match the PayMeMate created Signature. false Signature Verification Failed! Kindly refer to the API document provided and check your requested Parameters.
When the given Merchant ID is not found in PayMeMate. false Merchant not found with the given ID.
When the Merchant Account has been disabled. false Merchant Disabled. Contact PayMeMate Admin.
When the used Payment Gateway has been disabled. false This Payment Gateway has been disabled by the Merchant.
When the Payment Gateway being used has not been configured correctly by the Merchant. false This Payment Gateway has not been configured by the Merchant.
When system error occurs at PayMeMate server. false Something went Wrong! System exception.(Critical Error)
When the Token Id is left blank while creating a Merchant specific token. false TokenId cannot be blank!
When the Tokenise field is not Numeric. false Tokenise Field should be a Numeric Value!
When the given notificationURL or redirectionURL is not in a standard format. false MalFormedURL Exception
Signals that an I/O exception of some sort has occurred. This class is the general class of exceptions produced by failed or interrupted I/O operations. false IOException Exception
When the given Merchant Unique Reference is not unique.
Note - Merchant has to send a new/unique “Merchant Unique Reference” every time.
false Please check the Unique Reference, record already exists.

If any of the Limitations set by the merchants are violated, then the below listed limitation related error occurs:

Triggering Event status Message
When the maximum number of daily transaction limit for the specified Payment Gateway is reached. false Max No of Daily Transaction Limit reached for the Merchant.
When the transaction amount exceeds the allowed transaction limit set for the Payment Gateway. false Transaction exceeds the Max Transaction Size Limit set.
When the daily credit limit set for the Payment Gateway is reached. false Daily Credit Limit reached for the Merchant.
When the Monthly credit limit set for the Payment Gateway is reached. false Monthly Credit Limit reached for the Merchant.
When the Payment Gateway being used is disabled. false Admin has disabled Payment Gateway Name for this Merchant.

Libraries

Java

"PayMeMateUtils" is a Java library using which developers can easily create alphabetically ordered parameter String and can then pass it to generate the Signature to be used for PayMeMate platform.

We have mentioned the steps with Java sample code below:-

  1. Include 'PayMeMateUtils.jar' in your Project Environment.
  2. Use collection HashMap to collect all your parameters first.
  3. Then pass your non-alphabetically ordered HashMap object to 'ArrangeAlphabetically' Class object for using in 'arrangeAlphabetically' method.
  4. This takes two parameters:
    • i. Non-alphabetically ordered HashMap(paramMap) object and
    • ii. Your Merchant API ID(sign_key).

    In return you will get a parameterized String which is mentioned in the step 3 of PayMeMate API document. 'Steps to Initiate a Payment on PayMeMate' This parameterized String should be given to static method of GenerateSignature Class which will give you SHA512 Signature.

Code below:-

String signature = GenerateSignature.encryptThisString(new ArrangeAlphabetically().arrangeAlphabetically(paramMap, sign_key));

You can then send the Signature to /directPay API along with other required parameters. Alternatively, if you want to arrange the parameters alphabetically by your own, then you can do that as well. Then, you just need to use our Library to create the Signature.

Below is the code to create only the Signature

Send the Parameterized String to :-

String signature = GenerateSignature.encryptThisString( alphabeticallyOrderedParametrizedString);


You can DOWNLOAD java library :-

PayMeMateUtils.jar
PHP

Steps To Initiate a Payment:-

  1. Create alphabetically parameterized String data like below:- notificationURL='.$_POST['notificationURL'].'&paymemateMerchantID='.$_POST['paymemateMerchantID'].' &paymentGatewayId='.$_POST['paymentGatewayId'].'&randomstr='.$_POST['randomstr'].'&redirectionURL ='.$_POST['redirectionURL'].'&totalamount='.$_POST['totalamount'].'&uniqueReference='.$_POST['uniqueR eference'].'&usemyfee=falseIMOQIXphUtehe0tE/R596ZTmzcGhPN6jnduYNSxCwjjIumurSWXusFEQ9VxutC pIYYYPWN+bfGquFUUo5Tl/e8rc2x+IhKl/GvZNgjkUqEU=
  2. Make a signature of the above String Data using SHA 512 by using the code below:-

    hash('sha512','your parameterized string data');


Below is a code example of a sample form with data:-

The form is prefilled with the POST request data.

<h1>Readonly Form With Submitted Data ( Signature Generated )</h1><br> <form action="http://paymemateserver-env-1.isvbaiv2nt.us-east-1.elasticbeanstalk.com/directPay" method="post"> notificationURL<br> <input name="notificationURL" type="text" value="<?php echo $_POST['notificationURL']; ?>" readonly><br><br> paymentGatewayId<br> <input name="paymentGatewayId" type="text" value="<?php echo $_POST['paymentGatewayId']; ?>" readonly/><br><br> uniqueReference<br> <input name="uniqueReference" type="text" value="<?php echo $_POST['uniqueReference']; ?>" readonly/><br><br> randomstr<br> <input name="randomstr" type="text" value="<?php echo $_POST['randomstr']; ?>" readonly/><br><br> totalamount<br> <input name="totalamount" type="text" value="<?php echo $_POST['totalamount']; ?>" readonly/><br><br> paymemateMerchantID<br> <input name="paymemateMerchantID" type="text" value="<?php echo $_POST['paymemateMerchantID']; ?>" readonly/><br><br> usemyfee<br> <input name="usemyfee" type="text" value="false"/><br><br> redirectionURL<br> <input name="redirectionURL" type="text" value="<?php echo $_POST['redirectionURL']; ?>"/><br><br> signature<br> <input name="signature" type="text" value="<?php echo $hashed; ?>" readonly/> <br><input type="submit" value="Confirm and go to gateway"/> </form>

Description of the Code:-

Take data from the form and arrange them alphabetically and then create a String of the Parameters.

Below is the method to hash the parameterized String data to SHA512 encrypted signature. POST request data is pre filled in the form. Method used to hash is:- hash('sha512','your string');

$hashed=hash("sha512",'notificationURL='.$_POST['notificationURL'].'&paymemateMerchantID='.$_POST['paymem ateMerchantID'].'&paymentGatewayId='.$_POST['paymentGatewayId'].'&randomstr='.$_POST['randomstr'].'&redirecti onURL='.$_POST['redirectionURL'].'&totalamount='.$_POST['totalamount'].'&uniqueReference='.$_POST['uniqueRef erence'].'&usemyfee=falseIMOQIXphUtehe0tE/R596ZTmzcGhPN6jnduYNSxCwjjIumurSWXusFEQ9VxutCpIYYYPW N+bfGquFUUo5Tl/e8rc2x+IhKl/GvZNgjkUqEU=');

Once the hashing is done, it is stored in $hashed variable. You can use this hashed data in the Signature field in the sample form.

PHP

The PayMeMate Android SDK lets you seamlessly integrate Paymemate configured Payment Gateways with your Android app and start collecting payments from your customers.

The PayMeMate-SDK is a set of development tools used to develop application for Android platform.

The steps to configure this SDK are very easy and straight forward which allows developer to focus on the business logic developement instead of spending hours in integrating gateways.

Refer below documentation for integrating SDK in android application.

SDK module contains following

  • Ready to test Sample apk file - paymemate_v1.0.apk
  • Sample Code to integrate PayMeMate configured payment gateways
  • Documentation which contains steps by step approach to integrate SDK in existing code
  • An AAR file which contains a libraries used for integrating SDK.

You can download android SDK and related documents from following links

PayMeMate-SDK.pdf
PayMeMate_Code.zip
paymemate.aar
paymemate_v1.0.apk