docs
  1. Resources
  2. Orders
  3. Update Order Billing Status

Update order billing status

v1.204.1
OpenAPI 3.0.3

This is the specification of the SCAYLE Admin API.

For more information about how to interact with the Admin API, you can read the respective developer guide. The developer guide includes code samples for our PHP SDK, for our Java SDK and for JavaScript and curl.

Authentication is done via X-Access-Token HTTP Header as described here.

Base url should be prefixed with /api/admin/v1.

If a client side timeout is deemed necessary, it is recommended to set it at a minimum of 380 seconds.

Server:https://{tenant-space}.admin.api.scayle.cloud/v1
Client Libraries

Orders

​

Update order billing status

​

This endpoint can be used to update order and item billing status, only for the configured set of payment methods. This is mainly helpful if you handle payments outside of SCAYLE.

Please note that Only valid billing status changes are permitted, and any other transition will result in 422 Unprocessable Entity error. Allowed transitions include:

  • billing_payment_pending → billing_completed
  • billing_payment_pending → billing_partially_refunded
  • billing_payment_pending → billing_refunded
  • billing_payment_pending → billing_payment_cancelled

All changes are logged for audit and compliance.

See more details in the Developer Guide.

Path Parameters

  • Order ID

  • The shop key.

  • The shop country code; use shop country ID instead of country code when a country is ambiguous within a shop.

Body·

application/json
  • A string describing the business case behind the update. Kept in the logs for auditing reasons.

  • Target order billing status value

    values
    • billing_completed
    • billing_partially_refunded
    • billing_refunded
    • billing_payment_cancelled
  • An list of order items and their new target billing status.

    Properties: 2

Responses

  • application/json
  • application/json
  • application/json
  • application/json
  • application/json
  • application/json
Request Example for patch/shops/{shopKey}/countries/{countryCode}/orders/{orderId}/billing-status
let billingStatusUpdate = {
  "code": "billing_refunded"
  "reason": "The order is pending payment."
}
const response = await client.apis.Orders.updateOrderBillingStatus({shopKey: "ms", countryCode: "DE", orderId: 123}, {requestBody: billingStatusUpdate});
const order  = response.body;

{
  "address": {
    "billing": {
      "city": "Hamburg",
      "countryCode": "DEU",
      "id": 7353,
      "isDefault": {
        "billing": false,
        "shipping": false
      },
      "recipient": {
        "firstName": "Anna!",
        "gender": "m",
        "lastName": "Fohlmeister",
        "type": "personal"
      },
      "street": "test",
      "zipCode": "1200"
    },
    "forward": {
      "collectionPoint": {
        "type": "post_office"
      },
      "countryCode": "DEU"
    },
    "shipping": {
      "city": "Hamburg",
      "collectionPoint": {
        "customerKey": "bced-234-234",
        "description": "Pedros Kiosk",
        "key": "12345-a",
        "type": "hermes_parcelshop"
      },
      "countryCode": "DEU",
      "houseNumber": "10",
      "id": 7354,
      "isDefault": {
        "billing": false,
        "shipping": false
      },
      "recipient": {
        "firstName": "Anna!",
        "gender": "m",
        "lastName": "Fohlmeister",
        "type": "personal"
      },
      "referenceKey": "InGidcPDmL8fGkv02a3sSAgAr7ySMBfa66iw4MriYgUNI3Boq369rBOZW3stlKLWSqIjB2dXCGNbCxoM5Xww4cI8cULUoGBFJHH0",
      "street": "Domstrasse",
      "zipCode": "20459"
    }
  },
  "basketKey": "imported-basket",
  "confirmedAt": "2018-01-20T11:30:15+00:00",
  "contacts": [
    {
      "type": "carrier"
    }
  ],
  "cost": {
    "appliedFees": [
      {
        "amount": {
          "withTax": 200,
          "withoutTax": 168
        },
        "category": "delivery",
        "key": "least_packages",
        "option": "deliveryCosts",
        "tax": {
          "vat": {
            "amount": 32,
            "rate": 0.19
          }
        }
      },
      {
        "amount": {
          "withTax": 190,
          "withoutTax": 153
        },
        "category": "delivery",
        "key": "home_delivery_service_fee",
        "option": "homeDeliveryServiceFee",
        "tax": {
          "vat": {
            "amount": 37,
            "rate": 0.24
          }
        }
      }
    ],
    "costCapture": 1390,
    "tax": {
      "vat": {
        "amount": 222
      }
    },
    "withTax": 1390,
    "withTaxWithMembershipDiscountWithoutServiceCosts": 1190,
    "withoutTax": 1168,
    "withoutTaxWithMembershipDiscount": 1168
  },
  "createdAt": "2018-01-20T09:30:15+00:00",
  "currencyCode": "EUR",
  "legacyCustomData": {
    "key": "value",
    "origin": "data-importer"
  },
  "customer": {
    "createdAt": "2021-11-29T16:39:02+00:00",
    "email": "[email protected]",
    "firstName": "Sylvia",
    "gender": "m",
    "groups": [
      "new",
      "initial-data"
    ],
    "id": 1,
    "lastName": "McCullough",
    "publicKey": "customer-a5666d13bcadd56342da3644681e96c0",
    "referenceKey": "InGidcPDmL8fGkv02a3sSAgAr7ySMBfa66iw4MriYgUNI3Boq369rBOZW3stlKLWSqIjB2dXCGNbCxoM5Xww4cI8cULUoGBFJHH0",
    "status": {
      "isActive": true,
      "isGuestCustomer": false
    },
    "title": "Dr.",
    "type": "personal",
    "updatedAt": "2021-12-03T10:58:37+00:00"
  },
  "detailedStatus": {
    "billing": {
      "code": "billing_payment_pending",
      "name": "Zahlung reserviert"
    },
    "order": {
      "code": "order_delegated",
      "name": "Delegated"
    },
    "shipping": {
      "code": "shipping_delivered",
      "name": "Ware versendet"
    }
  },
  "id": 901,
  "items": [
    {
      "createdAt": "2018-01-20T09:30:15+00:00",
      "currency": "EUR",
      "legacyCustomData": {
        "key": "value"
      },
      "id": 10976510,
      "key": "e3f0643cd35403f954828e745797260b",
      "merchant": {
        "referenceKey": "m1"
      },
      "packageId": 45,
      "price": {
        "overrideWithTax": 0,
        "overrideWithoutTax": 0,
        "tax": {
          "vat": {
            "amount": 190,
            "rate": 0.19
          }
        },
        "undiscountedWithOutTax": 1000,
        "undiscountedWithTax": 1190,
        "withTax": 1190,
        "withoutTax": 1000
      },
      "product": {
        "id": 4564545
      },
      "status": "delivered",
      "variant": {
        "id": 1234567,
        "referenceKey": "563843898",
        "stock": {
          "supplierId": 1
        }
      },
      "delegatedAt": "2018-01-20T09:40:15+00:00",
      "shippedAt": "2018-01-21T09:30:15+00:00"
    }
  ],
  "packages": [
    {
      "deliveryDate": {
        "maximum": "2018-02-05",
        "minimum": "2018-02-05"
      },
      "deliveryStatus": "shipment_completed",
      "id": 45,
      "shipmentKey": "shpmnt-61-1",
      "tracking": {
        "id": "shpmnt-61-1"
      },
      "shippedAt": "2018-01-21T09:30:15+00:00"
    }
  ],
  "payment": [
    {
      "amount": 1190,
      "data": {
        "CCBrand": "VISA",
        "CCExpiry": "202005",
        "IPCity": "charlottenburg",
        "IPLatitude": "52.5151",
        "IPLongitude": "13.3053",
        "IPState": "berlin",
        "IPZone": "276",
        "IPZoneA2": "de"
      },
      "key": "accounting",
      "transactionKey": "creditcard-abcde"
    }
  ],
  "publicKey": "666",
  "referenceKey": "InGidcPDmL8fGkv02a3sSAgAr7ySMBfa66iw4MriYgUNI3Boq369rBOZW3stlKLWSqIjB2dXCGNbCxoM5Xww4cI8cULUoGBFJU2",
  "shipping": {
    "carrierGroup": "dhl",
    "deliveryCosts": 200,
    "expressDeliveryCosts": 0,
    "policy": "least_packages"
  },
  "status": "payment_reserved",
  "updatedAt": "2018-01-20T09:30:15+00:00",
  "vouchers": [
    {
      "applicableItems": [
        {
          "isApplied": false,
          "key": "e3f0643cd35403f954828e745797260b"
        }
      ],
      "code": "fashion2020",
      "id": 346,
      "type": "relative",
      "value": 1000,
      "voucherId": 0
    }
  ],
  "shopCountry": {
    "id": 5502,
    "shopKey": "msde",
    "countryCode": "DE",
    "defaultLanguageCode": "en_GB",
    "supportedLanguageCodes": [],
    "priceGroupKey": null,
    "url": "www.example.com",
    "active": true,
    "currencyCode": null,
    "deleted": false
  },
  "channel": {
    "id": 123,
    "key": "channel-key",
    "name": "Channel name",
    "type": "marketplace"
  }
}

Models

​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​

Last updated: December 02, 2026