Edit Payment Request

You can modify existing payment requests to update certain properties. Two common use cases for editing payment requests are:

  1. Decreasing the remaining units on limit-based payment requests
  2. Changing the product name and/or image URL

To edit a payment request, use the following endpoint:

PUT https://cloud.handcash.io/v3/paymentRequests/{id}

Replace {id} with the ID of the payment request you want to edit.


Authentication

Include your app credentials in the request headers:

App-Id: your-app-id
App-Secret: your-app-secret

Example

Edit product name

curl --request PUT \
     --url https://cloud.handcash.io/v3/paymentRequests/66a2a051d2f2ae72b1f9dd89 \
     --header 'Accept: application/json' \
     --header 'Content-Type: application/json' \
     --header 'App-Id: your-app-id' \
     --header 'App-Secret: your-app-secret' \
     --data '{
       "product": {
         "name": "Updated Haste Hat"
       }
     }'

Decrease total supply

*only allowed with payment requests with limit expiration type

curl --request PUT \
     --url https://cloud.handcash.io/v3/paymentRequests/66a2a051d2f2ae72b1f9dd89 \
     --header 'Accept: application/json' \
     --header 'Content-Type: application/json' \
     --header 'App-Id: your-app-id' \
     --header 'App-Secret: your-app-secret' \
     --data '{
       "decreaseRemainingUnits": 2
     }'

All Updatable Paramerters

ParameterTypeDescription
product.nameStringThe name of the product
product.descriptionStringThe description of the product
product.imageUrlStringURL of the product image
decreaseRemainingUnitsIntegerNumber of units to decrease from remainingUnits
redirectUrlStringURL to redirect users after successful payment
notifications.webhook.webhookUrlStringURL for receiving webhook notifications
notifications.webhook.customParametersObjectCustom parameters to include in webhook notifications
notifications.emailStringEmail address to receive payment notifications
expirationInSecondsIntegerNumber of seconds until the payment request expires