Searching Operations / Search Cancel Allowance E-invoices

Scenarios

  • Merchant(Business Entity) may use this API to query the canceled allowance invoice information, including output invoices and input invoices, and Green World will reply to the results as a return parameter.
  • This will help Merchant (Business Entity) to integrate the inquiry mechanism for the canceled allowance invoice into the Merchant website and provide a quick inquiry service.

❗ Special Notes :

According to the Ministry of Finance, only the buyer can pass the canceled allowance invoices.

API URLs:

  • Stage: https://einvoice-stage.ecpay.com.tw/B2BInvoice/GetAllowanceInvalid
  • Production: https://einvoice.ecpay.com.tw/B2BInvoice/GetAllowanceInvalid

HTTPS format

  • Content Type :application/json
  • HTTP Method :POST

Request by Merchant (Json format)

PlatformID String(10)

  • Platform merchant ID
  • This parameter is provided by ECPAY to the platform vendor for project cooperation, please bring in the MerchantID bound with the platform vendor.
  • Please leave empty for general vendor.
  • When the platform vendor uses the MerchantID field, it can only bring in the MerchantID that has been bound as a sub-store, otherwise it will cause a failure.
RqHeader Object Required

Request header

Timestamp  Number
Required

  • Please convert the transmission time to a timestamp (GMT+8).
  • ECPay will use this parameter to convert the current time to Unix TimeStamp to verify the time interval of this connection.

❗ Special Notes

  • If ECPay receives the API call is more 10 minutes late than the timestamp sent by merchants, this request will be failed. Reference information is as follows:http://www.epochconverter.com/
  • Merchants are suggested to frequently synchronize the time zone of server to another server of the nearest time zone.

Data String
Required

  • Message payload
  • This is the encrypted data in JSON format.
    AES Encryption Description

Example

				
					{
    "MerchantID": "2000132",
    "RqHeader": {
        "Timestamp": 1525168923
    },
    "Data": "..."
}

				
			

Message payload of Data(Json format) : please urlencode the JSON string firstly and then do AES encryption

AllowanceNo String(16)  
Green World Allowance Number

Example

				
					{
    "MerchantID": "2000132",
    "AllowanceNo": "1909241702402030"
}


				
			

Response format

  • Content Type :application/json
  • HTTP Method :POST

Response by ECPay (Json format)

PlatformID String(10)

MerchantID String(10)
Required

RpHeader Object

Response header

Timestamp  Number

Unix timestamp(GMT+8)

TransCode Int

  • Response code to indicate whether the payload is successfully accepted
  • Possible values:
    1: Payload (i.e. MerchantID, RqHeader, and Data) is successfully accepted by ECPay.
    Others: failed.

TransMsg String(200)

Response message to indicate whether the payload is successfully accepted

Data String

  • Message payload
  • Responde relevant data, this is the encrypted JSON format data。
    AES Encryption Description

Example

				
					{
    "MerchantID": "2000132",
    "RpHeader": {
        "Timestamp": 1525169058
    },
    "TransCode": 1,
    "TransMsg": "",
    "Data": "..."
}

				
			

Message payload of Data(Json format) : please do AES decryption to the Data firstly and then do urldecode.

RtnCode Int

Return codes to indicate whether the API is successfully executed or not.

  • Possible values:
    • 1: API is successfully executed.
    • Others: failed.

RtnMsg String(200)

Return messages to indicate whether the API is successfully executed or not.

RtnData String

Example

				
					{
    "RtnCode": 1,
    "RtnMsg": "Success",
    "RtnData": "..."
}

				
			

Parameters in RtnData

MerchantID String(10)

Merchant ID

AllowanceNo String(16)
Green World Allownace Number
AllowanceNumber String(16)

The allowance number provided by the merchant

SellerId String(8)
BuyerId String(8)
CancelDate String(20)

Cancel Data

  • The format is yyyy-mm-dd
CancelReason String(20)

Cancel Reason

Upload_Status String(1)

E-Invoice upload status

  • If [InvoiceCategory]=0, then this parameter has no value.
  • 0:Not Uploaded
  • 1:Uploaded
  • 2:Upload Failed

Upload_Date String(20)

E-Invoice upload time

  • Format is “yyyy-MM-dd”.
  • If [InvoiceCategory]=0, then this parameter has no value.
ExchangeStatus String(1)
Confirm Status
  • If this parameter has no value, then it is not set. 1:Confirmed 0:Not Confirmed

Remark String(200)

Example

				
					{
    "MerchantID": "200132",
    "AllowanceNo": "1909241702402030",
    "AllowanceNumber": "19092234024023330",
    "SellerId": "23165448",
    "BuyerId": "", 
    "CancelDate": "2019-09-25",
    "CancelReason": "",  
    "Upload_Status": "",
    "Upload_Date": "null",
    "ExchangeStatus": "1",
    "Remark": ""
}




				
			

Copyright © Green World FinTech Service Co., Ltd. All rights reserved.

Green World