- Guides
- API Reference
- Introduction
- Endpoints
- Data Types
- Signing
- 3-D Secure Verification
- Subscription
- Errors
- Webhooks
- Items Information
- Changelog
- Acquiring
- Create a direct paymentPOST
- Create a APM paymentPOST
- Create a redirect (iFrame) paymentPOST
- Capture a transactionPOST
- Review a transactionPOST
- Cancel a transactionPOST
- Cancel a subscriptionPOST
- Query a transactionPOST
- Refund a transactionPOST
- Search a refund transactionPOST
- Create a payoutPOST
- Optimise payment methodsPOST
- Update an orderPOST
- Issuing
- Appendix
Create a APM payment
POST
https://test-api.star-saas.com/v1/authorise
When the payment method is Alternative Payment Method, the issuer_url of the corresponding payment method will be returned, you need to request the issuer_url again and redirect to the payment page of the issuer to make payment.
Request
Header Params
Content-Type
string
required
Example:
application/x-www-form-urlencoded
Body Params application/json
payment_method
string
required
<= 50 characters
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
first_name
string
required
<= 100 characters
Example:
Milton
last_name
string
required
<= 100 characters
Example:
Braganza
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=....
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_district_name
string
optional
This parameter is required for Boletos payment in Brazil only.
<= 50 characters
delivery_street_name
string
optional
This parameter is required for Boletos payment in Brazil only.
<= 50 characters
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
return_url
string
optional
<= 500 characters
notify_url
string
optional
<= 500 characters
Example:
{{webUrl}}/v1/pages/NotifyResult.jsp
custom
string
optional
Example:
custom1;custom2;custom3;custom4;custom5
<= 2500 characters
Example:
device_fingerprint
string
optional
<= 200 characters
Example:
encryption_data
string
required
encryption_data=sha256(merchant_id + account_id +payment_method +order_no + currency +amount + first_name + last_name + 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
person
object
required
document_number
string
required
<= 30 characters
document_type
string
optional
<= 30 characters
social_name
string
optional
<= 100 characters
email
string
optional
<= 100 characters
phone_country_code
string
optional
<= 2 characters
phone_area_code
string
optional
<= 20 characters
phone_number
string
optional
<= 50 characters
birth_date
string
optional
<= 10 characters
net_monthly_average_income
string
optional
<= 10 characters
address_street
string
optional
<= 100 characters
address_number
string
optional
<= 30 characters
address_complement
string
optional
<= 100 characters
address_postal_code
string
optional
<= 100 characters
address_city
string
optional
<= 100 characters
address_state
string
optional
<= 100 characters
address_country
string
optional
<= 2 characters
fiscal_country
string
optional
<= 2 characters
documents
object
optional
bank_code
string
optional
<= 50 characters
color_depth
string
optional
<= 50 characters
Example
{
"payment_method": "string",
"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",
"first_name": "Milton",
"last_name": "Braganza",
"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=.... ",
"delivery_firstname": "Li",
"delivery_lastname": "Han",
"delivery_country": "CN",
"delivery_state": "FJ",
"delivery_city": "Xiamen",
"delivery_district_name": "string",
"delivery_street_name": "string",
"delivery_address": "3610 Brighton Circle Road",
"delivery_postal_code": "56376",
"return_url": "string",
"notify_url": "{{webUrl}}/v1/pages/NotifyResult.jsp",
"custom": "",
"device_fingerprint": "",
"encryption_data": "{{sign}}",
"platform_source": "Shopify",
"device_type": "PC",
"person": {
"document_number": "string",
"document_type": "string",
"social_name": "string",
"email": "string",
"phone_country_code": "st",
"phone_area_code": "string",
"phone_number": "string",
"birth_date": "string",
"net_monthly_average_income": "string",
"address_street": "string",
"address_number": "string",
"address_complement": "string",
"address_postal_code": "string",
"address_city": "string",
"address_state": "string",
"address_country": "st",
"fiscal_country": "st",
"documents": {
"file_type": "string",
"file_data": "string",
"file_url": "string",
"labels": {
"person_bank_account_id": "string",
"bank_account": {
"account_type": "string",
"account_number": "string",
"branch_number": "string",
"owner_document_number": "string",
"owner_name": "string",
"branch_country": "st",
"currency": "str",
"bank": {
"code": "string",
"name": "string"
}
}
}
}
},
"bank_code": "string",
"color_depth": "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/x-www-form-urlencoded' \
--data-raw '{
"payment_method": "string",
"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",
"first_name": "Milton",
"last_name": "Braganza",
"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=.... ",
"delivery_firstname": "Li",
"delivery_lastname": "Han",
"delivery_country": "CN",
"delivery_state": "FJ",
"delivery_city": "Xiamen",
"delivery_district_name": "string",
"delivery_street_name": "string",
"delivery_address": "3610 Brighton Circle Road",
"delivery_postal_code": "56376",
"return_url": "string",
"notify_url": "https://test-api.star-saas.com/v1/pages/NotifyResult.jsp",
"custom": "",
"device_fingerprint": "",
"encryption_data": "{{sign}}",
"platform_source": "Shopify",
"device_type": "PC",
"person": {
"document_number": "string",
"document_type": "string",
"social_name": "string",
"email": "string",
"phone_country_code": "st",
"phone_area_code": "string",
"phone_number": "string",
"birth_date": "string",
"net_monthly_average_income": "string",
"address_street": "string",
"address_number": "string",
"address_complement": "string",
"address_postal_code": "string",
"address_city": "string",
"address_state": "string",
"address_country": "st",
"fiscal_country": "st",
"documents": {
"file_type": "string",
"file_data": "string",
"file_url": "string",
"labels": {
"person_bank_account_id": "string",
"bank_account": {
"account_type": "string",
"account_number": "string",
"branch_number": "string",
"owner_document_number": "string",
"owner_name": "string",
"branch_country": "st",
"currency": "str",
"bank": {
"code": "string",
"name": "string"
}
}
}
}
},
"bank_code": "string",
"color_depth": "string"
}'
Responses
🟢200OK
application/xml
The response is in XML format. Merchant needs to parse the XML response before obtain the payment result.
Body
merchant_id
string
optional
<= 5 characters
account_id
string
optional
<= 8 characters
order_no
string
optional
<= 50 characters
amount
string
optional
please refer to Appendix: Transaction Currency for decimal values of each currency
<= 15 characters
currency
string
optional
Please refer to Appendix: Transaction Currency
<= 3 characters
issuer_url
string
optional
<= 500 characters
Example
<?xml version="1.0" encoding="UTF-8"?>
<respon>
<merchant_id>10001001</merchant_id>
<account_id>10001001001</account_id>
<order_no>112343455</order_no>
<amount>188.58</amount>
<currency>MXN</currency>
<issuer_url>https://sandbox.dlocal.com/collect/pay/pay/M-e55f92cb-acc9-47f2-aa60-e99819180b4c?xtid=CATH-ST-1639120320-214722374</issuer_url>
</respon>
🟠404Record not found
🟠400Invalid input
🟢200OK