### Initial Recurring Payment Setup
Source: https://docs.robokassa.ru/ru/recurring-payments
This example shows how to initiate a recurring payment by including the 'Recurring' parameter in the initial payment request. This flags the transaction for future recurring charges.
```APIDOC
## POST /Merchant/Index.aspx
### Description
Initiates a payment that can be used for future recurring charges.
### Method
POST
### Endpoint
https://auth.robokassa.ru/Merchant/Index.aspx
### Parameters
#### Request Body
- **MerchantLogin** (string) - Required - Your merchant login.
- **InvoiceID** (string) - Required - Unique identifier for the invoice.
- **Description** (string) - Required - Description of the payment.
- **SignatureValue** (string) - Required - Security signature for the transaction.
- **OutSum** (string) - Required - The total amount of the payment.
- **Recurring** (string) - Required - Set to 'true' to enable recurring payments for this invoice.
### Request Example
```html
```
```
--------------------------------
### Example Signature Calculation
Source: https://docs.robokassa.ru/ru/saving
This example shows how to construct the string for signature calculation, including the MerchantLogin, OutSum, Receipt, Token, and password.
```text
robo-demo:1::%7B%22items%22%3A%5B%7B%22name%22%3A%22%D0%A2%D0%B5%D1%85%D0%BD%D0%B8%D1%87%D0%B5%D1%81%D0%BA%D0%B0%D1%8F%20%D0%B4%D0%BE%D0%BA%D1%83%D0%BC%D0%B5%D0%BD%D1%82%D0%B0%D1%86%D0%B8%D1%8F%22%2C%22quantity%22%3A1%2C%22sum%22%3A1.00%2C%22tax%22%3A%22none%22%7D%5D%7D:E1253728-48A9-488D-A045-9954C442AF5C-qNavrXC6Y4:pass1
```
--------------------------------
### Full SBP Payment Example with QR Code
Source: https://docs.robokassa.ru/ru/sbp-qr-payment
An HTML example demonstrating how to initiate an SBP payment using Robokassa.pay.startOp, display a QR code, and handle the payment link.
```html
Robokassa SBP QR
```
--------------------------------
### GetCurrencies Method GET Request Example
Source: https://docs.robokassa.ru/ru/xml-interfaces
Example of how to request a list of available currencies for payment using the GetCurrencies method via HTTP GET.
```http
https://auth.robokassa.ru/Merchant/WebService/Service.asmx/GetCurrencies?MerchantLogin=demo&Language=ru
```
--------------------------------
### Example CoFPayment Request
Source: https://docs.robokassa.ru/ru/saving
This example demonstrates a complete URL for initiating a payment using a saved card. It includes parameters like MerchantLogin, OutSum, Receipt, Token, and SignatureValue.
```url
https://auth.robokassa.ru/Merchant/Payment/CoFPayment?MerchantLogin=robo-demo&OutSum=1&Receipt=%257B%2522items%2522%253A%255B%257B%2522name%2522%253A%2522%25D0%25A2%25D0%25B5%25D1%2585%25D0%25BD%25B8%25D1%2587%25D0%25B5%25D1%2581%25D0%25BA%25D0%25B0%25D1%258F%2520%25D0%25B4%25D0%25BE%25D0%25BA%25D1%2583%25D0%25BC%25D0%25B5%25D0%25BD%25D1%2586%25D0%25B8%25D1%258F%2522%252C%2522quantity%2522%253A1%252C%2522sum%2522%253A1.00%252C%2522tax%2522%253A%2522none%2522%257D%255D%257D&Token=E1253728-48A9-488D-A045-9954C442AF5C-qNavrXC6Y4&SignatureValue=779cfc2bd6a642977fb4dce8496bdee4
```
--------------------------------
### Example String for Robokassa Signature Calculation
Source: https://docs.robokassa.ru/ru/notifications-and-redirects
An example string demonstrating the values to be concatenated for signature calculation in Robokassa, incorporating ResultUrl2.
```text
robokassa:10:1234829:https%3A%2F%2Ftest.test%2Frobokassa:password1
```
--------------------------------
### SignatureValue with Receipt and Custom Parameter
Source: https://docs.robokassa.ru/ru/pay-interface
Example showing how to include fiscal data (Receipt) and a custom shop parameter (Shp_order).
```text
MerchantLogin:OutSum:InvId:Receipt:Пароль#1:Shp_order=25
```
--------------------------------
### SignatureValue with StepByStep and ResultUrl2
Source: https://docs.robokassa.ru/ru/pay-interface
Example for scenarios involving step-by-step payments and an alternative callback URL (ResultUrl2).
```text
MerchantLogin:OutSum:InvId:StepByStep:ResultUrl2:Пароль#1
```
--------------------------------
### Check Refund Status Request Example
Source: https://docs.robokassa.ru/ru/refund-api
This is an example URL for checking the status of a refund operation. Replace '' with the actual ID obtained from a successful refund creation.
```http
https://services.robokassa.ru/RefundService/Refund/GetState?id=cf15fd52-d2d1-4fc4-b9c0-25310e3bdded
```
--------------------------------
### Example Response for Receipt Status
Source: https://docs.robokassa.ru/ru/second-receipt
This is an example of a successful response when querying a receipt's status. It includes details about the request processing and the specific status of the fiscalization.
```json
{
"Code": "0",
"Description": "ok",
"Statuses": [
{
"Id": "245932797",
"Code": "Done",
"Description": "Done",
"FnNumber": "7381440800567076",
"FiscalDocumentNumber": "3054",
"FiscalDocumentAttribute": "2382159011",
"Num": "1",
"FiscalType": "Income",
"FiscalDate": "21.11.2025 15:51:00"
}
]
}
```
--------------------------------
### Example Signature String for Robokassa
Source: https://docs.robokassa.ru/ru/notifications-and-redirects
This string represents an example of the data that would be used to calculate the signature for a Robokassa request with additional redirect parameters.
```text
robo-demo:1::%7B%22items%22%3A%5B%7B%22name%22%3A%22%5Cu0422%5Cu0435%5Cu0441%5Cu0442%5Cu043e%5Cu0432%5Cu044b%5Cu0439+%5Cu0442%5Cu043e%5Cu0432%5Cu0430%5Cu0440%22%2C%22quantity%22%3A1%2C%22cost%22%3A1%2C%22tax%22%3A%22vat0%22%2C%22payment_object%22%3A%22commodity%22%7D%5D%7D:https%3A%2F%2Frobokassa.com%2F:GET:https%3A%2F%2Fwww.google.com%2F:GET:password1
```
--------------------------------
### Robokassa Graph Component Example
Source: https://docs.robokassa.ru/ru/buynowpaylater
Example of embedding the `` component. It displays payment schedule conditions for specified methods. Requires `merchantLogin`, `outSum`, and `paymentMethod` attributes.
```html
```
--------------------------------
### Initiate Refund JWT Example
Source: https://docs.robokassa.ru/ru/refund-api
This is an example of a JWT string used to initiate a refund. It must be signed using the store's Password3. The payload within the JWT specifies refund details.
```jwt
eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJPcEtleSI6IjAwMDVGODkxLThDQ0QtNDM0Qi04NDU1LTgxNkFGRkZEQkYzNy0wVk9pc1dpa0ZGIiwiUmVmdW5kU3VtIjoxLCJJbnZvaWNlSXRlbXMiOlt7Ik5hbWUiOiLQotC10YHRgtC-0LLRi9C5INGC0L7QstCw0YAtMSIsIlF1YW50aXR5IjoxLCJDb3N0IjoxLCJUYXgiOiJ2YXQyMCIsIlBheW1lbnRNZXRob2QiOiJmdWxsX3BheW1lbnQiLCJQYXltZW50T2JqZWN0IjoiY29tbW9kaXR5In1dfQ.8TLNBdYYyl218qhdssAhs7ldiDIFeLZWh9Pf0UuN3wg
```
--------------------------------
### Example Robokassa Redirect Request
Source: https://docs.robokassa.ru/ru/notifications-and-redirects
This URL demonstrates a sample request to Robokassa, including parameters for additional redirects (SuccessUrl2, FailUrl2) and their methods.
```url
https://auth.robokassa.ru/Merchant/Index.aspx?MerchantLogin=robo-demo&OutSum=1&invoiceID=&Receipt=%257B%2522items%2522%253A%255B%257B%2522name%2522%253A%2522%255Cu0422%255Cu0435%255Cu0441%255Cu0442%255Cu043e%255Cu0432%255Cu044b%255Cu0439%2B%255Cu0442%255Cu043e%255Cu0432%255Cu0430%255Cu0440%22%252C%2522quantity%2522%253A1%252C%2522cost%2522%253A1%252C%2522tax%2522%253A%2522vat0%2522%252C%2522payment_object%2522%253A%2522commodity%2522%257D%255D%257D&SuccessUrl2=https%3A%2F%2Frobokassa.com%2F&SuccessUrl2Method=GET&FailUrl2=https%3A%2F%2Fwww.google.com%2F&FailUrl2Method=GET&SignatureValue=b789721670badc454e3b1a3a1e349fab
```
--------------------------------
### GetCurrencies Method Response Example
Source: https://docs.robokassa.ru/ru/xml-interfaces
Sample XML response from the GetCurrencies method, detailing available currency groups and individual currencies with their properties.
```xml
0
```
--------------------------------
### Create Payment
Source: https://docs.robokassa.ru/ru/quick-start
This example demonstrates how to create a payment request using the Robokassa API. Ensure you have your MerchantLogin and have calculated the SignatureValue correctly.
```APIDOC
## POST /Merchant/Payment/Index
### Description
Initiates a payment request to Robokassa.
### Method
POST
### Endpoint
https://auth.robokassa.ru/Merchant/Payment/Index
### Parameters
#### Request Body
- **MerchantLogin** (string) - Required - Your merchant login ID.
- **OutSum** (string) - Required - The payment amount.
- **InvId** (string) - Required - Your internal invoice/order ID.
- **SignatureValue** (string) - Required - A hash signature for request validation.
### Request Example
```json
{
"MerchantLogin": "demo",
"OutSum": "10.00",
"InvId": "1",
"SignatureValue": ""
}
```
### Response
#### Success Response (200)
Robokassa typically redirects the user to a payment page or returns a success indicator. Specific response fields for this endpoint are not detailed in the source.
#### Response Example
(No specific success response example provided in the source)
```
--------------------------------
### SignatureValue with Multiple Redirects and Methods
Source: https://docs.robokassa.ru/ru/pay-interface
Example demonstrating the inclusion of alternative success and failure redirect URLs, along with their HTTP methods.
```text
MerchantLogin:OutSum:InvId:Receipt:SuccessUrl2:SuccessUrl2Method:FailUrl2:FailUrl2Method:Пароль#1
```
--------------------------------
### Create Split Payment Request (GET)
Source: https://docs.robokassa.ru/ru/split-payments
Use this GET request to initiate a split payment. Ensure all required parameters, including merchant details and item information for receipts, are correctly formatted within the 'invoice' JSON.
```http
https://auth.robokassa.ru/Merchant/Payment/CreateV2?invoice=%7B%22outAmount%22%3A%20700.0%2C%20%22email%22%3A%20%22testlab%40test.ru%22%2C%20%22incCurr%22%3A%20%22BankCard%22%2C%20%22language%22%3A%20%22ru%22%2C%20%22expirationDate%22%3A%20%222024-08-23T12%3A53Z%22%2C%20%22merchant%22%3A%20%7B%22id%22%3A%20%22ru_split_01_shop_01%22%7D%2C%20%22splitMerchants%22%3A%20%5B%7B%22id%22%3A%20%22ru_split_01_shop_01%22%2C%20%22amount%22%3A%20500.0%2C%20%22receipt%22%3A%20%7B%22sno%22%3A%20%22osn%22%2C%20%22items%22%3A%20%5B%7B%22name%22%3A%20%22%5Cu0442%5Cu043e%5Cu0432%5Cu0430%5Cu0440%201%22%2C%20%22quantity%22%3A%202%2C%20%22sum%22%3A%20400.0%2C%20%22tax%22%3A%20%22vat110%22%2C%20%22payment_method%22%3A%20%22full_payment%22%2C%20%22payment_object%22%3A%20%22commodity%22%2C%20%22nomenclature_code%22%3A%20%221231%22%7D%2C%20%7B%22name%22%3A%20%22%5Cu0442%5Cu043e%5Cu0432%5Cu0430%5Cu0440%202%22%2C%20%22quantity%22%3A%201.0%2C%20%22sum%22%3A%20100.0%2C%20%22tax%22%3A%20%22vat120%22%2C%20%22payment_method%22%3A%20%22full_payment%22%2C%20%22payment_object%22%3A%20%22commodity%22%2C%20%22nomenclature_code%22%3A%20%221232%22%7D%5D%7D%7D%2C%20%7B%22id%22%3A%20%22ru_split_02_shop_01%22%2C%20%22amount%22%3A%20200.0%2C%20%22receipt%22%3A%20%7B%22sno%22%3A%20%22usn_income%22%2C%20%22items%22%3A%20%5B%7B%22name%22%3A%20%22%5Cu0442%5Cu043e%5Cu0432%5Cu0430%5Cu0440%203%22%2C%20%22quantity%22%3A%201.0%2C%20%22sum%22%3A%20200.0%2C%20%22tax%22%3A%20%22vat20%22%2C%20%22payment_method%22%3A%20%22full_prepayment%22%2C%20%22payment_object%22%3A%20%22commodity%22%2C%20%22nomenclature_code%22%3A%20%22123456%22%7D%5D%7D%7D%5D%7D&signature=740ecfefbb09deee8e65d01bc00a04c239efab48721170f63184c7f4336238fd
```
--------------------------------
### Initiating a Subsequent Recurring Charge
Source: https://docs.robokassa.ru/ru/recurring-payments
This example demonstrates how to perform a subsequent recurring charge using the 'PreviousInvoiceID' parameter, referencing the initial payment.
```APIDOC
## POST /Merchant/Recurring
### Description
Initiates a subsequent recurring charge using the ID of the initial recurring payment.
### Method
POST
### Endpoint
https://auth.robokassa.ru/Merchant/Recurring
### Parameters
#### Request Body
- **MerchantLogin** (string) - Required - Your merchant login.
- **InvoiceID** (string) - Required - A new, unique identifier for this recurring charge.
- **PreviousInvoiceID** (string) - Required - The InvoiceID of the initial recurring payment.
- **Description** (string) - Required - Description of the payment.
- **SignatureValue** (string) - Required - Security signature for the transaction.
- **OutSum** (string) - Required - The total amount of the payment.
### Request Example
```html
```
### Important Note
A response of "OK+InvoiceId" indicates the operation was created, but not necessarily that the funds were successfully debited. Verify the success of each recurring debit through server notifications (ResultURL/ResultUrl2) or XML interfaces.
```
--------------------------------
### HTTP GET Request for SMS
Source: https://docs.robokassa.ru/ru/sms-notifications
An example of an HTTP GET request to send an SMS notification. It includes all necessary parameters: login, phone, message, and the generated signature.
```HTTP
https://services.robokassa.ru/SMS/?login=demo_merchant&phone=79999999999&message=All%20work%20fine!&signature=6f0ed2dbb08da5a50124a3ee0581a7f6
```
--------------------------------
### Install Robokassa Badge (Custom Theme)
Source: https://docs.robokassa.ru/ru/instructions/tilda/tilda_credit
Customize the appearance of the Robokassa installment badge by specifying theme and color scheme parameters within the script tag. This example uses a dark theme with a primary color scheme.
```html
```
--------------------------------
### Initiate Payment Operation with Robokassa
Source: https://docs.robokassa.ru/ru/buynowpaylater
Use `Robokassa.pay.startOp(options)` to launch a payment operation. Ensure all required options are correctly configured before calling this method.
```javascript
Robokassa.pay.startOp({
orderNumber: "12345",
amount: "100.00",
currency: "RUB",
description: "Payment for order #12345",
payerEmail: "customer@example.com",
payerPhone: "+79001234567",
language: "RU",
successUrl: "https://example.com/success",
failUrl: "https://example.com/fail"
});
```
--------------------------------
### Base64Url Encoded JWT Header Example
Source: https://docs.robokassa.ru/ru/invoice-api
An example of a JWT header that has been converted to its Base64Url encoded representation.
```text
eyJ0eXAiOiJKV1QiLCJhbGciOiJNRDUifQ
```
--------------------------------
### Example JWS Payment Notification from Robokassa
Source: https://docs.robokassa.ru/ru/notifications-and-redirects
This is an example of a payment notification received in JWS format via ResultUrl2. It is base64 encoded.
```jwt
eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiJ9.eyJoZWFkZXIiOnsidHlwZSI6IlBheW1lbnRTdGF0ZU5vdGlmaWNhdGlvbiIsInZlcnNpb24iOiIxLjAuMCIsInRpbWVzdGFtcCI6IjE2OTA0NTQ5ODAifSwiZGF0YSI6eyJzaG9wIjoicm9iby1kZW1vLXRlc3QiLCJvcEtleSI6IjE0RDJCNTIxLTRFQUItNDkyQS05RDkxLTAwRDEyRkYyNEQ1Ny0xTnZIRU5Md2dwIiwiaW52SWQiOiIxMjM0ODI5IiwicGF5bWVudE1ldGhvZCI6IkJhbmtDYXJkIiwiaW5jU3VtIjoiMTAuMDAiLCJzdGF0ZSI6Ik9LIn19.DaanjJ4A2yaGOppIVEj929MGNWU4jHcjAh4_DnFRJzkqvESbVpN5trGg8OlaftyQEldxeQaTF9ykrS7O1BmhPow0ZRv4GwjJQSwHzCGJUOcyVw507PMnRSAIT4oXq_PtKjqjuHQL_bxQxyGxZORoKhzsDwBYl_nMXsY-R_SCXPfvYRDPeJRRlC-HwQscOzyGN1cBHStuh5-w8qHytpaysVlif_XYK1-Lfa3ZsFjNz-2LENGL4CRmKMA2KhUfhNfNWXSA4J2KykfWznAvaY37T__QQHhDyHuIjsUtstG5Jf2aK2CuJY-i9mBTRkXD0U3Y5Lh7lnJQrkXAMBySRvYigQ
```
--------------------------------
### Robokassa.pay.startOp
Source: https://docs.robokassa.ru/ru/sbp-qr-payment
Initiates a payment operation for SBP and returns a payment link. It can optionally display a QR code and trigger a callback upon receiving the link.
```APIDOC
## Robokassa.pay.startOp
### Description
This method creates a payment operation, returns a payment link, and can automatically display a QR code if a container is provided. It also invokes the `onpaymentlink` callback when the link is received. The supported payment method is strictly `SBP`.
### Method
`Robokassa.pay.startOp(options)`
### Parameters
#### Path Parameters
None
#### Query Parameters
None
#### Request Body
##### `options` (object) - Required
- **`merchantLogin`** (string) - Required - The store's login specified in the technical settings.
- **`outSum`** (number) - Required - The amount to pay. Format is a number with a decimal point, e.g., `123.45`.
- **`signature`** (string) - Required - The request checksum.
- **`email`** (string) - Required - The customer's email address.
- **`paymentMethod`** (string) - Required - Must be strictly `"SBP"`.
- **`invId`** (number) - Optional - The invoice number in the store.
- **`receipt`** (string) - Optional - Fiscal data in JSON format.
- **`onpaymentlink`** (function) - Optional - Callback function invoked upon receiving the payment link.
- **`qrContainerId`** (string) - Optional - The ID of the HTML container for the QR code.
- **`qrContainerSize`** (number) - Optional - The size of the QR code in pixels.
- **`shp`** (string) - Optional - Additional custom parameters.
### Request Example
```html
Robokassa SBP QR
```
### Response
#### Success Response
- The method returns a payment link. If `qrContainerId` is provided and valid, a QR code is rendered within that container. The `onpaymentlink` callback receives the payment URL.
#### Response Example
(The actual response is handled via the `onpaymentlink` callback, which returns the URL.)
### Error Handling
- If `qrContainerId` is not provided or the container is not found, the QR code is not displayed, but the link is still returned via `onpaymentlink`.
```
--------------------------------
### Include Robokassa Script
Source: https://docs.robokassa.ru/ru/sbp-qr-payment
Include this script to make the Robokassa.pay.startOp method globally available.
```html
```
--------------------------------
### Call Robokassa.pay.startOp
Source: https://docs.robokassa.ru/ru/sbp-qr-payment
Call this method globally after including the Robokassa script to initiate a payment operation.
```javascript
Robokassa.pay.startOp(...)
```
--------------------------------
### Example Robokassa Payment Request with ResultUrl2
Source: https://docs.robokassa.ru/ru/notifications-and-redirects
This is an example of a payment request URL that includes the ResultUrl2 parameter for an additional notification address.
```url
https://auth.robokassa.ru/merchant/Index.aspx?MerchantLogin=robo-demo-test&OutSum=10&InvID=1234829&ResultUrl2=https%3A%2F%2Ftest.test%2Frobokassa&SignatureValue=b1c4a749de7617e00e19616118808372
```
--------------------------------
### Full HTML Structure for Widget Integration
Source: https://docs.robokassa.ru/ru/iframe
This example shows the complete HTML structure required for widget integration, including the target div with the specified ID and the button that triggers the Robokassa payment rendering.
```html
Это первый блок
Это второй блок
```
--------------------------------
### Base64Url Encoded Invoice Payload Example
Source: https://docs.robokassa.ru/ru/invoice-api
An example of the invoice payload converted to its Base64Url encoded representation. This is the format expected for transmission within the JWT.
```text
ewogICAiTWVyY2hhbnRMb2dpbiI6InJvYm8tZGVtby10ZXN0IiwKICAgIkludm9pY2VUeXBlIjoiT25lVGltZSIsCiAgICJDdWx0dXJlIjoicnUiLAogICAiSW52SWQiOjgwMCwKICAgIk91dFN1bSI6MSwKICAgIkRlc2NyaXB0aW9uIjoiYXMiLAogICAiTWVyY2hhbnRDb21tZW50cyI6Im5vIGNvbW1lbnQiLAogICAiSW52b2ljZUl0ZW1zIjpbCiAgICAgIHsKICAgICAgICAgIk5hbWUiOiLQotC10YHRgjEiLAogICAgICAgICAiUXVhbnRpdHkiOjEsCiAgICAgICAgICJDb3N0IjowLjUsCiAgICAgICAgICJUYXgiOiJ2YXQyMCIsCiAgICAgICAgICJQYXltZW50TWV0aG9kIjoiZnVsbF9wYXltZW50IiwKICAgICAgICAgIlBheW1lbnRPYmplY3QiOiJjb21tb2RpdHkiCiAgICAgIH0sCiAgICAgIHsKICAgICAgICAgIk5hbWUiOiLQotC10YHRgjIiLAogICAgICAgICAiUXVhbnRpdHkiOjEsCiAgICAgICAgICJDb3N0IjowLjUsCiAgICAgICAgICJUYXgiOiJ2YXQwIiwKICAgICAgICAgIlBheW1lbnRNZXRob2QiOiJmdWxsX3ByZXBheW1lbnQiLAogICAgICAgICAiUGF5bWVudE9iamVjdCI6ImNvbW1vZGl0eSIsCiAgICAgICAgICAiTm9tZW5jbGF0dXJlQ29kZSI6IklZVkVUQ1UlWEVeJFglQ15UJlZJVENeUlgmJUVSQ15USVJYJSZFUkNVSVRSWEUmWlglUl5DVElSXlhVRSVaTjFtOUUrMcKmPzVPPzbCpj8xNjgiCiAgICAgIH0KICAgXQp9
```
--------------------------------
### Robokassa.pay.startOp
Source: https://docs.robokassa.ru/ru/buynowpaylater
Initiates a payment operation and returns a payment link. For SBP, the link is displayed as a QR code. The container for the QR code is created and sized by the user.
```APIDOC
## Robokassa.pay.startOp(options)
### Description
Launches a payment operation and returns a payment link. For SBP, the link is displayed as a QR code.
### Method
`Robokassa.pay.startOp(options)`
### Parameters
#### Options Object
- **merchantLogin** (string) - Required - Identifier of the store.
- **outSum** (number (decimal)) - Required - The amount to pay in rubles, using a dot as a separator (e.g., `123.45`).
- **invId** (long) - Optional - Unique invoice number in the store.
- **receipt** (string) - Optional - The receipt, serialized as a JSON string.
- **signature** (string) - Required - Checksum. Formed based on the provided parameters.
- **email** (string) - Required - Customer's email address.
- **onpaymentlink** (function(event)) - Optional - Called upon receiving the payment link: QR, redirect, or deeplink.
- **paymentMethod** (string) - Required - Payment method for obtaining the payment link. Must be strictly `"SBP"`.
- **qrContainerId** (string) - Optional - ID of the HTML element within which the QR code will be displayed. If the element is not provided or not found, the QR code will not be displayed.
- **qrContainerSize** (number) - Optional - Size of the QR code container in pixels.
### Signature Calculation Formulas
- Without `invId` and `receipt`: `MD5(merchantLogin:outSum::Password#1)`
- With `invId`: `MD5(merchantLogin:outSum:invId:Password#1)`
- With `receipt`: `MD5(merchantLogin:outSum::receipt:Password#1)`
- With `receipt` and `invId`: `MD5(merchantLogin:outSum:invId:receipt:Password#1)`
### Example
```javascript
Robokassa.pay.startOp({
merchantLogin: "your_merchant_login",
outSum: 100.50,
invId: 12345,
receipt: JSON.stringify({
items: [
{
name: "Product Name",
quantity: 1,
sum: 100.50,
tax: "vat20"
}
]
}),
signature: "your_calculated_signature",
email: "customer@example.com",
paymentMethod: "SBP",
qrContainerId: "qr-code-container",
qrContainerSize: 200,
onpaymentlink: function(event) {
console.log("Payment link received:", event);
}
});
```
```
--------------------------------
### Start Robokassa Payment via iFrame
Source: https://docs.robokassa.ru/ru/iframe
Initiate the Robokassa payment form by calling `Robokassa.StartPayment` on a button click. Replace demo values with your actual store credentials and order details for production.
```html
```
--------------------------------
### Initialize Payment Form in Test Mode (PHP)
Source: https://docs.robokassa.ru/ru/testing-mode
This PHP example demonstrates how to construct a payment form for Robokassa's test mode. Ensure 'IsTest' is set to 1 and use your store's test credentials. The signature calculation must match the algorithm used in production.
```php