Agent Status Inquiry

👍

HTTPS POST / Server-to-Server

Payment requests and responses are encrypted using JWE

  • JWE algorithm = RSA-OAEP + A256GCM
  • The signature uses JWS PS256

Merchants must know how to prepare requests and process responses using JWE + JWS with exchange key.

🚧

Supported Agent

Only FPX in Malaysia supported agent status inquiry. Example agent codes : MYMBB, MYPBB ,MYAMB

Refer the full list Payment Channels - WebPay

Agent Status Inquiry Request (by agent codes)


https://sandbox-pgw.2c2p.com/AgentStatus/v1/Inquiry
https://pgw.2c2p.com/AgentStatus/v1/Inquiry

To prepare a refund status request, refer to the guidelines below.

📘

Provided Sample Code

The following sample code demonstrates how to prepare request data, generate the JWT token with key, and send the API request.

For the JWT token, you may also refer to the sample code here.

  1. To prepare the data payload for the refund request, refer to the sample structure shown below. You may also check the API specifications here: Agent Status Inquiry (by agent codes) Request Parameters
  2. To generate encrypted request data, refer to this guide: Generate JWT Request with Keys
{
	"merchantID": "458458000000000",
	"agentCodes": ["MYMBB", "MYABB"]
}
eyJhbGciOiJQUzI1NiJ9.ZXlKaGJHY2lPaUpTVTBFdFQwRkZVQ0lzSW1WdVl5STZJa0V5TlRaSFEwMGlmUS5MWlpZVE5VVDJVTlJhYnNuemxvckUyMDlUYnJ6d2tQc0NxQXhOY0lfZnNOd2N4T296ZmpTZkNKXzd3bUdwNVZNS1NpRjBRdDkzSzhUSThXRWtfZTdaMjhlZ0NVRjdicTZLbWhKZDV3cGRNNnFSdC15VE8xVzZWam83MHJjR2V5UXN4ZUJUYWdjOWtDTVlsY1J3ZjNrVEUzYmdWcUo1RVdjM0xqaHlPM3hKeWw2bTNnUEhNQmc0cjI4ZFN4VnRDVE9xaVU3YWZFQlZ1a1NXMlNQQ1lzUHZhbzFON05XNVdIYmFFYnpmdWtDVVpXd0YxS2JzTnBBOF82WDVlYkJsc2toZ1FCZ2x3cTd2T25YTWRrLThpa01xSFJsTHlnSlFyUURjanJBaXJMYkRUUldFOF9mSERtOE1vdGlBcmtYM1NHUC1RbWs0VTVKZGtMNXJwMkhOSUVNa1EuMTZvRk5fQVFIdXZzZ09Zbi5JVFdaYkRjRjR3U0lPX0ZCVEJWSWNGSjdLRzB6aFZhQkQ1Y2FNNG9mTzFDV21hRmw2bzdPME4ydTQxYU1zLWxmWGhDdkV5YUNiTEVhcEduczVZODFlOEs4V1M5RDFpNHgtRllwTHZNLjd4cmh3UkhWNG9HVFFiM19KWlZwVUE.fPV84HXHEkqmPCwevxcW7-yWUu8TMasOMCDNF7jHH_jDmHlXPAL-FOa3J0uZObRIlewx5cnaXcPiIj1nYH733GsGP1nqMjDYycra_rCBBmsMj1FP3lJbuuwizyjyQS-CN2JGI_2QsTU94Gel6yXIcEgBwUH2Z2T62XrnofFrqdH4BU8Nj1QQt6KK3pTuC3gHCRthS1_MCFGO5kK8Hb7lFYKCKBDuxWp21Dv_wVcjAH4goFwJMF4H4iNvqepmhuWUcujE5Wl7zgtm50ueBgDJaWOSRqI_VfQJnew2nQGH5bNd2hs4SnaXsHc1ZHo8DdqlhVZRqWUD4GEvc6AwR5LmpA
  1. To send the encrypted request via API, refer to the sample request below.
curl --location 'https://sandbox-pgw.2c2p.com/AgentStatus/v1/Inquiry' \
--header 'Content-Type: text/plain' \
--data 'eyJhbGciOiJQUzI1NiJ9.ZXlKaGJHY2lPaUpTVTBFdFQwRkZVQ0lzSW1WdVl5STZJa0V5TlRaSFEwMGlmUS5MWlpZVE5VVDJVTlJhYnNuemxvckUyMDlUYnJ6d2tQc0NxQXhOY0lfZnNOd2N4T296ZmpTZkNKXzd3bUdwNVZNS1NpRjBRdDkzSzhUSThXRWtfZTdaMjhlZ0NVRjdicTZLbWhKZDV3cGRNNnFSdC15VE8xVzZWam83MHJjR2V5UXN4ZUJUYWdjOWtDTVlsY1J3ZjNrVEUzYmdWcUo1RVdjM0xqaHlPM3hKeWw2bTNnUEhNQmc0cjI4ZFN4VnRDVE9xaVU3YWZFQlZ1a1NXMlNQQ1lzUHZhbzFON05XNVdIYmFFYnpmdWtDVVpXd0YxS2JzTnBBOF82WDVlYkJsc2toZ1FCZ2x3cTd2T25YTWRrLThpa01xSFJsTHlnSlFyUURjanJBaXJMYkRUUldFOF9mSERtOE1vdGlBcmtYM1NHUC1RbWs0VTVKZGtMNXJwMkhOSUVNa1EuMTZvRk5fQVFIdXZzZ09Zbi5JVFdaYkRjRjR3U0lPX0ZCVEJWSWNGSjdLRzB6aFZhQkQ1Y2FNNG9mTzFDV21hRmw2bzdPME4ydTQxYU1zLWxmWGhDdkV5YUNiTEVhcEduczVZODFlOEs4V1M5RDFpNHgtRllwTHZNLjd4cmh3UkhWNG9HVFFiM19KWlZwVUE.fPV84HXHEkqmPCwevxcW7-yWUu8TMasOMCDNF7jHH_jDmHlXPAL-FOa3J0uZObRIlewx5cnaXcPiIj1nYH733GsGP1nqMjDYycra_rCBBmsMj1FP3lJbuuwizyjyQS-CN2JGI_2QsTU94Gel6yXIcEgBwUH2Z2T62XrnofFrqdH4BU8Nj1QQt6KK3pTuC3gHCRthS1_MCFGO5kK8Hb7lFYKCKBDuxWp21Dv_wVcjAH4goFwJMF4H4iNvqepmhuWUcujE5Wl7zgtm50ueBgDJaWOSRqI_VfQJnew2nQGH5bNd2hs4SnaXsHc1ZHo8DdqlhVZRqWUD4GEvc6AwR5LmpA'

 

Agent Status Inquiry Response (by agent codes)


To receive and process refund status request responses, refer to the sample code below.

📘

Provided Sample Code

The following sample code demonstrates how to receive response data and decrypt the JWT token with key.

For decrypting the JWT token, you may also refer to the sample code here.

  1. Following a refund status request, the API will return encrypted response data. Refer to the sample encrypted response below.

  2. To decrypt the response, refer to: Process JWT Request with Keys

  3. Refer to the sample response structure below. You may also check the API specifications here: Agent Status Inquiry (by agent codes) Response Parameters

eyJhbGciOiJQUzI1NiIsImtpZCI6IjEifQ.ZXlKaGJHY2lPaUpTVTBFdFQwRkZVQ0lzSW1WdVl5STZJa0V5TlRaSFEwMGlMQ0pyYVdRaU9pSTBOVGcwTlRnd01EQXdNREF3TURBaWZRLmRQRHBtSzFoQW5aUm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DEs0wPL5XzlvgkZZ0gwLP5CAUHLOY8yMVmHseqT6NjJd1FZevw
{
	"agents": [{
		"agentCode": "MYMBB",
		"isDown": true
	}, {
		"agentCode": "MYABB",
		"isDown": true
	}],
	"merchantID": "458458000000000",
	"respCode": "0000",
	"respDesc": "Success"
}

Agent Status Inquiry Request (All Agents)


https://sandbox-pgw.2c2p.com/AgentStatus/v1/InquiryEnabledAgents
https://pgw.2c2p.com/AgentStatus/v1/InquiryEnabledAgents

To prepare a refund status request, refer to the guidelines below.

📘

Provided Sample Code

The following sample code demonstrates how to prepare request data, generate the JWT token with key, and send the API request.

For the JWT token, you may also refer to the sample code here.

  1. To prepare the data payload for the refund request, refer to the sample structure shown below. You may also check the API specifications here: Agent Status Inquiry (by agent codes) Request Parameters
  2. To generate encrypted request data, refer to this guide: Generate JWT Request with Keys
{
	"merchantID": "458458000000000"
}
eyJhbGciOiJQUzI1NiJ9.ZXlKaGJHY2lPaUpTVTBFdFQwRkZVQ0lzSW1WdVl5STZJa0V5TlRaSFEwMGlmUS5qTnNfYlktMW1oZlItbm5FSm0xeHRmQzY3eVBpalJKdGJ2dzBlb1NEelRXT2pLM1Bhc0hDV0F5a09IM1N3ODVrRjFPdl9rbm1rLUxUZzlBb3ktQnN6ZHJjc0NOY3RvT3pvZ09LaDJ0RkJxeC05QTZzTXZZdWZGbDFLMGZLMVo3aGJaZU5tNnVUYWJHbmFtRDBwUXFYQkdsQkZHSUVodVdKY3dLSEJWT0MtRlRoM01hUUxIU214ZHh4RFVncGpmMGpYOFVHUFdkZzgzWDFsZmMzS1BhWEp6SWh4WDltSDNwQXU1NzltNEh2TWNVR2dlX2w1S3JDUDdYelg4WllQc3MzUHFPTHdNWDdZVDRoNktvRVJKX2w0eXZWUW9NYXVTWTN6M1RRdngwblB4akhlQTJLdlJYSVJCM1MzaWdmMWpTSGdCSFNZYmVDSjd6blh4R2NnZlUtbEEueHBxVVh4azd6OXRSa2NjOS5WWFZoZFBaWGdHS2pQdnBXNkFtZ1NDcXIzZlFxd0hPSHpya2VKRHNYMXROQnJtOThicGdmalEud0RVTmVad29fT0RDZ2FmTHgwVUN0QQ.OUmZvJO-e83ZAhJA87AtiEZQlTNIluGKHPgYL6p1Qbfa506aZRpN3xx5cQaSeY9dsqPpAinTxyWiPkhXNDSv1EAHyd0wVYXl1XMY8c2Egd9k3XjwGUE_05RC0zyIDYnzqDa6EJZGoRmOqhUb9TSHvJioDwT_66cLUfKDlpmyM5vp9vEokfAJ9aw8vKctYzWnOlQcwy9BIuaW4ExlhAkxZLYL0MgoGNAfpiuHZUBOBUpC6wVUZoSZIGg4kJ0I6H1nruljvp17kEa_kVNszLURXqVnk5sr4AP561VFCaE4AV1WTcWR3BycXBvf9YPq0jDfzp4LxHplvf0ZuC0PqpJ2CA
  1. To send the encrypted request via API, refer to the sample request below.
curl --location 'https://sandbox-pgw.2c2p.com/AgentStatus/v1/InquiryEnabledAgents' \
--header 'Content-Type: text/plain' \
--data 'eyJhbGciOiJQUzI1NiJ9.ZXlKaGJHY2lPaUpTVTBFdFQwRkZVQ0lzSW1WdVl5STZJa0V5TlRaSFEwMGlmUS5qTnNfYlktMW1oZlItbm5FSm0xeHRmQzY3eVBpalJKdGJ2dzBlb1NEelRXT2pLM1Bhc0hDV0F5a09IM1N3ODVrRjFPdl9rbm1rLUxUZzlBb3ktQnN6ZHJjc0NOY3RvT3pvZ09LaDJ0RkJxeC05QTZzTXZZdWZGbDFLMGZLMVo3aGJaZU5tNnVUYWJHbmFtRDBwUXFYQkdsQkZHSUVodVdKY3dLSEJWT0MtRlRoM01hUUxIU214ZHh4RFVncGpmMGpYOFVHUFdkZzgzWDFsZmMzS1BhWEp6SWh4WDltSDNwQXU1NzltNEh2TWNVR2dlX2w1S3JDUDdYelg4WllQc3MzUHFPTHdNWDdZVDRoNktvRVJKX2w0eXZWUW9NYXVTWTN6M1RRdngwblB4akhlQTJLdlJYSVJCM1MzaWdmMWpTSGdCSFNZYmVDSjd6blh4R2NnZlUtbEEueHBxVVh4azd6OXRSa2NjOS5WWFZoZFBaWGdHS2pQdnBXNkFtZ1NDcXIzZlFxd0hPSHpya2VKRHNYMXROQnJtOThicGdmalEud0RVTmVad29fT0RDZ2FmTHgwVUN0QQ.OUmZvJO-e83ZAhJA87AtiEZQlTNIluGKHPgYL6p1Qbfa506aZRpN3xx5cQaSeY9dsqPpAinTxyWiPkhXNDSv1EAHyd0wVYXl1XMY8c2Egd9k3XjwGUE_05RC0zyIDYnzqDa6EJZGoRmOqhUb9TSHvJioDwT_66cLUfKDlpmyM5vp9vEokfAJ9aw8vKctYzWnOlQcwy9BIuaW4ExlhAkxZLYL0MgoGNAfpiuHZUBOBUpC6wVUZoSZIGg4kJ0I6H1nruljvp17kEa_kVNszLURXqVnk5sr4AP561VFCaE4AV1WTcWR3BycXBvf9YPq0jDfzp4LxHplvf0ZuC0PqpJ2CA'

 

Agent Status Inquiry Response (All Agents)


To receive and process refund status request responses, refer to the sample code below.

📘

Provided Sample Code

The following sample code demonstrates how to receive response data and decrypt the JWT token with key.

For decrypting the JWT token, you may also refer to the sample code here.

  1. Following a refund status request, the API will return encrypted response data. Refer to the sample encrypted response below.

  2. To decrypt the response, refer to: Process JWT Request with Keys

  3. Refer to the sample response structure below. You may also check the API specifications here: Agent Status Inquiry (by agent codes) Response Parameters

eyJhbGciOiJQUzI1NiIsImtpZCI6IjEifQ.ZXlKaGJHY2lPaUpTVTBFdFQwRkZVQ0lzSW1WdVl5STZJa0V5TlRaSFEwMGlMQ0pyYVdRaU9pSTBOVGcwTlRnd01EQXdNREF3TURBaWZRLmRQRHBtSzFoQW5aUmR5NTlFN2FNcjJWVU1Bd0dtLTVvUUJOVFJEQlhSbi1YVDRGdl9BdjNtOXBJbnV4Qld1b1B0NkNOeldHeVUyYUdCckYyQmFHcllMN1dxNlV5RU1kQjdQVWdqZGJUTVlIb1hxdmIzdk5uMXZsUDY0WlVVU3FIMGYydDY1emJiZEVKMUJqYXpUSEtaWHNTYmpsTEN6bjcxMmN6RTJiZWpHUkV5MmRYVHRqY1VqNlB2aEIzSl9pTUhYSVVucVM1M2VObFFVc1pKNWUtZnJnM1NTaDBXRmNKdmhkY0tId0wtQkxOUXRXYzBIanRkUTNtUVdZSjJqOW9sbGxDSDc5OWlteWsxQWwzZGpyekFjOWZqWkdQQnNWVVhiVW1nV0d5ZWRpTjNBbHMxOFlLYzhnZ2Y3NlA4ZWtoX2FWVnRHalR2MnBZcmVOUGM5Uy1Ddy5WaUV4S1oyWTEwc2k0RWgwLkc0YlN1U3NtdFUxZjluYmpSQzZfdk5IVFVTMUNFV1FDX2RNQWRUWFQzRDFRdGNSMTlYRGw5UzNyczd1d2xvRVVsdHJYeVkyUkZZWFl4eUZfRlZSNFo3cHhJaENTcFRCUXVqbnlHWlYwTWZWUmpQN21oQ1otT3BUS180Rm1rNHV0T21SaGhXajBJUW10cGVtdUlob1JoSk91LVk0UWpNbjFDR0kzQVdRRGduRkdKcGxzVERmMXhNbXcwNnE4ZlBSUW1mMm9mSzhLN3pONDJ3LlZGemRnOVlqczRVcnQ3aFpLb0wyN3c.AMchi8WkAJ0XfHYVUmIR-jnboXe8wQBl2wN8TaBUDdvAO3coyoagS7I40xbAuuAEmV1V5hbxVtHHsr-c10LZBKjcNQFm4fJZQdy90taqsJDxIZrI3NMV79U4wWFkT-M0mKu1Jn1-vl1knHr6LmCTlepIC-rI3vJbRoAVqYo43z6BI57FGqNBq--RKLIySdEZdjaC_JfSpDsIWq_kT0BzxBTEpSQnQAzZMsplJKvBb2HmIXx-d_e-NktNIqgty726_E8cq20qxYRPJFHLLgGdo8dpckOytq3tq0BMDEs0wPL5XzlvgkZZ0gwLP5CAUHLOY8yMVmHseqT6NjJd1FZevw
{
	"agents": [{
		"agentCode": "MYMBB",
		"isDown": true
	}, {
		"agentCode": "MYABB",
		"isDown": true
	}],
	"merchantID": "458458000000000",
	"respCode": "0000",
	"respDesc": "Success"
}