Edit Payment Request
You can modify existing payment requests to update certain properties. Two common use cases for editing payment requests are:
- Decreasing the remaining units on limit-based payment requests
- 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
Parameter | Type | Description |
---|---|---|
product.name | String | The name of the product |
product.description | String | The description of the product |
product.imageUrl | String | URL of the product image |
decreaseRemainingUnits | Integer | Number of units to decrease from remainingUnits |
redirectUrl | String | URL to redirect users after successful payment |
notifications.webhook.webhookUrl | String | URL for receiving webhook notifications |
notifications.webhook.customParameters | Object | Custom parameters to include in webhook notifications |
notifications.email | String | Email address to receive payment notifications |
expirationInSeconds | Integer | Number of seconds until the payment request expires |
Updated about 1 month ago