Manage Checkout

Applies to: Checkout API

Learn how to update, retrieve, and delete the checkout pages you created.

Link to section

Update a payment link

You can use the UpdatePaymentLink endpoint to update the following payment_link fields:

  • description - The optional description of the payment_link object.
  • checkout_options - You should specify the entire CheckoutOptions object in the update request. If you specify only specific fields, the update operation deletes fields not included in the request.
  • pre_populated_data - You only specify the PrePopulatedData fields that you want to update (or add). If a field you provided in the request doesn't exist, it gets added.

You cannot update the order_id, version, URL, or timestamp fields.

In the following example, you create a checkout page and then call UpdatePaymentLink to apply the updates:

  1. Create a quick pay checkout page for $125 for auto detailing:

    Create payment link

    The following is an example response:

  2. Update the following fields:

    • description - Add a description.
    • checkout_options - Specify a new custom_fields ("Very Special Instructions"). You verify that both the existing custom fields are deleted.
    • pre_populated_data - Specify only the buyer_email and address_line_1 fields. You verify that all other fields are preserved.
    • fields_to_clear - Specify the field to remove checkout_options.allow_tipping.
  3. Run the following UpdatePaymentLink request to apply the updates:

    Update payment link

    Note that fields_to_clear is an array where you provide a comma-separated list of fields to delete. For example:

    "fields_to_clear": [ "checkout_options.allow_tipping", "pre_populated_data.buyer_address" ]

    This deletes the allow_tipping field from checkout_options and the entire buyer_address from pre_populated_data. To delete the entire checkout_options, specify the following:

    "fields_to_clear": [ "checkout_options ]
Link to section

Retrieve payment links

You can retrieve a specific payment link by ID or all the payment links in the account. The Checkout API provides the RetrievePaymentLinks and ListPaymentLinks endpoints. Try using API Explorer to test these endpoints.

Link to section

Delete a payment link

You can use the DeletePaymentLinks endpoint to delete a payment link you created.

Delete payment link

After receiving the request, the endpoint sets the corresponding order state to CANCELED and deletes the checkout link.

{ "id": "KFLXPQROJALW56ZX", "cancelled_order_id": "6nJTzvMv7nA28JSKAgDpxlg3vgFZY" }