Requested_currency not working in checkout page

when i am trying to use requested_currency in Api call .i am not able to complete payment
but it is working without requested_currency .can anybody tell why this happen only with requested_currency .how can i use Requested Currency in checkout page integration

error message:Something went wrong. Resubmit card details or use a different card or payment method

my request body is given below

{
“amount”: 100,
“country”: “SG”,
“currency”: “SGD”,
“requested_currency”: “USD”,
“complete_checkout_url”: “https://example.com/complete”,
“cancel_checkout_url”:“https://example.com/cancel”,
“merchant_reference_id”: “950ae8c6-76”,
“payment_method_types_include”: [
“sg_credit_mastercard_card”,
“sg_credit_visa_card”
]
}

Thanks @gazeeb, I created a page and it looks like you will need to create a customer for this type of cross-boarder payment. I can look into this more and return with some more details, but some payment methods require a customer ID.

Create Checkout Page

Request

{
    "amount": 425.00,
    "complete_payment_url": "http://example.com/complete",
    "country": "SG",
    "currency": "SGD",
    "customer": "cus_77ebe87010ab257134948171c16a2190",
    "error_payment_url": "http://example.com/error",
    "merchant_reference_id": "950ae8c6-78",
    "cardholder_preferred_currency": true,
    
    "language": "en",
    "metadata": {
        "merchant_defined": true
    },
    "payment_method_types_include": [
      
    ],
     "payment_method_type_categories": [
      "card",
      "bank_redirect"
    ],
    "expiration": 1672279867,
    "payment_method_types_exclude": [],
      "custom_elements": {
         "requested_currency":"USD",
         "save_card_default":true

      }
}

Response

{
    "status": {
        "error_code": "",
        "status": "SUCCESS",
        "message": "",
        "response_code": "",
        "operation_id": "074480a3-6bfb-46e0-8bad-159828750dda"
    },
    "data": {
        "id": "checkout_198c6391a3c7ff93df869b07ec8a19a2",
        "status": "NEW",
        "language": "en",
        "merchant_color": "323fff",
        "merchant_logo": null,
        "merchant_website": "http://rapyd.net",
        "merchant_customer_support": {
            "url": "http://support.rapyd.net",
            "email": "support@rapyd.net",
            "phone_number": "555-555-5555"
        },
        "merchant_alias": "Test Business",
        "merchant_terms": null,
        "merchant_privacy_policy": null,
        "page_expiration": 1672073883,
        "redirect_url": "https://sandboxcheckout.rapyd.net?token=checkout_198c6391a3c7ff93df869b07ec8a19a2",
        "merchant_main_button": "pay_now",
        "cancel_checkout_url": "http://rapyd.net",
        "complete_checkout_url": "http://rapyd.net",
        "country": "SG",
        "currency": "SGD",
        "amount": 425,
        "payment": {
            "id": null,
            "amount": 425,
            "original_amount": 0,
            "is_partial": false,
            "currency_code": "SGD",
            "country_code": "SG",
            "status": null,
            "description": "Payment via Checkout",
            "merchant_reference_id": "950ae8c6-78",
            "customer_token": "cus_77ebe87010ab257134948171c16a2190",
            "payment_method": null,
            "payment_method_data": {},
            "expiration": 1672279867,
            "captured": false,
            "refunded": false,
            "refunded_amount": 0,
            "receipt_email": null,
            "redirect_url": null,
            "complete_payment_url": "http://example.com/complete",
            "error_payment_url": "http://example.com/error",
            "receipt_number": null,
            "flow_type": null,
            "address": null,
            "statement_descriptor": null,
            "transaction_id": null,
            "created_at": 0,
            "updated_at": 0,
            "metadata": {
                "merchant_defined": true
            },
            "failure_code": null,
            "failure_message": null,
            "paid": false,
            "paid_at": 0,
            "dispute": null,
            "refunds": null,
            "order": null,
            "outcome": null,
            "visual_codes": {},
            "textual_codes": {},
            "instructions": {},
            "ewallet_id": null,
            "ewallets": [],
            "payment_method_options": {},
            "payment_method_type": null,
            "payment_method_type_category": null,
            "fx_rate": null,
            "merchant_requested_currency": null,
            "merchant_requested_amount": null,
            "fixed_side": null,
            "payment_fees": null,
            "invoice": null,
            "escrow": null,
            "group_payment": null,
            "cancel_reason": null,
            "initiation_type": "customer_present",
            "mid": null,
            "next_action": "not_applicable"
        },
        "payment_method_type": null,
        "payment_method_type_categories": [
            "card",
            "bank_redirect"
        ],
        "payment_method_types_include": [],
        "payment_method_types_exclude": [],
        "account_funding_transaction": null,
        "customer": "cus_77ebe87010ab257134948171c16a2190",
        "custom_elements": {
            "save_card_default": true,
            "display_description": false,
            "payment_fees_display": true,
            "merchant_currency_only": false,
            "billing_address_collect": false,
            "dynamic_currency_conversion": false
        },
        "timestamp": 1670864283,
        "payment_expiration": null,
        "cart_items": [],
        "escrow": null,
        "escrow_release_days": null
    }
}

1 Like

thanks for the your replay .
i added customer id too still the problem exist
,in above code i can"t find any currency conversion .payment without currency conversion working fine but in the case of currency conversion the problem still exist

Thanks, there’s a video I created here for this for more examples:

Can you clarify what you mean here? Do you mean created a hosted page where the currency conversion is not displayed?