Create Invoice
Create Invoice
Header Parameters
- X-Winpay-Timestamp string required
ISO 8601 timestamp
- X-Winpay-Key string required
Client Key
- X-Winpay-Signature string required
Signature
- Content-Type string required
Content type
- application/json
Request Body required
customer object
name stringemail stringphone stringinvoice object
ref stringproducts object[]
Array [name stringqty integerprice string]- back_url string
- interval integer
validity in minutes
Responses
- 201
- 400
- 401
- 500
Sukses create invoice
- application/json
- Schema
- Example (from schema)
Schema
- responseCode string
- responseMessage string
- responseDate string
responseData object
id stringref stringcreated_at stringredirect_url stringback_url stringcustomer object
name stringemail stringphone stringproducts object[]
Array [uuid stringname stringqty integerprice integer]
{
"responseCode": "2010300",
"responseMessage": "Invoice created",
"responseDate": "2023-09-05T09:52:53+07:00",
"responseData": {
"id": "4282f340-51a8-40a2-a0e6-f3c95543ab6f",
"ref": "invoice-0000001",
"created_at": "2023-09-05 09:52:53",
"redirect_url": "https://checkout.bmstaging.id/g5jh1k55lv9",
"back_url": "https://google.com",
"customer": {
"name": "Delina Prasetya",
"email": "[email protected]",
"phone": "082342861666"
},
"products": [
{
"uuid": "89a85713-3aef-4ca1-97ba-a97d4bdcdb8a",
"name": "Keripik Singkong",
"qty": 6,
"price": 20000
},
{
"uuid": "6c79f218-4e1c-4695-8eb7-4c17568bdc81",
"name": "Jasa Kirim",
"qty": 1,
"price": 5000
}
]
}
}
Bad Request
- application/json
- Schema
- Example (from schema)
Schema
- oneOf
- CreateInvoiceInvalidParameters
- CreateInvoiceMerchantRefAlreadyExists
responseCode stringresponseMessage stringresponseDate stringresponseData arrayresponseCode stringresponseMessage stringresponseDate stringresponseData array
{
"responseCode": "4000301",
"responseMessage": "Invalid Parameters",
"responseDate": "2023-09-05T09:43:29+07:00",
"responseData": [
"The invoice.ref field is required."
]
}
Unauthorized / Invalid Signature
- application/json
- Schema
- Example (from schema)
Schema
- oneOf
- CreateInvoiceDontHaveAccess
- CreateInvoiceInvalidSignature
responseCode stringresponseMessage stringresponseDate stringresponseData arrayresponseCode stringresponseMessage stringresponseDate stringresponseData array
{
"responseCode": "4010100",
"responseMessage": "Your have no access to this resource",
"responseDate": "2023-09-05T09:43:29+07:00",
"responseData": []
}
General Error
- application/json
- Schema
- Example (from schema)
Schema
- responseCode string
- responseMessage string
- responseDate string
- responseData array
{
"responseCode": "5000300",
"responseMessage": "General Error",
"responseDate": "2023-09-05T10:00:16+07:00",
"responseData": []
}
Loading...