How to specify a payment method for an order when creating and get a payment url

How to specify a payment method for an order when creating and get a payment url

natalia10
Visitor
2 0 0

We integrate the site with a mobile application. The application interacts with the site through webhooks to our proxy server. Our server sends corresponding requests to shopify via api.

It is necessary to make a webhook of payment by card. https://docs.imshop.io/api/dopolnitelnye-integracii/acquiring-webhook#oplata-kartoi The application transmits the following data in the webhook
{
"command": "create",
"paymentMethodId": "sberbank/card",
"orderUuid": "cbc85e53-8067-4f13-a708-11d9aea71bf3",
"orderId": "12345",
"returnUrl": "imshop://payment/failed"
}

We need to provide the following data in response
{
"success": true,
"paymentId": "7d0567f9-bf37-4e84-9580-86b68b8a0e81",
"paymentUrl": "https://kassa.yandex.ru/payment/xxxxxxxxxxxxxxx",
"successRegex": "payment/(.+)/success",
"failureRegex": "payment/(.+)/failed"
}

 

On the site, payment is made using the robokassa-payment-gateway application. When ordering on the website after clicking payment, the user is redirected to a link like https://ru.age-of-innocence.com/8599044193/checkouts/048b6a609e220dd580cb364d0984f3cc/forward?comple... and a redirect to the payment gateway page takes place.

 

Now, when creating an order via api, a manual payment method is automatically set.

 

Is it possible using graphql or rest api to set the gateway of the robokassa application as the payment method and get the url for payment? Or do we need to use the Sales Channel SDK? When using the Sales Channel SDK, will it be possible to set a payment gateway of the robokassa app for an order? This method is displayed on the Payments tab in the store settings.

 

Is it right that i can't grant read_checkout scope for private app? https://community.shopify.com/c/shopify-apis-and-sdks/unable-to-grant-the-read-checkout-scope-permis...

 

Some documentation of third party application that is used as a payment gateway https://trademinister.ru/blogs/shopify-ru/robokassa-shopify-payment-gateway-for-russia

 

Replies 0 (0)