RevolutCheckout: This currency is not available for this payment method

Hello, I maintain a simple payment script for a client using Revolut Pay. It was working fine until roughly a week ago, when it began showing a big X in the popup window.

I’m using payWithPopup, and I’m getting the following error:

RevolutCheckout: This currency is not available for this payment method
    at t [as constructor] (https://merchant.revolut.com/embed.js:1:70551)
    at new t (https://merchant.revolut.com/embed.js:1:71161)
    at https://merchant.revolut.com/embed.js:1:322848
    at MessageEvent.a (https://merchant.revolut.com/embed.js:1:179595)
    at t.dispatch (https://merchant.revolut.com/embed.js:1:26543)
    at t.onmessage (https://merchant.revolut.com/embed.js:1:27290)

As I said, this was working before. So, I just went to see what was going on with the currency, and I can’t see anything wrong. In the backend, the payment token is generated through PHP/cURL.

public function get_public_id() {
    $deposit = <this is filled in with an integer, eg. 100 for £1, with a simple function that seems to be working fine>
    $postfields = json_encode(array(
      "amount" => $deposit,
      "currency" => "GBP"
    ));

 
    $curl = curl_init();

    curl_setopt_array($curl, array(
      CURLOPT_URL => 'https://merchant.revolut.com/api/orders',
      CURLOPT_RETURNTRANSFER => true,
      CURLOPT_ENCODING => '',
      CURLOPT_MAXREDIRS => 10,
      CURLOPT_TIMEOUT => 5,
      CURLOPT_FOLLOWLOCATION => true,
      CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
      CURLOPT_POST => true,
      CURLOPT_POSTFIELDS => $postfields,
      CURLOPT_HTTPHEADER => array(
        'Content-Type: application/json',
        'Accept: application/json',
        'Revolut-Api-Version: 2023-09-01',
        'Authorization: Bearer <secret key>'
      )
    ));

    $response = curl_exec($curl);

    $httpcode = curl_getinfo($curl, CURLINFO_HTTP_CODE);
    
    curl_close($curl);

    if($httpcode==201)
    {
      echo $response;
    } else {
      echo "HTTP status code: " . $httpcode . "\n";
      echo "Response body: " . $response;
    }
  }

Creating the token seems to work fine, I get, for example, this:

{"id":"<some id>","token":"<some token>","type":"payment","state":"pending","created_at":"2024-04-10T13:20:58.904990Z","updated_at":"2024-04-10T13:20:58.904990Z","amount":1000,"currency":"GBP","outstanding_amount":1000,"capture_mode":"automatic","checkout_url":"https://checkout.revolut.com/payment-link/<some-id>","enforce_challenge":"automatic"}

Now, I don’t have access to the account backend itself. Is it possible that there’s something broken there? Is there anything I can tell my client to guide him on what to do in the backend if that’s the case?

1 Like

Nevermind, the client had to click on a big blue button in an email that Revolut sent him that said something like “You can now take card payments online”.

1 Like

Hello @vvk :wave: ,

Welcome to our community. May I know if the issue has been resolved? :thinking:

SG | Community Team

Yes, payments are working again.

1 Like

@vvk, Great to hear that your issue has been resolved. Keep exploring our community. :r:

SG | Community Team