# Generate QRIS

# Specification

  • The following table is a specification of this API:
Name Description
API Name CPMPayment
Function This API is used to create QRIS from merchant to PayCools as the acquirer
Service Code 47
Method POST
URL /v2.1/qr/qr-mpm-generate
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 - For the signature, please refer to: Digital Signature Validation
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 partnerReferenceNo String Variable, 50 max Mandatory - Unique transaction identifier in client system.
2 codAmount MONEY Variable, 64 max Mandatory - Amount to be paid for Cod
3 frtAmount MONEY Variable, 64 max Mandatory - Amount to be paid for Freight
4 merchantId String Variable, 64 max Mandatory - Unique identifier for partner was generated by PayCools, or known as appId
5 validityPeriod String Variable, 64 max Optional - QR Code expired time, unit in seconds
6 terminalId String Variable, 64 max Optional - Unique identifier of store terminal.
7 additionalInfo QrGenerateAdditionalInfo Variable Mandatory - Additional information

# REQUEST SAMPLE

POST /v2.0/qr/qr-mpm-generate 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

{
  "partnerReferenceNo": "test202310457895245",
  "codAmount": {
    "value": "30000.00",
    "currency": "IDR"
  },
  "frtAmount": {
    "value": "30000.00",
    "currency": "IDR"
  },
  "merchantId": "cbce490e82f441f2b3162a2dd27e8fd1",
  "validityPeriod": "300",
  "additionalInfo": {
    "channelCode": "QRIS_DYNAMIC_QR",
    "notifyUrl": "www.test.com",
    "customerName":"test123",
    "customerMobile":"09123456789",
    "feeSplitType": 1,
    "items": [
      {
        "regionNo": "12356",
        "branchNo": "123456",
        "courierNo": "123456",
        "subOrderId": "123456",
        "codAmount": {
           "value": "30000.00",
           "currency": "IDR"
        },
        "frtAmount": {
           "value": "30000.00",
           "currency": "IDR"
        }
      }
    ]
  }
}

# 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 qrContent String Variable, 512 max Conditional Y:= Successfully processed QR String MPM
5 aggregateCodAmount MONEY Variable Conditional Y:= Successfully processed Aggregate Cod Amount
6 aggregateCodFeeAmount MONEY Variable Conditional Y:= Successfully processed Aggregate Cod Fee Amount
7 aggregateFrtAmount MONEY Variable Conditional Y:= Successfully processed Aggregate Freight Amount
8 aggregateFrtFeeAmount MONEY Variable Conditional Y:= Successfully processed Aggregate Freight Fee Amount
9 totalAggregateAmount MONEY Variable Conditional Y:= Successfully processed Total Aggregate Amount
10 totalAggregateFeeAmount MONEY Variable Conditional Y:= Successfully processed Total Aggregate Fee Amount
11 additionalInfo QrAdditionalInfoResp Variable Mandatory Y:= Successfully processed Additional information

# Response

Content-Type: application/json
X-TIMESTAMP: 2023-04-11T21:10:11+07:00
{
    "responseCode": "2004700",
    "responseMessage": "Successful",
    "qrContent": "00020101021226730021COM.GUDANGVOUCHER.WWW01189360091630040734030215GV21000040734030303UBE51450015ID.OR.GPNQR.WWW0215ID20232628847780303UBE5204653353033605405200005802ID5906Bluezi6013JAKARTA BARAT61051163062330108042801110517230706145945tTSEq6304F8DB",
    "aggregateCodAmount": {
        "value": "30000.00",
        "currency": "IDR"
    },
    "aggregateCodFeeAmount": {
        "value": "2000.00",
        "currency": "IDR"
    },
    "aggregateFrtAmount": {
        "value": "30000.00",
        "currency": "IDR"
    },
    "aggregateFrtFeeAmount": {
        "value": "2000.00",
        "currency": "IDR"
    },
    "totalAggregateAmount": {
        "value": "60000.00",
        "currency": "IDR"
    },
    "totalAggregateFeeAmount": {
        "value": "4000.00",
        "currency": "IDR"
    },
    "additionalInfo": {
        "channelCode": "QRIS_DYNAMIC_QR",
        "notifyUrl": "www.test.com",
        "customerName": "test123",
        "email": null,
        "customerMobile": "09123456789",
        "remark": null,
        "feeSplitType": 1,
        "items": [
            {
                "regionNo": "12356",
                "branchNo": "123456",
                "courierNo": "123456",
                "courierName": null,
                "courierMobile": null,
                "subOrderId": "123456",
                "codAmount": {
                    "value": "30000.00",
                    "currency": "IDR"
                },
                "frtAmount": {
                    "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 2004700 Successful Success to be processed Mark Generate QRIS process as Success QRIS MPM (Acquirer) - SNAP
3 4004700 Bad Request General request failed error Mark Generate QRIS process as Failed. Retry request with proper parameter QRIS MPM (Acquirer) - SNAP
4 4004701 Invalid Field Format Invalid format for certain field Mark Generate QRIS process as Failed. Retry request with proper parameter QRIS MPM (Acquirer) - SNAP
5 4004702 Invalid Mandatory Field Missing or invalid format on mandatory field Mark Generate QRIS process as Failed. Retry request with proper parameter QRIS MPM (Acquirer) - SNAP
6 4014700 Unauthorized. [reason] General unauthorized error Mark Generate QRIS process as Failed. Retry request with proper parameter QRIS MPM (Acquirer) - SNAP
7 4014701 Invalid Token (B2B) Authorization token are invalid, perhaps due to token expiry for B2B Mark Generate QRIS process as Failed. Retry request with proper parameter QRIS MPM (Acquirer) - SNAP
8 4034702 Exceeds Transaction Amount Limit Exceeds transaction amount limit Mark Generate QRIS process as Failed. Try to adjust the order amount QRIS MPM (Acquirer) - SNAP
9 4034705 Do Not Honor Account or user status is abnormal Mark Generate QRIS process as Failed. Retry request with proper parameter or can contact PayCools to check the user/account status QRIS MPM (Acquirer) - SNAP
10 4034715 Transaction Not Permitted.[reason] Transaction not permitted Mark Generate QRIS process as Failed. Retry request periodically or consult to PayCools QRIS MPM (Acquirer) - SNAP
11 4044708 Invalid Merchant Merchant does not exist or status abnormal Mark Generate QRIS process as Failed. Retry request with proper parameter QRIS MPM (Acquirer) - SNAP
12 4044718 Inconsistent Request Inconsistent request parameter found for the same partner reference number/transaction identifier Mark Generate QRIS process as Failed. Retry request with proper parameter QRIS MPM (Acquirer) - SNAP
13 4294700 Too Many Requests Maximum transaction limit exceeded Mark Generate QRIS process as Failed. Retry request with proper parameter QRIS MPM (Acquirer) - SNAP
14 5004700 General Error General error non retry-able Mark Generate QRIS process as Failed. Retry request periodically QRIS MPM (Acquirer) - SNAP
15 5004701 Internal Server Error Unknown internal server failure, please retry the process again Mark Generate QRIS process as Failed. Retry request periodically QRIS MPM (Acquirer) - SNAP
16 Total Timeout Total timeout, the client side does not get any responses from the server side (can be due to network issue, server slowing down, and so on) Do a retry maximum 3 attempts, if the result is still the same then action is aborted. Show appropriate error message to users QRIS MPM (Acquirer) - SNAP
17 Unexpected response (empty field/field does not exist/undefined response code) The server does not produce expected responses (can be due to hardware failure, bugs, and so on) Do a retry maximum 3 attempts, if the result is still the same then action is aborted. Show appropriate error message to users QRIS MPM (Acquirer) - SNAP