Skip to main content
PUT
/
api
/
external
/
v2
/
subscription-billing-attempts
Update subscription billing attempt
curl --request PUT \
  --url https://subscription-admin.appstle.com/api/external/v2/subscription-billing-attempts \
  --header 'Content-Type: application/json' \
  --data '
{
  "retryingNeeded": true,
  "shop": "<string>"
}
'
import requests

url = "https://subscription-admin.appstle.com/api/external/v2/subscription-billing-attempts"

payload = {
    "retryingNeeded": True,
    "shop": "<string>"
}
headers = {"Content-Type": "application/json"}

response = requests.put(url, json=payload, headers=headers)

print(response.text)
const options = {
  method: 'PUT',
  headers: {'Content-Type': 'application/json'},
  body: JSON.stringify({retryingNeeded: true, shop: '<string>'})
};

fetch('https://subscription-admin.appstle.com/api/external/v2/subscription-billing-attempts', options)
  .then(res => res.json())
  .then(res => console.log(res))
  .catch(err => console.error(err));
const url = 'https://subscription-admin.appstle.com/api/external/v2/subscription-billing-attempts';
const options = {
  method: 'PUT',
  headers: {'Content-Type': 'application/json'},
  body: JSON.stringify({retryingNeeded: true, shop: '<string>'})
};

fetch(url, options)
  .then(res => res.json())
  .then(json => console.log(json))
  .catch(err => console.error(err));
<?php

$curl = curl_init();

curl_setopt_array($curl, [
  CURLOPT_URL => "https://subscription-admin.appstle.com/api/external/v2/subscription-billing-attempts",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => "",
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 30,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => "PUT",
  CURLOPT_POSTFIELDS => json_encode([
    'retryingNeeded' => true,
    'shop' => '<string>'
  ]),
  CURLOPT_HTTPHEADER => [
    "Content-Type: application/json"
  ],
]);

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
  echo "cURL Error #:" . $err;
} else {
  echo $response;
}
package main

import (
	"fmt"
	"strings"
	"net/http"
	"io"
)

func main() {

	url := "https://subscription-admin.appstle.com/api/external/v2/subscription-billing-attempts"

	payload := strings.NewReader("{\n  \"retryingNeeded\": true,\n  \"shop\": \"<string>\"\n}")

	req, _ := http.NewRequest("PUT", url, payload)

	req.Header.Add("Content-Type", "application/json")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(string(body))

}
require 'uri'
require 'net/http'

url = URI("https://subscription-admin.appstle.com/api/external/v2/subscription-billing-attempts")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Put.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n  \"retryingNeeded\": true,\n  \"shop\": \"<string>\"\n}"

response = http.request(request)
puts response.read_body
{
  "retryingNeeded": true,
  "shop": "<string>",
  "applyUsageCharge": true,
  "attemptCount": 123,
  "attemptTime": "2023-11-07T05:31:56Z",
  "billingAttemptId": "<string>",
  "billingAttemptResponseMessage": "<string>",
  "billingDate": "2023-11-07T05:31:56Z",
  "contractId": 123,
  "graphOrderId": "<string>",
  "id": 123,
  "inventorySkippedAttemptCount": 123,
  "inventorySkippedRetryingNeeded": true,
  "lastShippingUpdatedAt": "2023-11-07T05:31:56Z",
  "orderAmount": 123,
  "orderAmountContractCurrency": 123,
  "orderAmountShopCurrency": 123,
  "orderAmountUSD": 123,
  "orderAttributes": [
    {
      "key": "<string>",
      "value": "<string>"
    }
  ],
  "orderCancelledAt": "2023-11-07T05:31:56Z",
  "orderClosed": true,
  "orderClosedAt": "2023-11-07T05:31:56Z",
  "orderConfirmed": true,
  "orderId": 123,
  "orderName": "<string>",
  "orderNote": "<string>",
  "orderProcessedAt": "2023-11-07T05:31:56Z",
  "progressAttemptCount": 123,
  "recurringChargeId": 123,
  "transactionRate": 123,
  "variantList": [
    {
      "image": "<string>",
      "productId": "<string>",
      "productTitle": "<string>",
      "quantity": 123,
      "swapId": 123,
      "title": "<string>",
      "variantId": 123,
      "variantTitle": "<string>"
    }
  ]
}
{
  "retryingNeeded": true,
  "shop": "<string>",
  "applyUsageCharge": true,
  "attemptCount": 123,
  "attemptTime": "2023-11-07T05:31:56Z",
  "billingAttemptId": "<string>",
  "billingAttemptResponseMessage": "<string>",
  "billingDate": "2023-11-07T05:31:56Z",
  "contractId": 123,
  "graphOrderId": "<string>",
  "id": 123,
  "inventorySkippedAttemptCount": 123,
  "inventorySkippedRetryingNeeded": true,
  "lastShippingUpdatedAt": "2023-11-07T05:31:56Z",
  "orderAmount": 123,
  "orderAmountContractCurrency": 123,
  "orderAmountShopCurrency": 123,
  "orderAmountUSD": 123,
  "orderAttributes": [
    {
      "key": "<string>",
      "value": "<string>"
    }
  ],
  "orderCancelledAt": "2023-11-07T05:31:56Z",
  "orderClosed": true,
  "orderClosedAt": "2023-11-07T05:31:56Z",
  "orderConfirmed": true,
  "orderId": 123,
  "orderName": "<string>",
  "orderNote": "<string>",
  "orderProcessedAt": "2023-11-07T05:31:56Z",
  "progressAttemptCount": 123,
  "recurringChargeId": 123,
  "transactionRate": 123,
  "variantList": [
    {
      "image": "<string>",
      "productId": "<string>",
      "productTitle": "<string>",
      "quantity": 123,
      "swapId": 123,
      "title": "<string>",
      "variantId": 123,
      "variantTitle": "<string>"
    }
  ]
}
{
  "retryingNeeded": true,
  "shop": "<string>",
  "applyUsageCharge": true,
  "attemptCount": 123,
  "attemptTime": "2023-11-07T05:31:56Z",
  "billingAttemptId": "<string>",
  "billingAttemptResponseMessage": "<string>",
  "billingDate": "2023-11-07T05:31:56Z",
  "contractId": 123,
  "graphOrderId": "<string>",
  "id": 123,
  "inventorySkippedAttemptCount": 123,
  "inventorySkippedRetryingNeeded": true,
  "lastShippingUpdatedAt": "2023-11-07T05:31:56Z",
  "orderAmount": 123,
  "orderAmountContractCurrency": 123,
  "orderAmountShopCurrency": 123,
  "orderAmountUSD": 123,
  "orderAttributes": [
    {
      "key": "<string>",
      "value": "<string>"
    }
  ],
  "orderCancelledAt": "2023-11-07T05:31:56Z",
  "orderClosed": true,
  "orderClosedAt": "2023-11-07T05:31:56Z",
  "orderConfirmed": true,
  "orderId": 123,
  "orderName": "<string>",
  "orderNote": "<string>",
  "orderProcessedAt": "2023-11-07T05:31:56Z",
  "progressAttemptCount": 123,
  "recurringChargeId": 123,
  "transactionRate": 123,
  "variantList": [
    {
      "image": "<string>",
      "productId": "<string>",
      "productTitle": "<string>",
      "quantity": 123,
      "swapId": 123,
      "title": "<string>",
      "variantId": 123,
      "variantTitle": "<string>"
    }
  ]
}
{
  "retryingNeeded": true,
  "shop": "<string>",
  "applyUsageCharge": true,
  "attemptCount": 123,
  "attemptTime": "2023-11-07T05:31:56Z",
  "billingAttemptId": "<string>",
  "billingAttemptResponseMessage": "<string>",
  "billingDate": "2023-11-07T05:31:56Z",
  "contractId": 123,
  "graphOrderId": "<string>",
  "id": 123,
  "inventorySkippedAttemptCount": 123,
  "inventorySkippedRetryingNeeded": true,
  "lastShippingUpdatedAt": "2023-11-07T05:31:56Z",
  "orderAmount": 123,
  "orderAmountContractCurrency": 123,
  "orderAmountShopCurrency": 123,
  "orderAmountUSD": 123,
  "orderAttributes": [
    {
      "key": "<string>",
      "value": "<string>"
    }
  ],
  "orderCancelledAt": "2023-11-07T05:31:56Z",
  "orderClosed": true,
  "orderClosedAt": "2023-11-07T05:31:56Z",
  "orderConfirmed": true,
  "orderId": 123,
  "orderName": "<string>",
  "orderNote": "<string>",
  "orderProcessedAt": "2023-11-07T05:31:56Z",
  "progressAttemptCount": 123,
  "recurringChargeId": 123,
  "transactionRate": 123,
  "variantList": [
    {
      "image": "<string>",
      "productId": "<string>",
      "productTitle": "<string>",
      "quantity": 123,
      "swapId": 123,
      "title": "<string>",
      "variantId": 123,
      "variantTitle": "<string>"
    }
  ]
}

Headers

X-API-Key
string

Query Parameters

api_key
string

API Key (Deprecated - Use Header X-API-Key instead)

Body

application/json
retryingNeeded
boolean
required
shop
string
required
applyUsageCharge
boolean
attemptCount
integer<int32>
attemptTime
string<date-time>
billingAttemptId
string
billingAttemptResponseMessage
string
billingDate
string<date-time>
contractId
integer<int64>
graphOrderId
string
id
integer<int64>
inventorySkippedAttemptCount
integer<int32>
inventorySkippedRetryingNeeded
boolean
lastShippingUpdatedAt
string<date-time>
orderAmount
number<double>
orderAmountContractCurrency
number<double>
orderAmountShopCurrency
number<double>
orderAmountUSD
number<double>
orderAttributes
object[]
orderCancelReason
enum<string>
Available options:
CUSTOMER,
DECLINED,
FRAUD,
INVENTORY,
STAFF,
OTHER,
$UNKNOWN
orderCancelledAt
string<date-time>
orderClosed
boolean
orderClosedAt
string<date-time>
orderConfirmed
boolean
orderDisplayFinancialStatus
enum<string>
Available options:
PENDING,
AUTHORIZED,
PARTIALLY_PAID,
PARTIALLY_REFUNDED,
VOIDED,
PAID,
REFUNDED,
EXPIRED,
$UNKNOWN
orderDisplayFulfillmentStatus
enum<string>
Available options:
UNFULFILLED,
PARTIALLY_FULFILLED,
FULFILLED,
RESTOCKED,
PENDING_FULFILLMENT,
OPEN,
IN_PROGRESS,
ON_HOLD,
SCHEDULED,
REQUEST_DECLINED,
$UNKNOWN
orderId
integer<int64>
orderName
string
orderNote
string
orderProcessedAt
string<date-time>
partialLinesSkipped
enum<string>
Available options:
INVENTORY_MANAGEMENT,
MANUAL
progressAttemptCount
integer<int32>
recurringChargeId
integer<int64>
securityChallengeSentStatus
enum<string>
Available options:
SENT,
UNSENT,
FAILED,
EMAIL_SETTINGS_DISABLED,
CONTRACT_CANCELLED
status
enum<string>
Available options:
SUCCESS,
FAILURE,
REQUESTING,
PROGRESS,
QUEUED,
SKIPPED,
SOCIAL_CONNECTION_NULL,
CONTRACT_CANCELLED,
CONTRACT_ENDED,
CONTRACT_PAUSED,
AUTO_CHARGE_DISABLED,
SHOPIFY_EXCEPTION,
SKIPPED_DUNNING_MGMT,
SKIPPED_INVENTORY_MGMT,
IMMEDIATE_TRIGGERED,
SECURITY_CHALLENGE,
CONTRACT_PAUSED_MAX_CYCLES,
REFUNDED,
SKIPPED_DEMO_SHOP,
SKIPPED_SHOP_INFO_NOT_FOUND,
SKIPPED_BILLING_DATE_STALE,
SKIPPED_DUNNING_NOT_CONFIGURED,
PENDING_CONSOLIDATION
transactionFailedEmailSentStatus
enum<string>
Available options:
SENT,
UNSENT,
FAILED,
EMAIL_SETTINGS_DISABLED,
CUSTOMER_PAYMENT_EMPTY,
CONTRACT_CANCELLED
transactionFailedSmsSentStatus
enum<string>
Available options:
SENT,
UNSENT,
FAILED,
SMS_SETTINGS_DISABLED,
CUSTOMER_PAYMENT_EMPTY,
CONTRACT_CANCELLED,
PHONE_NUMBER_EMPTY
transactionRate
number<double>
upcomingOrderEmailSentStatus
enum<string>
Available options:
SENT,
UNSENT,
FAILED,
EMAIL_SETTINGS_DISABLED,
CUSTOMER_PAYMENT_EMPTY,
CONTRACT_CANCELLED,
STOP_FROM_CONTRACT,
CONTRACT_PAUSED
upcomingOrderSmsSentStatus
enum<string>
Available options:
SENT,
UNSENT,
FAILED,
SMS_SETTINGS_DISABLED,
CUSTOMER_PAYMENT_EMPTY,
CONTRACT_CANCELLED,
STOP_FROM_CONTRACT,
CONTRACT_PAUSED,
PHONE_NUMBER_EMPTY
usageChargeStatus
enum<string>
Available options:
SUCCESS,
FAILED,
TO_BE_TRIED
variantList
object[]

Response

Billing attempt successfully updated

retryingNeeded
boolean
required
shop
string
required
applyUsageCharge
boolean
attemptCount
integer<int32>
attemptTime
string<date-time>
billingAttemptId
string
billingAttemptResponseMessage
string
billingDate
string<date-time>
contractId
integer<int64>
graphOrderId
string
id
integer<int64>
inventorySkippedAttemptCount
integer<int32>
inventorySkippedRetryingNeeded
boolean
lastShippingUpdatedAt
string<date-time>
orderAmount
number<double>
orderAmountContractCurrency
number<double>
orderAmountShopCurrency
number<double>
orderAmountUSD
number<double>
orderAttributes
object[]
orderCancelReason
enum<string>
Available options:
CUSTOMER,
DECLINED,
FRAUD,
INVENTORY,
STAFF,
OTHER,
$UNKNOWN
orderCancelledAt
string<date-time>
orderClosed
boolean
orderClosedAt
string<date-time>
orderConfirmed
boolean
orderDisplayFinancialStatus
enum<string>
Available options:
PENDING,
AUTHORIZED,
PARTIALLY_PAID,
PARTIALLY_REFUNDED,
VOIDED,
PAID,
REFUNDED,
EXPIRED,
$UNKNOWN
orderDisplayFulfillmentStatus
enum<string>
Available options:
UNFULFILLED,
PARTIALLY_FULFILLED,
FULFILLED,
RESTOCKED,
PENDING_FULFILLMENT,
OPEN,
IN_PROGRESS,
ON_HOLD,
SCHEDULED,
REQUEST_DECLINED,
$UNKNOWN
orderId
integer<int64>
orderName
string
orderNote
string
orderProcessedAt
string<date-time>
partialLinesSkipped
enum<string>
Available options:
INVENTORY_MANAGEMENT,
MANUAL
progressAttemptCount
integer<int32>
recurringChargeId
integer<int64>
securityChallengeSentStatus
enum<string>
Available options:
SENT,
UNSENT,
FAILED,
EMAIL_SETTINGS_DISABLED,
CONTRACT_CANCELLED
status
enum<string>
Available options:
SUCCESS,
FAILURE,
REQUESTING,
PROGRESS,
QUEUED,
SKIPPED,
SOCIAL_CONNECTION_NULL,
CONTRACT_CANCELLED,
CONTRACT_ENDED,
CONTRACT_PAUSED,
AUTO_CHARGE_DISABLED,
SHOPIFY_EXCEPTION,
SKIPPED_DUNNING_MGMT,
SKIPPED_INVENTORY_MGMT,
IMMEDIATE_TRIGGERED,
SECURITY_CHALLENGE,
CONTRACT_PAUSED_MAX_CYCLES,
REFUNDED,
SKIPPED_DEMO_SHOP,
SKIPPED_SHOP_INFO_NOT_FOUND,
SKIPPED_BILLING_DATE_STALE,
SKIPPED_DUNNING_NOT_CONFIGURED,
PENDING_CONSOLIDATION
transactionFailedEmailSentStatus
enum<string>
Available options:
SENT,
UNSENT,
FAILED,
EMAIL_SETTINGS_DISABLED,
CUSTOMER_PAYMENT_EMPTY,
CONTRACT_CANCELLED
transactionFailedSmsSentStatus
enum<string>
Available options:
SENT,
UNSENT,
FAILED,
SMS_SETTINGS_DISABLED,
CUSTOMER_PAYMENT_EMPTY,
CONTRACT_CANCELLED,
PHONE_NUMBER_EMPTY
transactionRate
number<double>
upcomingOrderEmailSentStatus
enum<string>
Available options:
SENT,
UNSENT,
FAILED,
EMAIL_SETTINGS_DISABLED,
CUSTOMER_PAYMENT_EMPTY,
CONTRACT_CANCELLED,
STOP_FROM_CONTRACT,
CONTRACT_PAUSED
upcomingOrderSmsSentStatus
enum<string>
Available options:
SENT,
UNSENT,
FAILED,
SMS_SETTINGS_DISABLED,
CUSTOMER_PAYMENT_EMPTY,
CONTRACT_CANCELLED,
STOP_FROM_CONTRACT,
CONTRACT_PAUSED,
PHONE_NUMBER_EMPTY
usageChargeStatus
enum<string>
Available options:
SUCCESS,
FAILED,
TO_BE_TRIED
variantList
object[]