Skip to main content

FAQs - Fusion API clients

Q1. What is {{x-signature}}?

Ans: The signature is a SHA-256 HMAC signature created using the API HMAC Key found in the keys section.

https://github.com/XStakCommerce/xpay-element-public-demo/blob/stage/server.js

Kindly refer to the sample demo app repo. Here e2e flow is coded.

Q2. What should be used for confirmPayment if the payment intent response does not include a clientSecret? We tried using pi_client_secret, but received the following error: {"error":true,"message":"Invalid credentials."}

Ans: The pi_client_secret needs to be passed as received in the create PI response. If you're getting the "Invalid credentials" error, it’s likely because dummy MID credentials were added. By default, XPay’s MIDs are attached on the backend, but if a merchant adds their own set of gateway credentials, those are used instead. In this case, since the credentials added were incorrect, it resulted in the "Invalid credentials" error. Ensure the dummy MIDs are removed so the correct test credentials are attached. The base URL for creating the payment intent is https://xstak-pay-stg.xstak.com/public/v1/payment/intent, and the SDK used is com.github.XStakCommerce:XPay-Element-Android-Native-SDK:stage-1.0.1.

Q3. What specific information should clients provide if they encounter an "Invalid credentials" error during payment confirmation?

Ans. If a client encounters an "Invalid credentials" error, we require the following details to diagnose and resolve the issue:

  1. SDK Package Version: The exact SDK version used (e.g., com.github.XStakCommerce:XPay-Element-Android-Native-SDK:stage-1.0.1).

  2. Base URL: The base URL for the create PI (Payment Intent) API they use (e.g., https://xstak-pay-stg.xstak.com/public/v1/payment/intent).

  3. Account ID: The account ID is used for the payment request.

  4. Payment Intent Response: The response from the create PI API, including the pi_client_secret.

  5. Gateway Credentials: Confirmation of whether any custom gateway credentials (MIDs) were added, as incorrect credentials could cause the error.

  6. Error Message: The exact error message received, including any logs that indicate the cause of the error.

JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.