Implementation

Security

To ensure security, Xsolla uses:

Note
API keys are generated by Xsolla and are unique for each provider.

Headers

Incoming requests from Xsolla contain the following headers:

HeaderDescriptionRequired
Request-IdUnique request ID.Yes.
Content-DigestChecksum values for the request body.Yes if there is a request body.
Signature-InputParameters used to generate the signature.Yes.
SignatureRequest signature.Yes.
PreferAdditional data, e.g., environment=“sandbox”.No.
Note
You must include the same headers in webhooks sent to Xsolla.

Incoming requests verification

When you receive requests from Xsolla:

  1. Extract the secret key that corresponds to the keyid value from the Signature-Input header.
  2. Validate the created/expires time window.
  3. Retrieve the request body.
  4. Reconstruct the signature string according to Signature-Input and verify the signature using HMAC-SHA256.
Example
Refer to the detailed sample on GitHub.
Example:
Copy
Full screen
Small screen
1sig1=("@method" "@target-uri" "content-digest" "request-id");alg="hmac-sha256";created=1700000000;expires=1700000600;keyid="acc_123"
  1. Use Request-Id to search for the request in the logs.

Required functionality

For successful integration, you must implement at least the following API methods:

MethodPathDescription
POST/v1/paymentsCreates payment. Returns the action object.
PATCH/v1/payments/{transaction_id}Confirms payment if action.type=confirm is returned.
GET/v1/payments/{transaction_id}Gets the current payment status.
You also need to configure sending webhooks to Xsolla to notify about the payment events:
  • payment.succeeded — successful payment
  • payment.failed — failed payment
  • payment.refunded — refund
Note
Refer to the specification for detailed description of API methods and webhooks.
Was this article helpful?
Thank you!
Is there anything we can improve? Message
We’re sorry to hear that
Please explain why this article wasn’t helpful to you. Message
Thank you for your feedback!
We’ll review your message and use it to help us improve your experience.
Last updated: November 13, 2025

Found a typo or other text error? Select the text and press Ctrl+Enter.

Report a problem
We always review our content. Your feedback helps us improve it.
Provide an email so we can follow up
Thank you for your feedback!
We couldn't send your feedback
Try again later or contact us at doc_feedback@xsolla.com.