Fx Rate / FX Rate List Inquiry

👍

HTTPS POST / Server-to-Server

Encryption of payment request and response is use JWE

  • JWE algorithm = RSA-OAEP + A256GCM
  • Signature is use JWS PS256

Required to know how to prepare request and process response using JWT with exchange key.

https://demo2.2c2p.com/2C2PFrontend/PaymentAction/2.0/action
https://t.2c2p.com/PaymentAction/2.0/action

 

  

FX Rate Inquiry Request


Below are the guidelines that how to prepare a inquiry request and send to 2c2p

📘

Provided Sample Code

Prepare Request Data, Generate JWT Token with Key & Send API
Refer sample code here.

  1. Prepare payload data. Below sample request data show the request structure. Refer FX Rate Inquiry Request Parameter for API Specification.
<FxRateRequest>
  <version>2.1</version>
  <timeStamp>180321162445</timeStamp>
  <merchantID>JT</merchantID>
  <currency>702</currency>
</FxRateRequest>
  1. Generate encrypted request data. Refer to Generate JWT Request with Keys

  2. Send the encrypted request to inquiry API. Below show encrypted request data

eyJhbGciOiJQUzI1NiIsInR5cCI6IkpXVCJ9.ZXlKaGJHY2lPaUpTVTBFdFQwRkZVQ0lzSW1WdVl5STZJa0V5TlRaSFEwMGlmUS5SWU4zck0yRVNjSXI5OXZqc1BWdC1xZ3pTR0JCMC1LV1U1LWdyZS1vMGJjWnM0dlJQeWtFYVp6amRod3NnV3FJX3JjOUlPWFQtMkJBaFdiZm80V3BWTjJXZ2JXY052Qjc1c3BDU0VVb1ZkQjlKbDdWSnhVRVJMQ1ZRazRpdG9TWWxJd1dzclZMOXRvLXFEdFhkSEl4RDExMG5idlA4SUtDUkhZUUI4V0szbnhaU1pjc3hvRTRDeXVkQkFhWXBrVkNaMEYxZ0RoM1JLa19UMEl2eXhzZklWbzdTa0RhWkxkcW5DZk0wRjBIM1pYajF2VlNQTzVmbkR0cENMMEx4RGFucDNNVmtQOHRqVzhWZmpoSl9sZGYwUEctdTVRM2NqRWhHT0lnTVdlb0pYZmx2amlta3g5TVlDOVhUV3RTcVdleGFtVUJHdFpOZ0pSdkV1THlDcHZ0Z1EuYW5jcm8xMTgxUzl2ck9sWi5GdEJBUTBEX1FEVThacnptSWFRajNXb3A3dnJQX0htM0xoVnJtS1d2dlp5SnJWSnNISk1pYVNoOElNVC1xVk5jSldpNU5wMU5sY0M5dTRCRzd1em43aXNiWXBNcUFLOE9SN2xxcEpsRTVJQmpRR1VURmdudkZ0VlNUbFRHRTNMUkZlNmNoVDVEZ3l3U3hFX3ZQYTRVQzFFbWl3empVT0oybHRpYnpaOXFjRi1Jc1NWWHhRbndDZlJjeGEwYm5XbjdWTzlac2VGa2hZSHVOZDNscFotWjE5ak13YUxfUVhVWXQxOXVxMGJjVE5YQWE4VUtJUFh4ZUhsUmJkaVk2RXdnalJDYXlyQzJHVDFmMmcuVFVSS0dyamFPYm1GSWpMVjBzRWpjZw.eSIdOTFLbclxbzUAEZo-h7ykX6evCJA2IKmUoZyDSFFZWCb6wLI3FLd4bTjAXZVxtUpKFiq38ktOCz3gNkYePPqV6uXkmD9da5tLpqg4GbKmCIv91rwntW8UbW7BH0DleYUbne3rAIMyTChgcRbThMXS9O7W6k3AB9AkprOXw5C6GB01e0qccY93gWCbHapwBSpQkqlTSulV_pXp8duv7xLRDUdvWaXgoEmJbVnSymgjDJs0sIKzfzKtns6SUWRwoGceWhUEUy3bPOwuHXtOXGU8klQO_bWMHkTTKIVxDMIU040sMPjB24NPG_dlBBbG_3rx9YU4URjLBh4z7Tiq4g

 

FX Rate Inquiry Response


Below are the guidelines that how to process fx rate inquiry response from 2c2p.

📘

Provided Sample Code

Receive Response Data & Decrypt JWT Token with Key
Refer sample code here.

  1. FX Rate Inquiry API will return encrypted response data . Sample response show below.
eyJhbGciOiJQUzI1NiIsInR5cCI6IkpXVCJ9.ZXlKaGJHY2lPaUpTVTBFdFQwRkZVQ0lzSW1WdVl5STZJa0V5TlRaSFEwMGlmUS5HTXF0Z0lOcUYyd0otalpRRGw1eUhDYTRTbDMxNVJ5QmpLOG1BYy1FNWdkVDRZVzB0ajBSUlVqM19ENDVBcktkeE92MTJpaW03d2NvbDNkaWd5cURabFowWC1FV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mFiO_YYmGD1LRTf3QmfkzWa2ZH_h91CcW4Xvzkv_ZdPsheaiiNi5Tbb6OjQGwQ4Sw7ogomTx_HOoggAJZcaRTkNvsb-fWud2a-HFUhnZg4Kt-UqRE1BJwFVRefe27VkRJuijqM7e2CIFryO-7a0PptIPXG0HBWoFwnSLhxT0lT6ndtKKxJDyyr299AMY6QLX6PoS0fmZRSQa8ebJUJgwS1iGGEHVALapwhTEDbA
  1. You wouldn't recognize the meaning of JWT response and it is required to decode it, refer to Process JWT Request with Keys

  2. Below are sample inquiry response refer to FX Rate Inquiry Response Parameter for API Specification.

<FxRateResponse>
  <version>2.1</version>
  <timeStamp>180321162445</timeStamp>
  <merchantID>JT</merchantID>
  <currency>702</currency>
  <fxRate>1.0000</fxRate>
  <baseCurrency>702</baseCurrency>
  <responseCode>00</responseCode>
  <respReason>Success</respReason>
</FxRateResponse>

 

FX Rate List Inquiry Request


Below are the guidelines that how to prepare a fx rate list inquiry request and send to 2c2p

📘

Provided Sample Code

Prepare Request Data, Generate JWT Token with Key & Send API
Refer sample code here.

  1. Prepare payload data. Below sample request data show the request structure. Refer FX Rate List Inquiry Request Parameter for API Specification.
  1. Generate encrypted request data. Refer to Generate JWT Request with Keys

  2. Send the encrypted request to fx rate list inquiry API. Below show encrypted request data

 

FX Rate List Inquiry Response


Below are the guidelines that how to process fx rate list inquiry response from 2c2p.

📘

Provided Sample Code

Receive Response Data & Decrypt JWT Token with Key
Refer sample code here.

  1. FX Rate List Inquiry API will return encrypted response data . Sample response show below.
  1. You wouldn't recognize the meaning of JWT response and it is required to decode it, refer to Process JWT Request with Keys

  2. Below are sample inquiry response refer to FX Rate List Inquiry Response Parameter for API Specification.