Payment

Request URL(Sandbox)

  • /trade/repay

Request method

  • POST

Parameters

Parameter
Necessary
Type
Description

mch_order_no

Y

string

Merchant order number, should be unique

amount

Y

int

Only support integer, the min amount of VA is 10.000, the min amount of payment code is 2.500.000

bank_code

Y

string

Bank code

user_name

N

string

Customer's name

user_mobile

N

string

Customer's mobile

mch_id

Y

int

merchant id in Monetapay

appid

Y

int

App id in Monetapay

expire_seconds

N

int

Valid time in seconds

static_use

N

int

1: Static VA

0: Dynamic VA

return_url

N

string

Redirect URL after the customer finish paying

Request example

{
    "mch_order_no":"843956641283012",
    "amount":1085000,
    "bank_code":"BNI",
    "user_name":"test",
    "user_mobile":"6282121000613",
    "mch_id":10001,
    "appid":10001002
}

Response example

{
    "code":"0",
    "message":"success",
    "data":{
        "comeback_number":"8856046201003417",
        "order_no":"2019090410005058",
        "mch_order_no":"843956641283012",
        "expiration_date":"2019-09-04 23:20:20",
        "status":0,
        "static_use":false,
        "qrcode": "https://api.sandbox.veritrans.co.id/v2/gopay/ebae2c07-b262-4173-b0bb-505a2619c568/qr-code", // Gopay 支付才会响应此参数
        "deep_link": "https://simulator.sandbox.midtrans.com/gopay/ui/checkout?referenceid=nk5OtiRgE3&callback_url=https%3A%2F%2Freplybeta.dokypay.com%2Fpaytm%2Fcallback%2F200327181914218010479755%3Forder_id%3D200327181914218010479755" // 电子钱包支付才会响应此参数
    } 
}

Response parameters

Parameter
Can it be empty
Type
Description

code

N

string

“0”means success

message

Y

string

Description

data[].comeback_number

Y

string

VA or payement code

data[].order_no

N

string

MonetaPay unique order number

data[].mch_order_no

N

string

Merchant order number

data[].expiration_date

Y

string

Expired time,

format:

YYYY-MM-DD HH:ii:ss

data[].status

Y

int

0-pending,

1-success,

2-fail

data[].static_use

Y

bool

false - dynamic VA

true - static VA

data[].deep_link

Y

string

Deeplink of ewallet

data[].qrcode

Y

string

Redirect url

MonetaPay callback

  • Merchant needs to provide callback address Call back with the actual result, all returned in json format.

  • MonetaPay will sign according to the key of the current merchant, and the data is transmitted in an encrypted way. After the merchant obtains the data, it decrypts the data and then checks the signature.

  • When it is a static repayment code, the callback order_no is the transaction number of the current repayment, which is used to uniquely specify a repayment transaction. mch_order_no is the order number submitted by the merchant when the repayment code is generated. amount is the amount of this repayment

Request Parameters

Parameter
Necessary
Type
Description

order_no

string

MonetaPay unique order number

mch_order_no

string

merchant order number

status

int

0-pending,

1-success,

2-fail

comeback_number

string

VA or payment code

amount

int

Amount of fund

pay_time

string

Transaction time,

format:

YYYY-MM-DD HH:ii:ss

Request example

POST /Postback_url HTTP/1.1 Host: www.examble.com Content-Type: application/json Cache-Control: no-cache

{“data”:{“en_data”:”xxxxxxxxxxxxxx”}}

en_data is the result of encrypting the parameter data. For the encryption algorithm, please refer to the encryption description.

Response example

 {
  "code": 0,
  "message": "SUCCESS"
}

Response parameters

Parameter
Type
Can it be empty
Description

code

int

N

0 means success, when code is not 0, data can be empty

message

string

N

description

Last updated