Creating a Yandex Pay Order¶
Returns a payment link for Yandex Pay.
For scenario using this method, please see “Payment via Yandex Pay“
Request¶
POST /payin/v1/sites/{siteId}/yandex-pay/orders
Path Parameters¶
| Parameter | Required | Type | Description |
|---|---|---|---|
| siteId | Yes | string | Merchant site identifier |
Headers¶
| Header | Required | Type | Description |
|---|---|---|---|
| Authorization | Yes | string | API access key. Bearer [access-token] |
| Content-type | Yes | string | Request content. application/json |
| Accept | No | string | Response content. application/json |
Body Parameters¶
| Parameter | Required | Type | Description |
|---|---|---|---|
| orderUid | Yes | string | Unique identifier of the request in the Merchant’s information system. Unique means that it must differ from all requests of the method within the same siteUid merchant site |
| amount | Yes | object | Information about the amount of the operation |
| successRedirectUrl | Yes | string(1000) | URL for the client redirect after successful payment |
| errorRedirectUrl | Yes | string(1000) | URL for the client redirect in case of an error during payment, or if the order has expired |
| ttl | No | number | The parameter determines the time during which the user can use the payment link. The time is specified in seconds. The minimum time is 180 seconds. The maximum time is 86400 seconds. The default time is 1800 seconds |
| paymentMethods | No | list | The available payment methods for physicists on the YandexPay payment form. The possible options are CARD - payment by bank card, and SPLIT - payment by the Split system. For payments by bank cards and through Split, it is necessary to provide [“CARD”, “SPLIT”]. The final decision on providing payment methods to physicists is made by Yandex, including based on information about the physicist. SPLIT and CARD will be selected by default. |
Request Example¶
Creating a Yandex Pay Order
POST /partner/payin/v1/sites/test-01/yandex-pay/orders HTTP/1.1
Accept: application/json
Authorization: Bearer 5c4b25xx93aa435d9cb8cd17480356f9
Content-type: application/json
Host: b2b-api.qiwi.com
{
"orderUid" : "Test012",
"amount" : {
"value" : "6.00",
"currency" : "RUB"
},
"successRedirectUrl": "https://example.com/redirectUrl",
"errorRedirectUrl": "https://example.com/redirectUrl",
"ttl": 180,
"paymentMethods": ["CARD", "SPLIT"]
}
Response¶
See also HTTP error codes
Successful Response Parameters¶
| Parameter | Required | Type | Description |
|---|---|---|---|
| orderUid | Yes | string | Yandex Pay order creation request identifier |
| orderStatus | Yes | string | Yandex Pay order status |
| amount | Yes | object | Operation amount info |
| paymentUrl | Yes | string | URL of the payment link of the Yandex Pay order |
| createdOn | Yes | string | Date and time of creation of the Yandex Pay order in ISO8601 format |
Error Parameters¶
| Parameter | Required | Type | Description |
|---|---|---|---|
| serviceName | Yes | string | Name of the service that produced the error |
| errorCode | Yes | string | Error code |
| description | Yes | string | Error description for the merchant |
| userMessage | Yes | string | Error description for the customer |
| dateTime | Yes | string | Error date and time |
| traceId | Yes | string | Error Log unique ID |