Update a Stripe Object

Official Content
This documentation is valid for:

Updating an object is similar to creating one. The same 3 steps should be followed:

  • Setting up update options
  • Updating the object using the StripeSDKMain External Object
  • Loading the response or handling errors

Additionally, you need the object Id, which is sent as a parameter on the API call.

    //Set up Update Options 
    &StripeSubscriptionUpdateOptions.Customer = &CustomerId
    &StripeSubscriptionUpdateOptions.Quantity = &SubscriptionQuantity
    
    //Make the API call
    &JSON = &StripeSubscriptionUpdateOptions.ToJson()
    
    &StripeSDKMain.UpdateSubscription(&Api_Key,&SubscriptionId,&JSON,&Response,&Errors,&ErrorCode)
    
    //Handle Errors
    if &ErrorCode = 0
        &StripeSubscriptionUpdateResponse.FromJson(&Response)
        Msg(&StripeSubscriptionUpdateResponse.ToJson())
        &SubscriptionId = &StripeSubscriptionUpdateResponse.id
    else
        &StripeError.FromJson(&Errors)
        Msg(&StripeError.ToJson())
    EndIf


Was this page helpful?
What Is This?
Your feedback about this content is important. Let us know what you think.