Skip to main content

Update Invoice

This API is used for updating invoices

Spesification

API NameUpdate Invoice
Http MethodPUT
Path.../api/update/{id}

The mandatory header that must be sent during a request is header:

HeaderDescription
X-Winpay-TimestampTransaction date and format YYYY-MM-DDTHH:mm:ss+07:00. Time must be in order GMT+7 (Time Jakarta)
X-Winpay-SignatureSignature generated by the merchant
X-Winpay-KeyClient key merchant
Content-Typemust application/json

Request

The following is the body request that must be sent:

ParametersData TypeMandatoryDescription
customerJSON ObjectY-
customer.nameStringYcustomer name
customer.emailStringOemail customer
customer.phoneStringYcustomer phone number
invoiceJSON ObjectY-
invoice.refStringYreference number for the related transaction
invoice.productsArray of JSON ObjectY-
invoice.products[].nameStringYProduct Name
invoice.products[].qtyIntegerYproduct quantity
invoice.products[].priceIntegerYproduct price/amount to be paid
back_urlString URL/Javascript Back CommandYThe URL that is directed to or displayed after the customer completes the payment

Request Sample

{
"customer": {
"name": "Delina Prasetya",
"email": "[email protected]",
"phone": "082342341"
},
"invoice": {
"ref": "111130",
"products": [
{
"name": "01002676",
"qty": 1,
"price": 260000
}
]
},
"back_url": "https://your-invoice-url.com"
}

Response

The following is the body response that will be received:

ParametersData TypeDescription
responseCodeStringrespon code
responseMessageStringmessage respon
responseDateDatedate respon
responseDataJSON Object-
responseData.idStringiD transaction
responseData.refStringReference number for the related transaction
responseData.created_atDateTransaction time is made
responseData.redirect_urlStringurl chackout page
responseData.back urlString URL/Javascript Back CommandThe URL that is directed to or displayed after the customer has completed the payment
responseData.customerJSON Object-
responseData.customer.nameStringcustomer name
responseData.customer.emailStringemail customer
responseData.customer.phoneStringcustomer phone number
responseData.productsArray of JSON Object-
responseData.products[].uuidStringID is for transactions related to products
responseData.products[].nameStringproduct name
responseData.products[].qtyIntegerproduct quantity
responseData.products[].priceIntegerproduct price/amount to be paid

Response Sample

{
"responseCode": "2000300",
"responseMessage": "Invoice Updated",
"responseDate": "2023-10-25T14:12:14+07:00",
"responseData": {
"id": "2edff262-6228-4da1-96d7-729bf9fc85f0",
"ref": "0000001792131232161",
"created_at": "2023-10-25 14:12:14",
"redirect_url": "https://checkout.winpay.id/upu90zxyid",
"back_url": "https://your-invoice-url.com",
"customer": {
"name": "Delina Prasetya",
"email": "[email protected]",
"phone": "082342341"
},
"products": [
{
"uuid": "92cd6096-ab4a-4e79-be61-c4cdbeedd281",
"name": "01002676",
"qty": 1,
"price": 260000
}
]
}
}