Error when testing checkout API with Stripe "Cannot complete the checkout without any transactions."

Hello,

I am trying to complete a checkout with the /checkout API integrated with Stripe, following this documentation: https://shopify.dev/tutorials/complete-a-sales-channel-payment-with-checkout-api#integrate-stripe-with-your-sales-channel-app

I am getting this response on my final request:

Request:

curl --location --request POST 'https://

(error) Response:

```javascript
422 Unprocessable Entity

{
    "errors": {
        "base": [
            {
                "code": "missing_transactions",
                "message": "Cannot complete the checkout without any transactions.",
                "options": {}
            }
        ]
    }
}

Some details about my Shopify Shop, and Stripe setup:

  • I have Shopify Payments enabled

  • test mode is on:

  • I successfully placed an order though the shop’s website with CC# 4242 4242 4242 4242

  • I have a test Stripe Connect account for my “customer”

  • I can successfully get a Stripe token generated for the customer

Here is my flow:

  1. create a checkout POST https://{{store_name}}.myshopify.com/admin/api/{{api_version}}/checkouts.json

  2. Save checkout.token, and checkout.shopify_payments_account_id from the response

  3. Get Stripe token for customer:

curl --location --request POST 'https://api.stripe.com/v1/tokens' \
--header 'Content-Type: application/x-www-form-urlencoded' \
--header 'Stripe-Account: {{shopify_payments_account_id}}' \
--header 'Authorization: Bearer {{stripe-token}}' \
--data-urlencode 'customer=

4. save **id** from response "id: <tok_stripe-vault-token>"

5. complete checkout with Stripe token (request above)

Should we be able to complete a checkout using Shopify /checkout API + Stripe-Connect Test Accounts?
1 Like

Answer:

I was using the wrong endpoint:

final request should go to /payments.json, not /complete.json

url --location --request POST 'https://
1 Like

Hey!

I think you want to use a different endpoint:

/admin/checkouts/#{token}/payments.json

documented on this page https://shopify.dev/tutorials/complete-a-sales-channel-payment-with-checkout-api#integrate-stripe-with-your-sales-channel-app

1 Like