Form description request
To request the form description, send a GET request to the address:
https://yoomoney.ru/api/showcase/<pattern_id>
The request is equivalent to downloading a document from a remote server.
We recommend client-side caching for the description of simple forms, since these form descriptions rarely change.
Do not cache subsequent steps in multistep forms, since their state depends on the data entered by the buyer at the first step.
Request
Request format
GET /api/showcase/<pattern_id> HTTP/1.1
Host: yoomoney.ru
Accept-Language: <lang>
Accept-Encoding: <gzip>
If-Modified-Since: <date>
Request URL parameters:
AttributeTypeDescription
pattern_idstringPayment Pattern ID
The request may contain the following HTTP headers:
HeaderDescription
Accept-Language
The code of the language that the client wants to get the form description in, conforming to RFC-5646: Tags for Identifying Languages, IANA Language Subtag Registry.
Possible values:
  • ru — Russian;
  • en — English.
By default: ru
Accept-Encoding
Indicates client support for traffic compression. Supported values: gzip — support for GZIP transfer encoding (RFC-1952: GZIP file format specification).
By default: file compression is not used.
If-Modified-Since
If the payment form description was stored in the client’s cache, it indicates the Last-Modified value for the server’s response to the previous request.
If the client does not cache form descriptions, the header is omitted.
Response
The method returns one of the following responses:
  • the payment form description;
  • indication that the form does not exist;
  • indication that a different form should be used;
  • indication that the form has not changed since the previous request.
Possible HTTP response codes:
HTTP response codeDescription
300 Multiple ChoicesSuccess. The response contains the payment form description. The address for sending the form to is given in the HTTP Location header.
301 Moved PermanentlyA different form should be used instead of the requested payment form. The address of the new form is given in the HTTP Location header. The response body is omitted.
304 Not ModifiedThe payment form description has not changed since the previous request. The response body is omitted.
404 File Not FoundThe requested payment form does not exist or is not allowed to be used. The response body is omitted.
500 Internal Server ErrorThe service is temporarily unavailable for technical reasons.
The server response contains the following special HTTP headers:
HTTP response codeDescription
LocationThe address for sending form data to the server. Alternatively, it is the new address of the form, if a different form should be used.
Content-Encodinggzip, if the client requested traffic compression.
Indicates the client-side caching mode. Possible values:
  • private — the payment form description should be stored on the client side;
  • no-cache — the payment form description must not be cached.
Last-ModifiedDate and time of the latest changes to the form description.
For clarity, some of the examples below are shown as formatted, without compression. The server returns JSON-compact as a compressed format.
Example: Returned description of a simple form or the first step of a multistep form
HTTP/1.1 300 Multiple Choices
Location: https://yoomoney.ru/api/showcase/5551
Content-Type: application/json
Content-Length: 539
Cache-Control: private
Last-Modified: Thu, 17 Jul 2014 09:00:25 GMT

{
  "money_source":
    [
      "wallet",
      "cards",
      "payment-card",
      "cash"
    ],
    "title":"Bill",
    "hidden_fields":{
      "ShopID":"13423",
      "ShopArticleID":"35241",
      "ShowCaseID":"3005",
      "ContractTemplateID":"524867",
      "budgetDocNumber":"0",
      "has_external_status":"",
      "is_withdrawal":""
    },
    "form":
      [
        {
          "type":"text",
          "name":"supplierInn",
          "hint":"10 digits (12 digits for sole proprietors)",
          "label":"Recipient's INN",
          "alert":"Please specify the recipient's INN",
          "required":true,
          "readonly":false,
          "minlength":10,
          "maxlength":12,
          "pattern":"^\\d{10}$|^\\d{12}$"
        },
        {
          "type":"submit",
          "label":"Continue"
        }
      ]
}
Example: Redirection to a new form
HTTP/1.1 301 Moved Permanently
Location: https://yoomoney.ru/api/showcase/5551
Example: The payment form does not exist or is not allowed to be used
HTTP/1.1 404 Not Found
Content-Length: 0