E-Invoice
Learn more about payouts APIs and their usage.
If supply is made through E-Commerce then GSTIN of E-Commerce operator can be mentioned hereGuidelines
Below are some of the points you must be aware of while calling Payouts APIs:
All API requests and responses are in JSON format.
POST requests should include
ContentType: application/json
All API response have status, message, and data.
Swipez uses API keys to allow access to the API. Once you have signed up at our merchant site, you will be able to see your AccessKey and SecretKey.
Quick Refer
Authentication
Calling the Authentication APIs allows you to get and verify bearer tokens returned by Swipez. Swipez require these token for all further communication.
Swipez libraries automatically call the Authorize API and internally store the token.
Do not store the token in an insecure manner. Regenerating a new token does not invalidate the already generated token. Token generated from one IP address cannot be used from a different IP address.
Token generated is valid for 60 Min . Please ensure that you get a new token by calling the authorize API once the token has expired.
Rate limiting
The API is rate limited per user. You will receive a 429 HTTP status code if you exceed the rate limit. The rate limit is 30 requests per minute per user and is subject to change.
Get token
POST
/api/token
This endpoint allows you to get API token.
Request Body
access_key_id
string
Your access key.
secret_access_key
string
Your secret key.
Sample code
Save E-invoice
POST
/api/v1/einvoice/save
This endpoint allows you to add E-invoice.
Headers
Authorization
string
Bearer auth token
Content-Type
string
application/json
Request Body
userGstin*
String
GSTIN of the entity initiating E-Invoice
pobCode
String
"This field represents the POB Name for which the user has been given access to initiate any E-Invoice operation.
In case of einvoice, if a POB has been added then, the user has to provide POB in this column. However if POB has not been added, then POB field will be blank"
supplyType*
String
Type of supply whether it is outward/inward. Inward supply is allowed only for E-way bill generation purposes
ntr*
String
Nature of transaction i.e. whether Inter/Intra
docType*
String
"Type of documents. RI - Regular Invoice (Tax Invoice) C - Credit Note D - Debit Note BS - Bill of Supply BOE - Bill of Entry DC - Delivery Challan OTH - Others"
catg*
String
"B2B - Regular B2B Invoices of registered counterparty B2CL - Regular B2CL invoices (Interstate supplies to unregistered dealers or consumers>2.5 lakhs) B2CS - Other than B2CL (unregistered counterparty and consumers) SEWOP – SEZ exports without payment SEWP – SEZ Exports with payment DE – Deemed Exports EXWP - Export with payment of duty EXWOP - Export without payment of duty IMG - Import of Goods OTH - Others"
dst*
String
"Status of Document if O - Original, R -Revised"
trnTyp*
String
Type of transaction is required to identify the type of movement of goods. Whether it is Regular movement or "Bill to - Ship To" movement or "Bill From - Dispatch From" movement or "Bill To - Ship To and Bill From - Dispatch From" movement.
no*
String
"In case of regular invoice, the invoice number is to be provided. It will be as per invoice number rule mentioned in CGST/SGST rule
Debit/Credit Note number also to be captured here"
dt*
String
In case of regular invoice, this is the invoice date. In case of credit/ debit note, this is date on which the credit / debit note is issued.
refinum
String
Original Invoice Number in case of Credit / Debit note
refidt
String
This differential percentage was applicable only till 30th June 2020 and hence it’s a field that is no longer required
rchrg
String
Whether reverse charge is applicable Y or N
pos
String
This is place of supply as per rules. Please refer to state codes in Meta Data Codes sheet
diffprcnt
String
This differential percentage was applicable only till 30th June 2020 and hence it’s a field that is no longer required
etin
String
sgstin
String
"GSTIN of the Supplier. In case user is registered as a normal taxpayer and supply type is outward then this needs to be same as the User GSTIN In case user is registered as a ecommerce operator and supply type is outward then this will be different from User GSTIN whereas In case of inward supplies this can be 15 digit GSTIN or URP in case the supplier is unregistered."
strdNm
String
Address 1 of the Supplier.(Building/Flat no., Road/Street etc.)
slglNm
String
Legal Name as appearing in PAN of the Supplier
sbnm
String
Address 1 of the Supplier.(Building/Flat no., Road/Street etc.)
sflno
String
"Address 2 of the Supplier(Floor no., Name of the premises/building) "
sloc
String
Location of the Supplier (City/Town/Village etc.)
sdst
String
District in which location of supplier is present
sstcd
String
State code of the state where the location of supplier is present
spin
String
Pin code of supplier
sph
String
Phone number/Mobile number of supplier
sem
String
Email id of supplier
bgstin
String
GSTIN of Buyer
btrdNm
String
Trade name of buyerLegal Name as appearing in PAN of the Buyer
blglNm
String
Legal Name as appearing in PAN of the Buyer
bbnm
String
Address 1 of the Buyer.(Building/Flat no., Road/Street etc.)
bflno
String
"Address 2 of the Buyer(Floor no., Name of the premises/building) "
bloc
String
Location of the Buyer (City/Town/Village etc.)
bdst
String
District in which location of buyer is present
bstcd
String
State code of the state where the location of buyer is present
bpin
String
Pin code of buyer
bph
String
Phone number/Mobile number of buyer
bem
String
Email id of buyer
dgstin
String
GSTIN of the person from where goods are dispatched
dtrdNm
String
Name of the company from which goods are dispatched.
dlglNm
String
Legal Name of the entity who dispatch the goods
dbnm
String
" Address 1 of the entity from which goods are dispatched. (Building/Flat no., Road/Street etc.) "
dflno
String
"Address 2 of the entity from which goods are dispatched. (Floor no., Name of the premises/building) "
dloc
String
Location of the entity from which goods are dispatched.
ddst
String
District of the entity from which goods are dispatched.
dstcd
String
State code of the entity from which goods are dispatched.
dpin
String
PIN code of the place of entity from where goods are dispatched.
dph
String
Phone number/mobile number of the party who dispatch the goods
dem
String
Email ID of the party who dispatch the goods
togstin
String
GSTIN of the entity to whom goods are shipped to
totrdNm
String
Trade name of the entity to whom the supplies are shipped to.
tolglNm
String
Legal name of the entity to whom the supplies are shipped to.
tobnm
String
Address1 of the entity to whom the supplies are shipped to. (Building/Flat no., Road/Street etc.)
toflno
String
Address 2 of the entity to whom the supplies are shipped to. (Floor no., Name of the premises/building)
toloc
String
Place of entity to whom the supplies are shipped to. (City/Town/Village etc.)
todst
String
District of the entity to whom goods are shipped to.
tostcd
String
State code to which the supplies are shipped to.
topin
String
PIN code of the location to which the supplies are shipped to.
toph
String
Phone number/Mobile number of the entity to whom goods are shipped to.
toem
String
Email ID of the entity to whom goods are shipped to.
sbnum
String
Shipping bill number of the goods exported
sbdt
String
Shipping bill date of the goods exported
port
String
Port code of the goods exported
cntcd
String
Country to which goods are exported, also applicable in case of export of services
forCur
String
Currency code of the foreign country to which goods/services are exported
invForCur
String
The total amount of the Invoice in foreign currency
totinvval
String
The total value of invoice including taxes/GST and rounded to two decimals maximum. This is required to be adjusted for invoice level other charges, discount and round off value provided in the invoice
totdisc
String
Sum of all discount/rebate/reductions on document level in the Invoice.
totfrt
String
Freight Charges at Invoice Level
totins
String
Insurance at Invoice Level
totothchrg
String
Sum of all other charges on document level in the Invoice.
totpkg
String
Packaging and Forwarding at Invoice Level
tottxval
String
Total of assessable / taxable value of all line items of the invoice
totiamt
String
The IGST amount of all items of the invoice.
totcamt
String
The CGST amount of all items of the invoice.
totsamt
String
The SGST amount of all items of the invoice.
totcsamt
String
This is total cess amount other than State cess including ad valorem as well as non ad valorem
totstcsamt
String
This is total State cess amount that includes ad valorem as well as non ad valorem
rndOffAmt
String
This is rounding off amount e.g. 0.21.
num
String
If an invoice (or a credit/ debit note) has multiple line items, kindly mention a unique serial number for each item, and include the details of each item in a new row separately. If you have only one item, mention Sr. No as 1
prdNm
String
Name of the product
prdDesc
String
Description of Product
hsnCd
String
"HSN code is a 4 to 8 digit uniform code that classifies 5000+ products and is accepted worldwide.
For companies having turnover above 5cr for them it is mandatory to provide minimum 6 digit of HSN code."
barcde
String
if Bar code is maintained for any product, same can be reported in this field
qty
String
The quantity of items (goods or services) that is charged in the Invoice line.
freeQty
String
Detail of any Free of Charge Quantity (FOC)
unit
String
The unit of measure that applies to the invoiced quantity.
unitPrice
String
The price of an item, exclusive of GST
sval
String
(Unit Price * Quantity)
disc
String
Discount given on item level
othchrg
String
Other charges applicable at item level
txval
String
(Total Amount -Discount)
rt
String
The GST rate, represented as percentage that applies to each line item of invoice
irt
String
The IGST rate, represented as percentage that applies to each line item of invoice
iamt
String
IGST amount applicable to each line item of invoice
crt
String
The CGST rate, represented as percentage that applies to each line item of invoice
camt
String
CGST amount applicable to each line item of invoice
srt
String
The SGST rate, represented as percentage that applies to each line item of invoice
samt
String
SGST amount applicable to each line item of invoice
csrt
String
The CESS rate, represented as percentage that applies to each line item of invoice
csamt
String
CESS amount (advalorem) applicable to each line item of invoice
itmVal
String
Sum total of all the taxes and taxable value and other charges in single line item : (taxable value + tax amounts+Other charges)
txp
String
"T - Taxable L - Nil E- Exempt N - Non GST F-Free Supplies"
bchnm
String
Batch number details if any can be mentioned here
bchExpDt
String
Expiry date of goods/services can be mentioned here
bchWrDt
String
Date of warranty of goods can be mentioned here
isServc
String
Specify whether supply is service or not
preTaxVal
String
If pre tax value is different from taxable value, mention the pre-tax value and taxable values separately. In some cases the pre-tax value may be different from taxable value. For example, where old goods are exchanged for new ones (e.g. new phone supplied for INR 20,000 along with exchange of old phone - then pre tax value will be 20,000 and taxable value will be 24,000, assuming exchange value of old phone is 4,000. Another example is in the case of real estate where pre-tax value may be different from taxable value).
ordLineRef
String
Order line reference
orgCntry
String
This is to specify item origin country like mobile phone sold in India could be manufactured in other country.
prdSlNo
String
Serial number in case of each item having a unique number.
attNm
String
Attribute details of the item.
attVal
String
Attribute value of item.
itmgen1
String
Cess Non-Advalorem Rate as required for EWB generation purposes. Allowed values as per Master Codes only. Eg for a product if cess non ad val is 400 per 100, then here value to be inputted in 400. If for some other product it is 4170 per 1000 then value to be inputted is 4170
invRmk
String
Any specific remarks with respect to invoice can be entered here
invStDt
String
Start Date of invoice.
invEndDt
String
End Date of invoice
oinum
String
If user wants to provide in a document, a reference to any preceding invoice or debit note or credit note, then this represents the number of such preceding document. Details can be provided in case of amendments
Sample code
E-invoice cancel
POST
/api/v1/einvoice/cancel
This endpoint allows you to cancel invoice.
Headers
Authorization
string
Bearer auth token
Content-Type
string
application/json
Sample code
E-invoice list
POST
/api/v1/einvoice/list
This endpoint allows you to get invoice list.
Headers
Authorization
string
Bearer auth token
Content-Type
string
application/json
Sample code
Get invoice details
GET
/api/v1/einvoice/details
This endpoint allows you to get the invoice details.
Query Parameters
einvId*
String
Headers
Authorization
string
Bearer auth token
Content-Type
string
application/json
Request Body
String
Sample code
Last updated
Was this helpful?