# Preparation for integration

1. After registration you need to go through the activation process through tech support and verify your account.
2. In the Shop Management section (<https://dashboard.swcpay.com/Shop/Shop>) you need to specify the URL where the Callback about the change of payment status will be received.

**Payment creation using Server-to-Server**

1. Send JSON request to one of the methods /api/v1/payment/, /api/v1/payment/fiat/, /api/v1/payment/recurrent, get payment data
2. Then you can display the received data on your site, or redirect the client to the payment form of swcpay, the link to the payment form will also be displayed in the response to requests

**Flow create payment using redirect**

1. Send a FormData request to one of the methods /api/v1/payment/pages/, /api/v1/payment/pages/fiat/, /api/v1/payment/pages/recurrent, by sending these requests your client should be redirected by the request URL.
2. If the request is successful, your client should end up on a swcpay payment form with the currency and amount you specified.

**Flow Callback**

1. Create a payment using any of the above methods, pay the invoiced amount or wait for the payment window to end.
2. The swcpay platform will send you a request with the data of this payment when the payment status changes to any of the supported ones in the system.
3. Make sure that this request was actually sent by the swcpay platform by checking the Signature field, you should also check that the payment has the value false in the Test field.
4. If all checks are correct, swcpay expects to receive an HTTP 200 OK response, if the response was received with a different status swcpay will continue to try to send the Callback until it is correctly received or the number of attempts to send it reaches 30.
5. If the Callback could not be received in 30 attempts, you should fix the problem that prevented it from being processed correctly and contact technical support so that we can check the sending of the Callback again.

**API key generation** To generate an API key, go to “Store Connection” -> “” Store Management” tab in your personal cabinet.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://swcpay.gitbook.io/swcpay/preparation-for-integration.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
