Card detail for united kingdom

Hi I am working on cards payment but the amarican express in United kingdom is not I am using this code
$body = [

"amount" => 100,

"complete_checkout_url" => "http://example.com/complete",

"country" => "GB",

"currency" => "GBP",

"merchant_reference_id" => "950ae8c6-78",

"language"=>"en",

"payment_method_types_include" => [

    "gb_mastercard_card",

    "gb_visa_card",

    "gb_amex_card",

]

];

please tell me what I can do wrong and also send me all card payment method types anyone can help.

@Jack_Honner. I have tested your code but it throws error below ERROR_HOSTED_PAGE_UNRECOGNIZED_PAYMENT_METHOD_TYPES_TO_INCLUDE - [‘gb_amex_card’] [status]

It seems gb_amex_card is not supported. As the API Call the list of supported payments for UK includes:

gb_mastercard_card
gb_visa_card
gb_zappapp_bank
gb_trustly_bank

So I test the code below and its working


$body = [

"amount" => 100,

"complete_checkout_url" => "http://example.com/complete",

"country" => "GB",

"currency" => "GBP",

"merchant_reference_id" => "950ae8c6-78",

"language"=>"en",

"payment_method_types_include" => [

    "gb_mastercard_card",

    "gb_visa_card",
   
"gb_zappapp_bank",
"gb_trustly_bank"


]

];

Finally, This docs will provide you an API Call to get the list of country for Rapyd payments List of Payments docs link

In your own case, the API Get request will look like /v1/payment_methods/country?country=GB&currency=GBP

Thanks

2 Likes

Hi
fredjinbility You help me so much in everycase first of all thanks.
I am using checkout hosted page in united kingdom method GBP and in my checkout page I need the amex card in gb but it give me error (ERROR_HOSTED_PAGE_UNRECOGNIZED_PAYMENT_METHOD_TYPES_TO_INCLUDE - [‘gb_amex_card’] )

header(‘Content-Type: application/json’);
$path = “utilities.php”;
include($path);
session_start();
$amount =150;
$refrence = “dsadasda”’;

$body = [
“amount”=>$amount,
“country” => “GB”,
“currency” => “GBP”,
“cancel_checkout_url”=>“https://afaq.mobitairportparking.co.uk/”,
“complete_checkout_url”=>“https://afaq.mobitairportparking.co.uk/rapyd/thanks.php”,
“description”=> $refrence,
“payment_method_options.3d_required”=>true,
“merchant_reference_id” => “950ae8c6-78”,
“language” => “en”,
“payment_method_types_include” => [
“gb_mastercard_card”,
“gb_visa_card”,
“gb_amex_card”
],
“capture”=> true,
“3DS_required”=>true
];

try {
$object = make_request(‘post’, ‘/v1/checkout’, $body);
var_dump($object);
header('Location: ’ . $object[‘data’][‘redirect_url’]);

} catch (Exception $e) {
echo “Error: $e”;
}

but in visa master card case its working fine but i need amex in gpb.

1 Like

Hi @Jack_Honner, thanks for your post. Unfortunately at this time there is no gb_amex_card right now.

As @fredjinbility was saying, if you use List Payment Methods by Country, you will see that gb_amex_card is not listed for Great Britain.

Conversely you’ll see Amex for countries like SG (Singapore) or IN (India).

  • sg_amex_card
  • in_amex_credit_card
  • in_amex_card

These would be available for their specific country and currencies.

1 Like