# QRIS Refund

# Specification

  • The following table is a specification of this API:
Name Description
API Name SNAP QR MPM Refund
Function This API is used to create QRIS from merchant to PayCools as the acquirer
Service Code 78
Method POST
URL /v2.0/qr/qr-mpm-refund
Accept application/json
Content Type application/json
Related Service
Expected Timeout 8 second

# Request

  • The following part will be describe about parameter of request in this API:

# Request Parameter

  • The following table is a list of request parameter in this API:
  • The following table is a header of request parameter:
No Name Type Length Required Condition Remarks
1 Content-Type String Variable, 127 max Mandatory - Content type, value always application/json
2 Authorization String Variable, 2048 max Mandatory Represents access_token of a request, starts with keyword “Bearer” and followed by access_token
3 X-TIMESTAMP String Fixed, 25 max Mandatory - Transaction date time, in format YYYY-MM-DDTHH:mm:ss+07:00. Time must be in GMT+7 (Jakarta time)
4 X-SIGNATURE String Variable Mandatory - created using asymmetric signature SHA256withRSA algorithm of X-CLIENT-KEY + “|” + X-TIMESTAMP
for example:3a34d6a9debb4246931f3941c781dd3b|2023-09-25T17:57:35+07:00
5 X-PARTNER-ID String Variable, 36 max Mandatory - Unique identifier for partner was generated by PayCools, or known as appId

# Body

  • The following table is a body of request parameter:
No Name Type Length Required Condition Remarks
1 originalPartnerReferenceNo String Variable, 50 max Mandatory - Unique transaction identifier in client system.
2 partnerRefundNo String Variable, 50 max Mandatory - Unique Refund transaction identifier in client system.
3 merchantId String Variable, 50 max Mandatory - Unique identifier for partner was generated by PayCools, or known as appId
5 callbackUrl String Variable, 64 max Optional - URL used to receive callback information
6 refundReason String Variable, 64 max Optional - Refund Reason

# REQUEST SAMPLE

POST /v2.0/qr/qr-mpm-refund HTTP/1.1
Content-type: application/json
Authorization: Bearer eyJhbGciOiJIUzI1NiJ9.eyJhcHBJZCI6ImNiY2U0OTBlODJmODQxZjJiMzE2MmE4ZGQyN2U5ZmQxIiwiY2FjaGVLZXkiOiJUT0tFTl9BUElfY2JjZTQ5MGU4MmY4NDFmMmIzMTYyYThkZDI3ZTlmZDFfMjEwMDJiMGYtMDJkNS00ZDI2LTg4MmEtMGRmNWI5MzVlNWVhIiwiY3JlYXRlVGltZSI6MTY5NjY1MDAyMTg3OX0.mkiFEVNvWTJDVLTvY9oE2u4w76wnlra1mwzC79SG-Zo
X-TIMESTAMP: 2023-09-25T17:57:35+07:00
X-SIGNATURE:
Dupbr1ILxsfBrXFmeDdIjwCmgv6AF+JQeIpD1Gq8HDjow7avCXdZAPOEbxVe7/x0atxy86aUfC11zXA1gvXXwxrTXFr6V0x8GZCyTndqnDyRlBeEZLL3BLmDRkrSsomd/mv1eG/th4TQndSPrBBfbN3bj0yIB99y2BnU5fBy7B0ZhYiQVs3uREspIsBB99F/4Zv8GbPWvik2usdOUo0gfPAQoZ3MJAcBQ/0vMRT5KdLm903C2HNyl1Cpb6OFRgaU2LAWybEQIC2QJ9mFb08NPR0PEu75WpVHNrFYn8gfiI8nRso0vBJhtMZrRINDQf9scV53cFdjpWobQHvnFDHCqQ==
X-PARTNER-ID: cbce490e82f441f2b3162a2dd27e8fd1

{
	"originalPartnerReferenceNo": "TR1779689916364",
	"partnerRefundNo": "REF177977825634",
	"merchantId": "05a552bd2df24fd49a006d695603f698",
	"callbackUrl": "https://test.com",
	"refundReason": "not good"
}

# Response

  • The following part will be describe about parameter of response in this API:

# Response Parameter

  • The following table is a list of response parameter in this API:

# Header

  • The following table is a header of response parameter:
No Name Type Length Required Condition Remarks
1 Content-Type String Variable, 127 max Mandatory - Content type, value always application/json
2 X-TIMESTAMP String Fixed, 25 max Mandatory - Transaction date time, in format YYYY-MM-DDTHH:mm:ss+07:00. Time must be in GMT+7 (Jakarta time)

# Body

  • The following table is a body of response parameter:
No Name Type Length Required Condition Remarks
1 responseCode String Fixed, 7 max Mandatory - Refer to response code list
2 responseMessage String Variable, 150 max Mandatory - Refer to response code list
3 originalPartnerReferenceNo String Variable, 512 max Mandatory - Unique transaction identifier in client system.
4 refundNo String Variable, 512 max Conditional Y:= Successfully Refund ID provided. Mandatory applied only if the refund transaction is successful
5 partnerRefundNo String Variable, 512 max Mandatory - Unique Refund transaction identifier in client system.
6 refundAmount MONEY Variable Conditional Y:= Successfully Refund Amount

# Response

Content-Type: application/json
X-TIMESTAMP: 2023-04-11T21:10:11+07:00
{
    "responseCode": "2027800",
    "responseMessage": "Request In Progress ",
    "originalPartnerReferenceNo": "TR1779689916364",
    "refundNo": "R2059165380341010432",
    "partnerRefundNo": "REF177977825634",
    "refundAmount": {
        "value": "30000.00",
        "currency": "IDR"
    }
}

# Response Code and Message

  • The following table is the list response code and message of Balance Inquiry API:
No Response Code Response Message Remarks Partner Action Related Service
1 2007800 Successful Success to be processed Mark Generate QRIS process as Success QRIS MPM (Acquirer) - SNAP
2 4007800 Bad request General request failed error Mark QRIS Refund process as Failed. QRIS MPM (Acquirer) - SNAP
3 4007801 Invalid Field Format (Field) The data you entered does not match the format requirements Mark QRIS Refund process as Failed. QRIS MPM (Acquirer) - SNAP
4 4007802 Invalid Mandatory Field (Field) Mandatory field should be fulfilled Mark QRIS Refund process as Failed. QRIS MPM (Acquirer) - SNAP
5 4017800 Unauthorized.[Reason] Invalid Signature/Unknown Client/Connection Not Allowed/Invalid API/Company is not authorized Mark QRIS Refund process as Failed. QRIS MPM (Acquirer) - SNAP
6 4017801 Invalid token (B2B) Access Token Not Exist/Access Token Expired/Token is Invalid Mark QRIS Refund process as Failed. QRIS MPM (Acquirer) - SNAP
7 4037801 Feature Not Allowed The feature is not allowed to use. Please make sure you registered this feature in your partnership data Mark QRIS Refund process as Failed. QRIS MPM (Acquirer) - SNAP
8 4037805 Do not honor Do not honor Mark QRIS Refund process as Failed. QRIS MPM (Acquirer) - SNAP
9 4037806 Feature Not Allowed At This Time The feature is not allowed at this time. Please try again Mark QRIS Refund process as Failed. QRIS MPM (Acquirer) - SNAP
10 4037815 Transaction Not Permitted[Reason] Transaction data does not meet the refund's criteria/Refund payment is failed because Payment transaction status has been settled Mark QRIS Refund process as Failed. QRIS MPM (Acquirer) - SNAP
11 4047801 Transaction Not Found Transaction not found Mark QRIS Refund process as Failed. QRIS MPM (Acquirer) - SNAP
12 4047808 Invalid Merchant Invalid merchant Mark QRIS Refund process as Failed. QRIS MPM (Acquirer) - SNAP
13 4047813 Invalid Amount Refund nominal is greater than the remaining transaction nominal Mark QRIS Refund process as Failed. QRIS MPM (Acquirer) - SNAP
14 4047818 Inconsistent Request {X-PARTNER-ID & merchantID not match} merchantID and X-PARTNER-ID value are not match. These fields should consist of same value Mark QRIS Refund process as Failed. QRIS MPM (Acquirer) - SNAP
15 4057801 Requested operation to refund transaction is not allowed at this time The issuer used for refund does not support refund Mark QRIS Refund process as Failed. QRIS MPM (Acquirer) - SNAP
16 4097800 Conflict X-EXTERNAL-ID duplicate Mark QRIS Refund process as Failed. QRIS MPM (Acquirer) - SNAP
17 4297800 Too Many Requests Maximum request limit exceeded Mark QRIS Refund process as Failed. QRIS MPM (Acquirer) - SNAP
18 5007800 General Error General Error Mark QRIS Refund process as Failed. QRIS MPM (Acquirer) - SNAP
19 5007801 Internal Server Error Unknown internal server failure, please retry the process again Mark QRIS Refund process as Failed. QRIS MPM (Acquirer) - SNAP
20 5047800 Timeout Your request timeout Mark QRIS Refund process as Failed. QRIS MPM (Acquirer) - SNAP