Adding a merchant's delivery methods via the API
You can use the API in Yandex Pay to add any merchant's delivery methods.
Note
Follow the instructions to enable Yandex Pay integration with Yandex Delivery from the merchant's dashboard.
To show the merchant's delivery methods, pass the shipping
object in the order/render response.
Courier delivery
To show the delivery options, add the COURIER
type to shipping.availableMethods
. Yandex Pay will execute the order/render request with the optional shippingAddress
parameter, which will include the user's delivery address. Based on the delivery address, the merchant's backend should calculate the delivery options for the provided address and return a list in availableCourierOptions
.
If the merchant doesn't deliver to the address provided, instead of the availableCourierOptions
list, the backend should return courierOptionsError
with the DELIVERY_NOT_AVAILABLE_FOR_ADDRESS
value. If the merchant's backend fails to process some addresses, it must return the WRONG_ADDRESS
code for them.