Checkout Toolkit - Country Parameter Recommendations

Hi Rapyd Team and fellow devs,

I am having trouble figuring out how to correctly use the Country Parameter when creating a checkout page for our application.

Your docs list “The two-letter ISO 3166-1 ALPHA-2 code for the country. Uppercase.”

The Country” is a bit ambiguous in this context. The issue I am having, is trying to determine if we should be using the Country Code of the currently browsing customer or the country code of the legal entity for the seller.

The behaviour I see in Sandbox is that if I change the currency and country, I will get local and relevant payment options for that customer in their region. But if I choose for example USD, US, or CA, CAD - the card payment option or even all options will disappear.

If a Rapyd seller in the UK, SG, ect wants to offer a checkout page that is capable of accepting cards (eg. Visa / MC from around the world), it looks like we need to hardcode the country as that of the seller in the checkout page setup. Is that correct?

Is there any setting that could give both local checkout options for an American to pay someone in UK,SG and then also display the card options?

As a part 2 to this question:

Is there any way once given some API Credentials from a seller, we would be able to know what Country the seller is from?

Kind of like a get user info endpoint:
https://sandboxapi.rapyd.net/v1/me

That would return their home country, home currency, business name, ect.

Thanks @may191, appreciate the post. I tested this myself and checked in with our product team. Currently it is not possible to request payment methods of two different countries on the Hosted Checkout Page (HCP).

Country code you set should be the location of the buyer. The currency you set is the currency in which the buyer pays. Yes this should be hard coded. The card PMTs that are displayed on the HCP are based on the buyer’s country and currency, provided in the HCP request.

There is fallback logic where if the merchant/client’s country’s card payment methods would be shown. But if they aren’t available then only non-card payment methods relevant to the buy are shown.

I am curious when getting what country a seller is from, is this something like a marketplace where you would onboard the sellers onto Rapyd? If you are created wallets for the sellers you could get their country. Something like, Create Wallet, type: company, then you could retrieve the wallet and country.

As far as requesting for two different countries in the future, there may be something that is being worked on, but you could definitely add something here on the feedback category by editing this post, making a new one. or just replying to the link below.

https://community.rapyd.net/t/about-the-feedback-category/

Screen Shot 2022-02-24 at 2.39.58 PM

Thanks @Kyle ,

We have software platform kind of like a Shopify or Woo Commerce. We let sellers provide their Rapyd API credentials to us, and we will setup and host the checkout page for them.

For a real life example, let’s assume we have a seller from Singapore listing services in SGD and they have given us their API Credentials, so they can use Rapyd as their sole payment provider. The sellers goal is to accept payment primarily locally, but since they can accept Cards in Singapore, they would also want to make sure Cards (Visa/MC) show to buyers in the US, Canada, UK and essentially anywhere in the world.

If I do as you suggest and set the country parameter the buyers billing country (the US), and leave the currency as SGD:

{
   "amount":"65.10",
   "country":"US",
   "currency":"SGD",
   "merchant_reference_id":"AB-TF-ZTVP",
   "language":"en",
   "complete_payment_url":"https:\/\/local.checkout.payableplugins.com:8890\/order\/AB-TF-ZTVP?return=complete",
   "error_payment_url":"https:\/\/local.checkout.payableplugins.com:8890\/order\/AB-TF-ZTVP?return=error",
   "description":"Rapyd Demo Form",
   "metadata":{
      "payable_order_id":"AB-TF-ZTVP",
      "payable_source_id":"T6U9TH",
      "google_form_url":"https:\/\/docs.google.com\/forms\/d\/dev-rapyd\/viewform",
      "google_form_submission_id":"77fc7c19-84ee-4d93-bbed-6563c99dbdf0"
   }
}

Rapyd Sandbox is responding with:

{
   "status":{
      "error_code":"ERROR_HOSTED_PAGE_COUNTRY_CURRENCY_MISMATCH",
      "status":"ERROR",
      "message":"The request tried to create a checkout page, but there is no payment method that is supported in the country for the currency provided. The request was rejected. Corrective action: Use a different currency or country.",
      "response_code":"ERROR_HOSTED_PAGE_COUNTRY_CURRENCY_MISMATCH",
      "operation_id":"dcfa8dfd-6729-4c5b-8819-3a6812bb8242"
   },
   "message":"ERROR_HOSTED_PAGE_COUNTRY_CURRENCY_MISMATCH",
   "http_status":500,
   "created":false
}

The only way I seem to be able to achieve our goal, and get card options to appear consistently for all buyers on checkout, is if I hardcode the Sellers Currency and the sellers Country Code when setting up a checkout.

Is the behaviour different in production then what I am seeing in sandbox?

Thanks again for your advice.

Thanks @may191, to clarify you would need to have the same country and currency, so US & USD. There is logic in the background that would allow merchant cards to appear so SG & SGD Cards.

However, this would be coming from a Rapyd client with KYB registered in Singapore.

Your use case is interesting, let me check in again with our product to see if there is something here. We just released our Rapyd Verify Hosted Page, but this is only currently for the UK right now.