- Guides
- API Reference
- Appendix
Create a direct payment
POST
https://test-api.star-saas.com/v1/authorise
Request
Header Params
Content-Type
string
required
Example:
application/x-www-form-urlencoded
Body Params application/json
merchant_id
string
required
<= 7 characters
Example:
701001
account_id
string
required
<= 10 characters
Example:
701001010
order_no
string
required
<= 50 characters
Example:
1726891254563
amount
string
required
<= 15 characters
Example:
10.36
item_total
string
optional
<= 15 characters
Example:
10.00
shipping
string
optional
<= 15 characters
Example:
1.00
handling
string
optional
<= 15 characters
Example:
1.00
tax_total
string
optional
<= 15 characters
Example:
1.00
insurance
string
optional
<= 15 characters
Example:
1.00
shipping_discount
string
optional
<= 15 characters
Example:
1.00
discount
string
optional
<= 15 characters
Example:
1.00
website
string
required
<= 2000 characters
Example:
website.com
items
string
required
<= 5000 characters
Example:
huawei#,#NUM1#,#230.00#,#1#;#Test2#,#NUM2#,#290.00#,#2
note
string
optional
<= 1000 characters
Example:
shopper_id
string
required
<= 64 characters
Example:
apidog1
shopper_email
string
required
<= 100 characters
Example:
apidog@gmail.com
shopper_ip
string
required
<= 50 characters
Example:
219.78.45.63
shopper_phone
string
optional
<= 50 characters
Example:
13012345678
shopper_level
string
optional
<= 50 characters
Example:
1
open3d
string
optional
do3DS: try 3D
no3DS: non 3d
<= 10 characters
Example:
do3DS
token_flag
string
optional
YES: Tokenize the card information
NO: Do Not tokenize the card information
This parameter is required when Token is used
<= 10 characters
Example:
NO
token_id
string
optional
Note: The expiration date of token_id is the same as the card expiration date; Once a token is expired new token need to be created during a new payment process
<= 50 characters
Example:
card
string
required
This parameter can be Null/Default if parameter {token_id} is used
<= 20 characters
Example:
4242424242424242
expiration_month
string
required
This parameter can be Null/Default if parameter {token_id} is used
<= 2 characters
Example:
12
expiration_year
string
required
This parameter can be Null/Default if parameter {token_id} is used
<= 4 characters
Example:
2030
security_code
string
required
This parameter can be Null/Default if parameter {token_id} is used
<= 4 characters
Example:
321
first_name
string
required
<= 100 characters
Example:
Milton
last_name
string
required
<= 100 characters
Example:
Braganza
notify_url
string
required
<= 500 characters
Example:
{{webUrl}}/v1/pages/NotifyResult.jsp
document
string
optional
<= 50 characters
Example:
birth_date
string
optional
<= 10 characters
Example:
02-02-1920
billing_country
string
optional
This parameter is required for tangible goods
<= 2 characters
Example:
CN
billing_state
string
optional
This parameter is required for tangible goods and when the country is United States or Canada
<= 100 characters
Example:
FJ
billing_city
string
optional
This parameter is required for tangible goods
<= 100 characters
Example:
Xiamen
billing_address
string
optional
This parameter is required for tangible goods
<= 300 characters
Example:
3610 Brighton Circle Road
billing_postal_code
string
optional
This parameter is required for tangible goods
<= 100 characters
Example:
56376
os
string
optional
<= 100 characters
Example:
Win10
browser
string
optional
<= 2000 characters
Example:
Mozilla/5.0 (Windows NT 10.0; WOW64) …
browser_lang
string
optional
<= 300 characters
Example:
en-US
time_zone
string
optional
<= 50 characters
Example:
8
resolution
string
optional
<= 50 characters
Example:
1920x1080
cookie_new
string
optional
Example:
billing_country=US&shopper_email=test@test.com&time_zone=8&order_no=ter56789&lang=en_US&IP=127.0.0.1&$$billing_country=US&shopper_email=test@test.com&time_zone=8&order_no=ter1234&lang=en_US&shopper_ip=127.0.0.1&
<= 1000 characters
Example:
billing_country=US&shopper_email=test@ company.com&time_zone=....
cookie_old
string
optional
Example:
billing_country=US&shopper_email=test@test.com&time_zone=8&order_no=ter1234&lang=en_US&shopper_ip=127.0.0.1&
<= 1000 characters
Example:
billing_country=US&shopper_email=test@ company.com&time_zone=....
challenge_window_size
string
optional
'01': ['250px', '400px']
'02': ['390px', '400px'] - The default window size
'03': ['500px', '600px']
'04': ['600px', '400px']
'05': ['100%', '100%']
<= 2 characters
Example:
01
session_id
string
optional
<= 50 characters
Example:
delivery_firstname
string
optional
<= 100 characters
Example:
Li
delivery_lastname
string
optional
<= 100 characters
Example:
Han
delivery_country
string
optional
<= 100 characters
Example:
CN
delivery_state
string
optional
<= 100 characters
Example:
FJ
delivery_city
string
optional
<= 100 characters
Example:
Xiamen
delivery_address
string
optional
<= 300 characters
Example:
3610 Brighton Circle Road
delivery_postal_code
string
optional
This parameter is required for tangible goods and when the country is United States or Canada
<= 100 characters
Example:
56376
custom
string
optional
Example:
custom1;custom2;custom3;custom4;custom5
<= 2500 characters
Example:
installments
string
optional
<= 2 characters
Example:
installments_id
string
optional
<= 50 characters
Example:
device_fingerprint
string
optional
<= 200 characters
Example:
encryption_data
string
required
encryption_data=sha256(merchant_id + account_id +order_no + currency +amount + first_name + last_name + card + expiration_year + expiration_month+ security_code + shopper_email + sign_key);
All encryption parameters need to remove spaces before encryption.
<= 64 characters
Example:
{{sign}}
platform_source
string
optional
Acceptable Value: Magento, Shopify, Shoplazza, Shopyy, Shopline, WooCommerce, Zencart, SAAS
<= 30 characters
Example:
Shopify
device_type
string
optional
PC
, Mobile
<= 20 characters
Example:
PC
order_type
string
optional
WEB
, PHONE
, DYNAMIC_PHONE
, MOBILE
, MOBILE_IN_STORE
, IOS
, ANDROID
, WAP
, STORE
, MERCHANT_EMPLOYEE
, MAIL_ORDER
, AUTOMATIC_RENEWAL_OR_INSTALLMENT_PAYMENT
, MERCHANT_INITIATED
, UNKNOWN
, POS
, API_ONLY
, PERSONAL_POS
, PHONE_LINK
<= 50 characters
Example:
WEB
checkout_time
number
optional
Example:
1415273168
user_agent
string
optional
<= 2000 characters
Example:
Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/47.0.2526.73 Safari/537.36
forter_token_cookie
string
optional
<= 128 characters
Example:
cart_items
array [object {1}]
optional
basic_item_data
object
optional
account_owner
array [object {9}]
optional
first_name
string
optional
<= 75 characters
last_name
string
optional
<= 75 characters
email
string
optional
<= 256 characters
account_id
string
optional
<= 100 characters
created
number
optional
past_orders_count
number
optional
past_orders_sum
number
optional
lastLogin_ip
string
optional
<= 50 characters
registration_ip
string
optional
<= 50 characters
total_discount
array [object {2}]
optional
coupon_code_used
string
optional
<= 15 characters
discount_type
string
optional
<= 25 characters
additional_information
array [object {1}]
optional
mpi_info
object
optional
price_id
string
optional
<= 50 characters
quote_id
string
optional
<= 50 characters
quote_price
string
optional
<= 15 characters
Example
{
"merchant_id": "701001",
"account_id": "701001010",
"order_no": "1726891254563",
"currency": "USD",
"amount": "10.36",
"item_total": "10.00",
"shipping": "1.00",
"handling": "1.00",
"tax_total": "1.00",
"insurance": "1.00",
"shipping_discount": "1.00",
"discount": "1.00",
"website": "website.com",
"items": "huawei#,#NUM1#,#230.00#,#1#;#Test2#,#NUM2#,#290.00#,#2",
"note": "",
"shopper_id": "apidog1",
"shopper_email": "apidog@gmail.com",
"shopper_ip": "219.78.45.63",
"shopper_phone": "13012345678",
"shopper_level": "1",
"open3d": "do3DS",
"token_flag": "NO",
"token_id": "",
"card": "4242424242424242",
"expiration_month": "12",
"expiration_year": "2030",
"security_code": "321",
"first_name": "Milton",
"last_name": "Braganza",
"notify_url": "{{webUrl}}/v1/pages/NotifyResult.jsp",
"document": "",
"birth_date": "02-02-1920",
"billing_country": "CN",
"billing_state": "FJ",
"billing_city": "Xiamen",
"billing_address": "3610 Brighton Circle Road",
"billing_postal_code": "56376",
"os": "Win10",
"browser": "Mozilla/5.0 (Windows NT 10.0; WOW64) …",
"browser_lang": "en-US",
"time_zone": "8",
"resolution": "1920x1080",
"cookie_new": "billing_country=US&shopper_email=test@ company.com&time_zone=.... ",
"cookie_old": "billing_country=US&shopper_email=test@ company.com&time_zone=.... ",
"challenge_window_size": "01",
"session_id": "",
"delivery_firstname": "Li",
"delivery_lastname": "Han",
"delivery_country": "CN",
"delivery_state": "FJ",
"delivery_city": "Xiamen",
"delivery_address": "3610 Brighton Circle Road",
"delivery_postal_code": "56376",
"custom": "",
"installments": "",
"installments_id": "",
"device_fingerprint": "",
"encryption_data": "{{sign}}",
"platform_source": "Shopify",
"device_type": "PC",
"order_type": "WEB",
"checkout_time": 1415273168,
"user_agent": "Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/47.0.2526.73 Safari/537.36",
"forter_token_cookie": "",
"cart_items": [
{
"basic_item_data": {
"name": "string",
"quantity": "string",
"type": "string",
"price": {
"amount_usd": 0,
"amount_local_currency": 0,
"currency": "str"
},
"category": "string",
"productId": "string"
}
}
],
"account_owner": [
{
"first_name": "string",
"last_name": "string",
"email": "string",
"account_id": "string",
"created": 0,
"past_orders_count": 0,
"past_orders_sum": 0,
"lastLogin_ip": "string",
"registration_ip": "string"
}
],
"total_discount": [
{
"coupon_code_used": "string",
"discount_type": "string"
}
],
"additional_information": [
{
"mpi_info": {
"eci": "st",
"cavv": "string",
"xid": "string",
"dsTransID": "string"
}
}
],
"price_id": "string",
"quote_id": "string",
"quote_price": "string"
}
Request samples
Shell
JavaScript
Java
Swift
Go
PHP
Python
HTTP
C
C#
Objective-C
Ruby
OCaml
Dart
R
Request Request Example
Shell
JavaScript
Java
Swift
curl --location --request POST 'https://test-api.star-saas.com/v1/authorise' \
--header 'Content-Type: application/json' \
--data-raw '{
"merchant_id": "701001",
"account_id": "701001010",
"order_no": "1726891254563",
"currency": "USD",
"amount": "10.36",
"item_total": "10.00",
"shipping": "1.00",
"handling": "1.00",
"tax_total": "1.00",
"insurance": "1.00",
"shipping_discount": "1.00",
"discount": "1.00",
"website": "website.com",
"items": "huawei#,#NUM1#,#230.00#,#1#;#Test2#,#NUM2#,#290.00#,#2",
"note": "",
"shopper_id": "apidog1",
"shopper_email": "apidog@gmail.com",
"shopper_ip": "219.78.45.63",
"shopper_phone": "13012345678",
"shopper_level": "1",
"open3d": "do3DS",
"token_flag": "NO",
"token_id": "",
"card": "4242424242424242",
"expiration_month": "12",
"expiration_year": "2030",
"security_code": "321",
"first_name": "Milton",
"last_name": "Braganza",
"notify_url": "https://test-api.star-saas.com/v1/pages/NotifyResult.jsp",
"document": "",
"birth_date": "02-02-1920",
"billing_country": "CN",
"billing_state": "FJ",
"billing_city": "Xiamen",
"billing_address": "3610 Brighton Circle Road",
"billing_postal_code": "56376",
"os": "Win10",
"browser": "Mozilla/5.0 (Windows NT 10.0; WOW64) …",
"browser_lang": "en-US",
"time_zone": "8",
"resolution": "1920x1080",
"cookie_new": "billing_country=US&shopper_email=test@ company.com&time_zone=.... ",
"cookie_old": "billing_country=US&shopper_email=test@ company.com&time_zone=.... ",
"challenge_window_size": "01",
"session_id": "",
"delivery_firstname": "Li",
"delivery_lastname": "Han",
"delivery_country": "CN",
"delivery_state": "FJ",
"delivery_city": "Xiamen",
"delivery_address": "3610 Brighton Circle Road",
"delivery_postal_code": "56376",
"custom": "",
"installments": "",
"installments_id": "",
"device_fingerprint": "",
"encryption_data": "{{sign}}",
"platform_source": "Shopify",
"device_type": "PC",
"order_type": "WEB",
"checkout_time": 1415273168,
"user_agent": "Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/47.0.2526.73 Safari/537.36",
"forter_token_cookie": "",
"cart_items": [
{
"basic_item_data": {
"name": "string",
"quantity": "string",
"type": "string",
"price": {
"amount_usd": 0,
"amount_local_currency": 0,
"currency": "str"
},
"category": "string",
"productId": "string"
}
}
],
"account_owner": [
{
"first_name": "string",
"last_name": "string",
"email": "string",
"account_id": "string",
"created": 0,
"past_orders_count": 0,
"past_orders_sum": 0,
"lastLogin_ip": "string",
"registration_ip": "string"
}
],
"total_discount": [
{
"coupon_code_used": "string",
"discount_type": "string"
}
],
"additional_information": [
{
"mpi_info": {
"eci": "st",
"cavv": "string",
"xid": "string",
"dsTransID": "string"
}
}
],
"price_id": "string",
"quote_id": "string",
"quote_price": "string"
}'
Responses
🟢200OK
application/xml
Body
merchant_id
string
required
account_id
string
required
order_no
string
required
amount
string
required
currency
string
required
transaction_id
string
required
card
string
required
order_status
string
required
result_info
string
required
contract_name
string
required
recurring_id
string
required
recurring_deduction_period
string
required
recurring_deduction_time
string
required
encryption_data
string
required
note
string
required
connector
string
required
Example
<?xml version="1.0" encoding="UTF-8"?>
<respon>
<merchant_id>701001</merchant_id>
<account_id>701001021</account_id>
<order_no>1726206945985</order_no>
<amount>10.36</amount>
<currency>USD</currency>
<transaction_id>Ca267324866591</transaction_id>
<card>400000***1091</card>
<order_status>1</order_status>
<result_info>0000:Success</result_info>
<encryption_data>E72300476702EBD9DFF06B51B941BB570C059C9EB1F794E60DD4F78D7A4EBCEF</encryption_data>
<note></note>
<connector>AIGLOBALPAY</connector>
</respon>
🟠404Record not found
🟠400Invalid input