Reach - The Localize API Call
The Reach /localize GET API call is used to retrieve locale data from the Reach system. When you have to get FX rates for a particular currency, calling the /localize api call with the right parameters gives the converted response you need.
The /localize input parameters
Field | Type | Required | Notes |
---|---|---|---|
MerchantId | uuid | Yes | The 36 character GUID which identifies the merchant to theReach system. |
Callback | string | No | The JSONP Javascript function to call |
Country | char(2) | No | If the merchant already knows the consumer’s country, the ISO 3166-1-alpha-2 can be passed in to fetch the localization data for that country. If this is specified, the GEO-IP lookup will be bypassed. |
Currency | char(3) | No | The upper-case 3 character ISO 4217 currency code to get the symbol and units for, if available |
IncludeRate | boolean | No | If true, the latest rate offer will be returned. If not included, or false, a rate offer will not be returned. |
ConsumerIpAddress | string | No | This parameter must be specified when the request is being made on behalf of the consumer, not directly via the consumer’s browser. If a Country is specified, this is ignored. |
MerchantPrices | array | No | If the merchant is configured to use Reach’s Vanity Pricing, a set of tags is required with the associated prices. Note - The Merchant Prices is an encoded Json when passed through the GET call) |
Price | decimal | Yes | The price to convert. |
Tag | string | No | A tag associated with the price. This may be a SKU, Variant ID, group etc. |
Sandbox vs Production API call
If you are testing against a production store. kindly reach out to your Reach Account Manager for more information.
The Reach Test Tool
The Reach API test tool available at https://checkout.rch.how/ allows developers to test the Reach API calls easily and also gives insight into how it works.
Parameters
Request Type: /localize
API URL: https://checkout.rch.how/v2.18
Merchant Id: Your Reach MerchantId
Include Rate is optional
Country and Currency - either is needed not both.
Merchant Prices - encoded JSON
Localize Request/Response [Example]
GET https://checkout.rch.how/v2.18/localize?MerchantId=2a144a21-066a-42fe-a553-736a777e39e2&Currency=EUR&IncludeRate=true&MerchantPrices=%5B%7B%22Price%22%3A100%2C%22Tag%22%3A%222333333%22%7D%2C%7B%22Pr
ice%22%3A100%7D%5D&Callback=?
Using POST instead of GET
While the /localize api endpoint works on both GET and POST, we highly recommend a POST call if you have a large product base and would need to do a large batch call.
{
"Country": "CA",
"Currency": "EUR",
"Symbol": "€",
"Units": 2,
"RateOffer": {
"Id": "10e201f9-2254-44d4-aac0-797dedd8a5da",
"Expiry": "2020-08-07T18:01:31.629602Z",
"Rate": 0.8627
},
"ConsumerPrices": [
86.27,
86.27
]
}
API tools such as Postman can also be used to make test api call towards Reach
Reach API Documentation
For a full documentation on Reach api visit: https://withreach.com/docs/GoInterpayCheckoutAPIGuide-v2r020.pdf
Updated over 4 years ago