Manage Checkout
The Checkout API (see Checkout API Overview) provides endpoints to manage the checkout pages you created. You can update, retrieve, or delete the checkout pages.
You can use the UpdatePaymentLink endpoint to update the following payment_link
fields:
description
- The optional description of thepayment_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:
Create a quick pay checkout page for $125 for auto detailing:
The following is an example response:
Update the following fields:
description
- Add a description.checkout_options
- Specify a newcustom_fields
("Very Special Instructions"). You verify that both the existing custom fields are deleted.pre_populated_data
- Specify only thebuyer_email
andaddress_line_1
fields. You verify that all other fields are preserved.fields_to_clear
- Specify the field to removecheckout_options.allow_tipping
.
Run the following
UpdatePaymentLink
request to apply the updates:Note that
fields_to_clear
is an array where you provide a comma-separated list of fields to delete. For example:This deletes the
allow_tipping
field fromcheckout_options
and the entirebuyer_address
frompre_populated_data
. To delete the entirecheckout_options
, specify the following:
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.
You can use the DeletePaymentLinks endpoint to delete a payment link you created.
After receiving the request, the endpoint sets the corresponding order state to CANCELED
and deletes the checkout link.
If you need more assistance, contact Developer Support or ask for help in the Developer Forums.