Payment Requests
Manage Payment Requests
Edit, list, and delete payment requests
Edit Payment Request
You can modify existing payment requests to update certain properties.
API Endpoint
- Method: PUT
- URL:
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:
Updatable Parameters
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 |
Example: Edit Product Name
Example: Decrease Total Supply
Note: This is only allowed with payment requests that have the limit
expiration type.
Important Notes for Editing
- You can only decrease the remaining units for payment requests with the
limit
expiration type. - Ensure that you’re only updating the fields that you intend to change.
- The
id
in the URL must match an existing payment request associated with your app. - Any fields not included in the request body will remain unchanged.
List All Payment Requests
Retrieve a list of existing payment requests for your authenticated app.
API Endpoint
- Method: GET
- URL:
https://cloud.handcash.io/v3/paymentRequests
Example
Response
The response will be a JSON object containing an array of payment request objects:
Delete a Payment Request
Delete a payment request that is no longer valid to avoid potential customer confusion.
API Endpoint
- Method: DELETE
- URL:
https://cloud.handcash.io/v3/paymentRequests/{id}
Replace {id}
with the ID of the payment request you want to delete.
Example
Response
A successful deletion will return a 200 OK status code.
Best Practices
- Regularly review and clean up outdated payment requests.
- Use meaningful names and descriptions for your payment requests to easily identify them when listing.
- When editing a payment request, only include the fields you want to change to avoid unintended modifications.
- Always verify the
id
of the payment request you’re modifying or deleting to prevent accidental changes to the wrong request.