KashierDevelopersKashier Developers

Update invoice

curl -X PUT "https://test-api.kashier.io/v2/paymentRequest/string" \  -H "Content-Type: application/json" \  -d '{    "operation": "edit",    "totalAmount": 100,    "description": "Updated invoice",    "customerName": "Ahmed Hassan"  }'
{  "body": {    "paymentRequestId": "PR-XXXXXXXXXX",    "merchantId": "MID-XXXX-XXXX",    "totalAmount": 100,    "currency": "EGP",    "description": "Updated invoice",    "state": "submitted",    "paymentStatus": "unpaid"  },  "message": "success"}

Updates an invoice, or cancels it. Send operation: cancel to cancel an unpaid invoice; send any of the editable fields to change it. Only unpaid invoices can be edited.

Authorization

secretKey
Authorization<token>

Merchant secret key used to identify the merchant, obtained from Kashier's dashboard. Pass the raw secret key value in the Authorization header (NOT a "Bearer" token).

In: header

Path Parameters

paymentRequestId*string

The invoice identifier (e.g., PR-XXXXXXXXXX).

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

The fields to change on an existing invoice. Send operation: cancel to cancel it instead of editing it.

Response Body

application/json

application/json

application/json

application/json

application/json

application/json

PUT
/v2/paymentRequest/{paymentRequestId}