0% found this document useful (0 votes)
287 views11 pages

Shopee - MDD API Documentation.V.1.0

The document provides specifications for the MDD API for integrating with Shopee payments. It includes details on: 1. The API endpoints, parameters, request and response formats for functions like generating QR codes for payments, checking the status of payments, and cancelling or refunding transactions. 2. The API uses HTTPS POST methods and JSON request/response formats. 3. Developers can access sandbox and production API endpoints, and will need to include their API key and credentials in requests.

Uploaded by

Johnson
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
287 views11 pages

Shopee - MDD API Documentation.V.1.0

The document provides specifications for the MDD API for integrating with Shopee payments. It includes details on: 1. The API endpoints, parameters, request and response formats for functions like generating QR codes for payments, checking the status of payments, and cancelling or refunding transactions. 2. The API uses HTTPS POST methods and JSON request/response formats. 3. Developers can access sandbox and production API endpoints, and will need to include their API key and credentials in requests.

Uploaded by

Johnson
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 11

MDD API 

Shopee Documentation 
Ver.1.0

_____________________________________________________________________________________________
​back to tabel of contents
1
Forewords

Data transaction and access used on this document are using Representational State
Transfer (REST) Architecture.
HTTPS Method used are POST. Token mechanism also used on data transfer between every
request to the server.

More information about REST can be found at


https://en.wikipedia.org/wiki/Representational_state_transfer​ and
https://en.wikipedia.org/wiki/Hypertext_Transfer_Protocol​.

API Example:
https://apiv2.mdd.co.id:28194/v1/shopee/get-qr
with Post Method and HTTPS Headers: ​Content-Type: application/json
Both request (data POST) and response are on JSON (more information at
https://en.wikipedia.org/wiki/JSON) format.

For Any Technical Support needs feel free to drop us an email at ​[email protected]​ or
contacting us on whatsapp on 0812-9420-492

_____________________________________________________________________________________________
​back to tabel of contents
2
API Specification Doc

Version Date Author Description

1.0 09-03-2020 Wahyudi - MDD Initial Documentation

_____________________________________________________________________________________________
​back to tabel of contents
3
Table of Contents

Forewords 1

API Specification Doc 3

Table of Contents 4

URL 5

API KEY 5

API Check Server 6

API Check Version 6

API Get QR Code 7

API Payment Status 8

API Cancel Payment 9

API Reversal Transaction 11

API Void Transaction 11

_____________________________________________________________________________________________
​back to tabel of contents
4
URL

Environment Remark

Development http://apidev.mdd.co.id:28194/

Production https://apiv2.mdd.co.id:30307/

e.g. for API to Check API Server

End Point ​Development

http://apidev.mdd.co.id:28194/v1/ping

End Point ​Production

https://apiv2.mdd.co.id:30307/​v1/ping

API KEY

Environment Remark

Development (will be given soon)

Production (will be given after testing)


WILL BE INFORMED SOON

_____________________________________________________________________________________________
​back to tabel of contents
5
API Check Server
Description: Check API Server Availability

Request Parameters
Parameter Type Value Remark

Protocol HTTPS

Method ANY GET / POST

End Point String v1/ping

HTTPS Request examples


GET/POST ​/v1/ping​ HTTPS/1.1

Host: ​http://apidev.mdd.co.id:28194

REPLY :

“pong”

API Check Version


Description: Check Existing API Version

Request Parameters
Parameter Type Value Remark

Protocol HTTPS

Method ANY GET / POST

End Point String v1/version

HTTPS Request examples


GET/POST ​/v1/version​ HTTPS/1.1

Host: ​http://apidev.mdd.co.id:28194

REPLY :

“Ver.1.0.0”

_____________________________________________________________________________________________
​back to tabel of contents
6
API Get QR Code
Description: To Get Shopee QR Code Image or Data. You Can Load The ​qr​ image link.

Request Parameters
Parameter Type Value Remark

Protocol HTTP/S

Method POST

End Point String v1/shopee/get-qr

Header Content-Type application/json Without this parameter,


the service will not able
to be accessed

Body Message

token string A generated alphanumeric string Without this parameter,


the service will not able
to be accessed

tid string Your Unique Terminal ID Mandatory

mid string Your MDD Merchant ID Mandatory

amount numeric Total Transaction Amount Mandatory

reff_no string Your Reference Number Mandatory

HTTP/S Request example


POST​ /v1/shopee/get-qr ​HTTPS/1.1
Host: http://apidev.mdd.co.id:28194
Content-Type: application/json

{
"token": "<<YOUR API TOKEN>>",
"tid": "<<YOUR TERMINAL ID>>",
"mid": "<<YOUR MID>>",
“amount”: 1000,
“reff_no”: “TEST_REFF_NO123”

HTTP/S Response example (Success)


{
"response": {
"code": 200,
"message": "Shopee QR Success",
"latency": 0.53607606887817,
"host": "192.168.2.194"
_____________________________________________________________________________________________
​back to tabel of contents
7
},
"data": {
"provider": "Shopee",
"mid": ""<<YOUR MID>>",
"tid": "<<YOUR TERMINAL ID>>",
"qr": "http://apidev.mdd.co.id:28194/show/shopee/qr/DMS20200306150714.png",
"qr_content":
"00020101021226560016ID.CO.SHOPEE.WWW011893600918000000049402034940303UME520453
995303360540510.005802ID5918DEMO MERCHANT
Shop6007JAKARTA61051294062340517DMS20200306150714070901234567863047EB8",
"reff_no": "TEST_REFF_NO123",
"trx_id": "DMS20200306150714",
"amount": "1000"
}
}

HTTP/S Response example (Failed)

Varius Message(s) Following Partner Host, With Response Code value 400

API Payment Status


Description: Endpoint to check Shopee payment status once payment is done by customer.

Request Parameters
Parameter Type Value Remark

Protocol HTTPS

Method POST

End Point String v1/shopee/status-payment

Header Content-Type application/json Without this parameter,


the service will not able
to be accessed

Body Message

token string A generated alphanumeric string Without this parameter,


the service will not able
to be accessed

mid string Your MDD Merchant ID Mandatory

tid string Your Unique Terminal ID Mandatory

trx_id string Your Unique Transaction ID Mandatory

_____________________________________________________________________________________________
​back to tabel of contents
8
HTTP/S Request examples
POST​ /v1/shopee/status-payment​ HTTPS/1.1
Host: http://apidev.mdd.co.id:28194
Content-Type: application/json

{
"mid": <<YOUR_MID>>,
"tid": "<<YOUR TID>>",
"token": <<YOUR_TOKEN>>,
"trx_id": "test_reff_no123"
}

HTTP/S Response example (Success PAID)


{
"response": {
"code": 200,
"message": "Transaction Status Found",
"latency": 0.76505494117737,
"host": "192.168.2.194"
},
"data": {
"provider": "Shopee",
"tid": "012345678",
"mid": "1234567abc",
"trx_id": "DMS20200306150714",
"reff_no": "YUDI-TESTPAY012345",
"amount": "1000",
"status": "SUCCESS"
}
}

HTTP/S Response example (Failed)

Varius Message(s) Following Partner Host, With Response Code value 400

API Cancel Payment


Description: Endpoint to conduct payment cancellation once qr generated.

Request Parameters
Parameter Type Value Remark

Protocol HTTPS

Method POST

End Point String v1/shopee/cancel-payment

_____________________________________________________________________________________________
​back to tabel of contents
9
Header Content-Type application/json Without this parameter,
the service will not able
to be accessed

Body Message

token string A generated alphanumeric string Without this parameter,


the service will not able
to be accessed

mid string Your MDD Merchant ID Mandatory

tid string Your Unique Terminal ID Mandatory

trx_id string Your Unique Transaction ID Mandatory

HTTP/S Request examples


POST​ /v1/shopee/cancel-payment​ HTTPS/1.1
Host: http://apidev.mdd.co.id:28194
Content-Type: application/json

{
"mid": <<YOUR_MID>>,
"tid": "<<YOUR TID>>",
"token": <<YOUR_TOKEN>>,
"trx_id": "test_reff_no123"
}

HTTP/S Response example (Success Cancellation)


{
"response": {
"code": 200,
"message": "Transaction Cancel Success",
"latency": 0.47217392921448
},
"data": {
"provider": "Shopee"
"tid": "01234567",
"mid": "1234567abc",
"trx_id": "test_reff_no123",
"reff_no": 1000,
"status": "CANCELLED"
"amount": "1000",

}
}

HTTP/S Response example (Failed)

_____________________________________________________________________________________________
​back to tabel of contents
10
Varius Message(s) Following Partner Host, With Response Code value 400
API Reversal Transaction
Description: Will be triggered Automatically from backend once Failure Detected. No CLient
Action needed.

API Void Transaction


Description: Not Applicable.

_____________________________________________________________________________________________
​back to tabel of contents
11

You might also like