Complete Invoice
- 07 Apr 2022
- 2 Minutes to read
- Contributors
- Print
- DarkLight
- PDF
Complete Invoice
- Updated on 07 Apr 2022
- 2 Minutes to read
- Contributors
- Print
- DarkLight
- PDF
Article summary
Did you find this summary helpful?
Thank you for your feedback
Use the Complete Invoice web service to complete a created invoice that is successfully pre-authorized on PayOne SmartLink interface.
Syntax
POST rest/InvoicesService/completeInvoice
Service Specifications
Property and Information |
|
Input Parameters
Parameter | Description |
merchantID required | An alphanumeric value that represents the Merchant ID. The Payment Gateway operation team provides this value based on the merchant enrollment.
|
authenticationToken required | An alphanumeric value that represents the Authentication Token. The Payment Gateway operation team provides this value based on the merchant enrollment.
|
invoicesDetails required | Array of JSON Objects contains the details for each invoice. The details of each invoice is described in the below table.
|
InvoicesDetails Parameters
Parameter | Description |
invoiceID required | An alphanumeric value that represents the Invoice ID. The invoice ID is a unique value for each invoice.
|
amount required | A numeric value that represents the amount to be used in the completion. The value is in ISO format with no decimal point.
|
currency required | The numeric ISO Code for the currency. The value is in ISO format with no characters. Also, the value is the same as the currency that you sent in the request.
|
Sample Request
Complete Invoice service request contains the details of the Invoice desired to be completed.
It is in JSON format that contains the following details:
- merchantID
- authenticationToken
- invoicesDetails
- invoiceID
- amount
- currency
invoice = { "merchantID" : "testMercahnt",
"authenticationToken" :"N2FiZDRmYTQzNDUzOGM0YTI4N2I5YmZm",
"invoicesDetails":[{
"invoiceID":"30231175",
"amount":"100",
"currency":"840"
}] }
Output Parameters
Parameter | Description |
merchantID required | An alphanumeric value that represents the Merchant ID. The Payment Gateway operation team provides this value based on the merchant enrollment.
|
authenticationToken required | An alphanumeric value that represents the Authentication Token. The Payment Gateway operation team provides this value based on the merchant enrollment.
|
invoicesDetails required | Array of JSON Objects contains the details for each invoice. The details of each invoice is described in the below table.
|
InvoicesDetails Parameters
Parameter | Description |
invoiceID required | An alphanumeric value that represents the Invoice ID sent in the request.
|
amount required | A numeric value represents the completion amount sent in the request. The value is in ISO format with no decimal point.
|
currency required | The numeric ISO Code of the currency for the amount parameter. The value is in ISO format with no characters.
|
status required | A value that represents the status of the completed invoice. For example, Expected values are (success, failed).
|
statusDescreption required | A value that represents the Status Description of the complete transaction.
|
rrn optional | The reference retrieval number of the requested payment.
|
Sample Response
Complete Invoice service returns the response in JSON format.
The returned response contains the following details:
- merchantID
- authenticationToken
- invoicesDetails
- invoiceID
- amount
- currency
- status
- rrn
- statusDescription
{ "authenticationToken" : "ODYxNNTY2ZTI4MmJmMzUyM2VhYmUyMGYx",
"merchantID" : "STSPayOneMerchant" ,
"invoicesDetails":[{
"invoiceID":"30231175",
"amount":"100",
"currency":"840",
"rrn":"840201608161029435230000000000",
"status":"success",
"statusDescription":"INVOICE COMPLETED SUCCESSFULLY"
}]
}