# Paypal Checkout als Gast (API Call)

**URL:** <https://forum.shopware.com/t/paypal-checkout-als-gast-api-call/62200>\
**Category:** Programmierung\
**Created:** [7. Oktober 2019 um 20:28 UTC](https://forum.shopware.com/t/paypal-checkout-als-gast-api-call/62200 "2019-10-07T20:28:15Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![CVDH](https://avatars.discourse-cdn.com/v4/letter/c/4491bb/32.png) [@CVDH](https://forum.shopware.com/u/CVDH)\
**Post date:** [7. Oktober 2019 um 20:28 UTC](https://forum.shopware.com/t/paypal-checkout-als-gast-api-call/62200/1 "2019-10-07T20:28:15Z")

</div>

Hallo,  
Ich möchte Shopware ausschließlich über die API verwenden. Beim einarbeiten stecke ich nun leider fest. Ich habe erfolgreich einen Einkaufswagen erstellt, ein Produkt hineingelegt, und eine Bestellung als Gast getätigt und habe nun das Order Objekt inklusive ID und möchte mit checkout/{orderID}/Pay den Paypal bezahlungsprozess starten. Ich bekomme allerdings folgende Fehlermeldung “CHECKOUT\_\_ASYNC\_PAYMENT\_PROCESS\_INTERRUPTED”&nbsp; “The asynchronous payment process was interrupted due to the following error: Customer is not logged in.” Ist das einstellbar das man als Gast zahlen kann oder ist das mit Paypal garnicht möglich?  
&nbsp;

---

<div class="post-metadata">

**Author:** ![Michael\_Telgmann](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.shopware.com/michael_telgmann/32/20289_2.png) [@Michael\_Telgmann](https://forum.shopware.com/u/Michael_Telgmann)\
**Post date:** [8. Oktober 2019 um 06:53 UTC](https://forum.shopware.com/t/paypal-checkout-als-gast-api-call/62200/2 "2019-10-08T06:53:56Z")

</div>

Hallo,

auch wenn du als Gast eine Bestellung machst, sollte sich normalerweise ein Kunde am SalesChannelContext befinden. Bist du dir sicher, dass du den&nbsp;richtigen Token mitsendest, wenn du die /pay Route aufrufst? Wie sieht die Antwort von&nbsp;/checkout/guest-order aus und wie rufst du dann die /pay Methode auf?

Viele Grüße aus Schöppingen

![cool](https://europe1.discourse-cdn.com/flex013/uploads/shopware/original/1X/86c57fbace799dd4eb1f1b8a2d3bdc1733f0aea1.png "cool")&nbsp;Michael Telgmann

---

<div class="post-metadata">

**Author:** ![CVDH](https://avatars.discourse-cdn.com/v4/letter/c/4491bb/32.png) [@CVDH](https://forum.shopware.com/u/CVDH)\
**Post date:** [8. Oktober 2019 um 11:22 UTC](https://forum.shopware.com/t/paypal-checkout-als-gast-api-call/62200/3 "2019-10-08T11:22:51Z")

</div>

Danke Michael für die Antwort  
Hier ist die Antwort vom Guest-Order:

```
{
  "data": {
    "orderNumber": "10012",
    "currencyId": "b7d2554b0ce847cd82f3ac9bd1c0dfca",
    "currencyFactor": 1,
    "salesChannelId": "98432def39fc4789b33213a56b8c944d",
    "billingAddressId": "1e829f3c5f114426a52070468f998a17",
    "orderDateTime": "2019-10-08T11:14:02+00:00",
    "orderDate": "2019-10-08T00:00:00+00:00",
    "price": {
      "netPrice": 0.01,
      "totalPrice": 0.01,
      "calculatedTaxes": [
        {
          "tax": 0,
          "taxRate": 19,
          "price": 0.01,
          "extensions": []
        }
      ],
      "taxRules": [
        {
          "taxRate": 19,
          "percentage": 100,
          "extensions": []
        }
      ],
      "positionPrice": 0.01,
      "taxStatus": "gross",
      "extensions": []
    },
    "amountTotal": 0.01,
    "amountNet": 0.01,
    "positionPrice": 0.01,
    "taxStatus": "gross",
    "shippingCosts": {
      "unitPrice": 0,
      "quantity": 1,
      "totalPrice": 0,
      "calculatedTaxes": [
        {
          "tax": 0,
          "taxRate": 19,
          "price": 0,
          "extensions": []
        }
      ],
      "taxRules": [
        {
          "taxRate": 19,
          "percentage": 100,
          "extensions": []
        }
      ],
      "referencePrice": null,
      "extensions": []
    },
    "shippingTotal": 0,
    "orderCustomer": {
      "email": "max@musterman.io",
      "orderId": "d1e0916fc5144985b293cf5fb381ee83",
      "salutationId": "82842fa5fcf64e6b98febdb2288ac5dc",
      "firstName": "Max",
      "lastName": "Mustermann",
      "title": null,
      "company": null,
      "customerNumber": "10013",
      "customerId": "ec12935ea7394259b96e1bd9ce78900e",
      "customer": null,
      "salutation": null,
      "order": null,
      "customFields": null,
      "_uniqueIdentifier": "8a4ab9a3e8704f838827fe8d5df62efd",
      "versionId": "0fa91ce3e96a4bc2be4bd9ce752c3425",
      "translated": [],
      "createdAt": "2019-10-08T11:14:02+00:00",
      "updatedAt": null,
      "extensions": {
        "internal_mapping_storage": {
          "_uniqueIdentifier": null,
          "versionId": null,
          "translated": [],
          "createdAt": null,
          "updatedAt": null,
          "extensions": []
        }
      },
      "id": "8a4ab9a3e8704f838827fe8d5df62efd",
      "orderVersionId": "0fa91ce3e96a4bc2be4bd9ce752c3425"
    },
    "currency": null,
    "languageId": "e5512cf459ca463dafdffb8b377bb455",
    "language": null,
    "salesChannel": null,
    "addresses": [
      {
        "countryId": "715c574ba58743db8de8d60c2b30e7bb",
        "countryStateId": null,
        "salutationId": "82842fa5fcf64e6b98febdb2288ac5dc",
        "firstName": "Max",
        "lastName": "Mustermann",
        "street": "vogelstraße",
        "zipcode": "30167",
        "city": "hannover",
        "company": null,
        "department": null,
        "title": null,
        "vatId": null,
        "phoneNumber": null,
        "additionalAddressLine1": null,
        "additionalAddressLine2": null,
        "country": {
          "name": "Germany",
          "iso": "DE",
          "position": 1,
          "taxFree": false,
          "active": true,
          "shippingAvailable": true,
          "iso3": "DEU",
          "displayStateInRegistration": false,
          "forceStateInRegistration": false,
          "states": null,
          "translations": null,
          "orderAddresses": null,
          "customerAddresses": null,
          "salesChannelDefaultAssignments": null,
          "salesChannels": null,
          "customFields": null,
          "_uniqueIdentifier": "715c574ba58743db8de8d60c2b30e7bb",
          "versionId": null,
          "translated": {
            "name": "Germany",
            "customFields": []
          },
          "createdAt": "2019-10-07T07:22:31+00:00",
          "updatedAt": null,
          "extensions": {
            "internal_mapping_storage": {
              "_uniqueIdentifier": null,
              "versionId": null,
              "translated": [],
              "createdAt": null,
              "updatedAt": null,
              "extensions": []
            }
          },
          "id": "715c574ba58743db8de8d60c2b30e7bb"
        },
        "countryState": null,
        "order": null,
        "salutation": null,
        "orderDeliveries": null,
        "orderId": "d1e0916fc5144985b293cf5fb381ee83",
        "customFields": null,
        "_uniqueIdentifier": "1e829f3c5f114426a52070468f998a17",
        "versionId": "0fa91ce3e96a4bc2be4bd9ce752c3425",
        "translated": [],
        "createdAt": "2019-10-08T11:14:02+00:00",
        "updatedAt": null,
        "extensions": [],
        "id": "1e829f3c5f114426a52070468f998a17",
        "orderVersionId": "0fa91ce3e96a4bc2be4bd9ce752c3425"
      }
    ],
    "deliveries": null,
    "lineItems": null,
    "transactions": null,
    "deepLinkCode": "_pDd-cmNdUUki4xxubTaJVchNwT4kuPb",
    "autoIncrement": 39,
    "stateMachineState": {
      "name": "Open",
      "technicalName": "open",
      "stateMachineId": "3f584e8671114a8f86927ce745c71a2b",
      "stateMachine": null,
      "fromStateMachineTransitions": null,
      "toStateMachineTransitions": null,
      "translations": null,
      "orders": null,
      "orderTransactions": null,
      "orderDeliveries": null,
      "fromStateMachineHistoryEntries": null,
      "toStateMachineHistoryEntries": null,
      "customFields": null,
      "_uniqueIdentifier": "be8eab463189413280395e840dbbc7d4",
      "versionId": null,
      "translated": {
        "name": "Open",
        "customFields": []
      },
      "createdAt": "2019-10-07T07:22:31+00:00",
      "updatedAt": null,
      "extensions": {
        "internal_mapping_storage": {
          "_uniqueIdentifier": null,
          "versionId": null,
          "translated": [],
          "createdAt": null,
          "updatedAt": null,
          "extensions": []
        }
      },
      "id": "be8eab463189413280395e840dbbc7d4"
    },
    "stateId": "be8eab463189413280395e840dbbc7d4",
    "customFields": null,
    "documents": null,
    "tags": null,
    "_uniqueIdentifier": "d1e0916fc5144985b293cf5fb381ee83",
    "versionId": "0fa91ce3e96a4bc2be4bd9ce752c3425",
    "translated": [],
    "createdAt": "2019-10-08T11:14:02+00:00",
    "updatedAt": null,
    "extensions": [],
    "id": "d1e0916fc5144985b293cf5fb381ee83",
    "billingAddressVersionId": "0fa91ce3e96a4bc2be4bd9ce752c3425"
  }
}

```

Danach rufe ich die

sales-channel-api/v1/checkout/order/d1e0916fc5144985b293cf5fb381ee83/pay

auf mit dem selben sw-context-token wie vorher beim Order Call (Nochmal geprüft steht im Anfragen Header)  
MFG Christian

---

<div class="post-metadata">

**Author:** ![Michael\_Telgmann](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.shopware.com/michael_telgmann/32/20289_2.png) [@Michael\_Telgmann](https://forum.shopware.com/u/Michael_Telgmann)\
**Post date:** [8. Oktober 2019 um 15:24 UTC](https://forum.shopware.com/t/paypal-checkout-als-gast-api-call/62200/4 "2019-10-08T15:24:13Z")

</div>

Hallo Christian,

ich konnte das Verhalten nachstellen und werde das morgen genauer untersuchen.

Viele Grüße aus Schöppingen

![cool](http://forum.shopware.com/plugins/CKEditor/plugins/smiley/images/shopware.png "cool")&nbsp;Michael Telgmann

---

<div class="post-metadata">

**Author:** ![Michael\_Telgmann](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.shopware.com/michael_telgmann/32/20289_2.png) [@Michael\_Telgmann](https://forum.shopware.com/u/Michael_Telgmann)\
**Post date:** [9. Oktober 2019 um 08:45 UTC](https://forum.shopware.com/t/paypal-checkout-als-gast-api-call/62200/5 "2019-10-09T08:45:07Z")

</div>

Hallo Christian,

ich habe für das Problem mal ein Ticket erstellt&nbsp;[Shopware Issuetracker](https://issues.shopware.com/issues/NEXT-5167) Dort kannst du den Status tracken. Ich habe auch schon einen Fix für das Problem gefunden. Das Problem sollte also bald behoben sein.&nbsp;

Viele Grüße aus Schöppingen

![cool](https://europe1.discourse-cdn.com/flex013/uploads/shopware/original/1X/86c57fbace799dd4eb1f1b8a2d3bdc1733f0aea1.png "cool")&nbsp;Michael Telgmann

---

<div class="post-metadata">

**Author:** ![mii](https://avatars.discourse-cdn.com/v4/letter/m/a9a28c/32.png) [@mii](https://forum.shopware.com/u/mii)\
**Post date:** [9. Dezember 2019 um 15:14 UTC](https://forum.shopware.com/t/paypal-checkout-als-gast-api-call/62200/6 "2019-12-09T15:14:58Z")

</div>

Hallo Michael, Hallo CVDH,

suche eine ganz ähnliche&nbsp;Lösung, der Aufbau ist wie bei&nbsp;CVDH (_siehe Initial Post)_, allerdings ist bei mir der Kunde eingeloggt.&nbsp;  
Beim Aufruf der Sales-Channel-API\*&nbsp;Zahlungsmehtode&nbsp; **POST&nbsp; /sales-channel-api/v1/checkout/order/{orderId}/pay** kommt die Fehlermeldung:

```
code: "CHECKOUT__ASYNC_PAYMENT_PROCESS_INTERRUPTED"
detail: "The asynchronous payment process was interrupted due to the following error"
errorMessage: "Required setting 'ClientId' is missing or invalid"
status: "400"
title: "Bad Request"
length: 1

```

Woher kommt die ClientId?  
Und wie kann diese der Zahlungsmethode mitgeben werden?

Mit freundlichem Gruß, mii  
\* Shopware 6 Doku:&nbsp;[https://docs.shopware.com/en/shopware-platform-dev-en/api/sales-channel-cart-api?category=shopware-platform-dev-en/api](https://docs.shopware.com/en/shopware-platform-dev-en/api/sales-channel-cart-api?category=shopware-platform-dev-en/api)

---

<div class="post-metadata">

**Author:** ![Michael\_Telgmann](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.shopware.com/michael_telgmann/32/20289_2.png) [@Michael\_Telgmann](https://forum.shopware.com/u/Michael_Telgmann)\
**Post date:** [9. Dezember 2019 um 16:01 UTC](https://forum.shopware.com/t/paypal-checkout-als-gast-api-call/62200/7 "2019-12-09T16:01:21Z")

</div>

Hallo mii,

du musst natürlich zuerst die Settings für das PayPal Plugin über den Admin konfigurieren. Du findest nach der Installation des PayPal Plugins einen neuen Reiter “Plugins”, wenn du auf Einstellungen klickst. Hier findest du weitere Infos:&nbsp;[https://docs.shopware.com/de/shopware-6-de/plugins/paypal](https://docs.shopware.com/de/shopware-6-de/plugins/paypal)

Viele Grüße aus Schöppingen

&nbsp;Michael Telgmann

---

<div class="post-metadata">

**Author:** ![CVDH](https://avatars.discourse-cdn.com/v4/letter/c/4491bb/32.png) [@CVDH](https://forum.shopware.com/u/CVDH)\
**Post date:** [21. Mai 2020 um 11:01 UTC](https://forum.shopware.com/t/paypal-checkout-als-gast-api-call/62200/8 "2020-05-21T11:01:29Z")

</div>

Der Fehler tritt seid Update auf 6.2.0 Wieder auf

---

<div class="post-metadata">

**Author:** ![Michael\_Telgmann](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.shopware.com/michael_telgmann/32/20289_2.png) [@Michael\_Telgmann](https://forum.shopware.com/u/Michael_Telgmann)\
**Post date:** [25. Mai 2020 um 07:26 UTC](https://forum.shopware.com/t/paypal-checkout-als-gast-api-call/62200/9 "2020-05-25T07:26:12Z")

</div>

Hallo,

könntest du dafür ein Ticket aufmachen?&nbsp;[https://issues.shopware.com/](https://issues.shopware.com/)

Viele Grüße aus Schöppingen

![cool](https://europe1.discourse-cdn.com/flex013/uploads/shopware/original/1X/86c57fbace799dd4eb1f1b8a2d3bdc1733f0aea1.png "cool")&nbsp;Michael Telgmann
