# Integration format for Landing Page V.2
## Landing Page Create Payment Page:
### **Testing**
URL: https://devpay.garuda-indonesia.com/payment/api/json/cardinfo
Method: POST
Content-Type: application/json
Signature Key (Asyst): Asyst.Garuda.Veritrans.Lalala
Signature Key (Sabre): Midtrans.Garuda.Sabre.Citilink
### **Production**
URL: https://pay.garuda-indonesia.com/payment/api/json/cardinfo
Method: POST
Content-Type: application/json
Signature Key: *Current Key*
<br>
## Checksum
HMACSHA512(SESSION_ID + MERCHANT_ID + AMOUNT + CURRENCY + RL + encodeURIComponent(USER_EMAIL), signaturekey)
**Notes:**
* without the "+" sign, directly combine the text in the request field
* RL = Refer to PNR/Booking Code
* SESSION_ID Should be unique or it can be same with INVOICE_NO
**For UAT Purpose**:
1. If CHECKSUM_ALGORITHM not sent,the value of CHECKSUM will be considered as MD5.
2. If CHECKSUM_ALGORITHM sent and value of CHECKSUM_ALGORITHM is "MD5", system will validate value of the CHECKSUM as MD5.
3. If CHECKSUM_ALGORITHM sent and value of CHECKSUM_ALGORITHM is not "MD5", system will validate value of the CHECKSUM as HMACSHA512.
<br>
## Request Body
```
```
{
"CHECKSUM": "...", # Mandatory, value should be the result of HMACSHA512 calculation => HMACSHA512(SESSION_ID + MERCHANT_ID + AMOUNT + CURRENCY + RL + encodeURIComponent(USER_EMAIL), signaturekey)
"CHECKSUM_ALGORITHM": "HMACSHA512" or "MD5", #Optional,
"CONFIRMATION_URL": "http://vt-stage.info/ga_confirmed.html?OFFICE_ID=JKTGA08AO", # Mandatory, will be called to inform completion of payment, should be unique per request. For GOS / COS / B2C should contain OFFICE_ID param
"CANCELLATION_URL": "http://vt-stage.info/ga_cancelled.html", # Optional
"KEEPALIVE_URL": "http://vt-stage.info/keepalive.js", # Mandatory, will be called to extend the session in booking engine site
"KEEPALIVE_FREQUENCY": "560000", # Mandatory, Frequency in milliseconds for calling the KEEPALIVE_URL
"PAYMENT_TYPE": "EXT", # Mandatory, should be set to "EXT"
"MERCHANT_ID": "GarudaIndo01", # Mandatory
"SESSION_ID": "", # Mandatory, value can be anything, but unique value for each request is recommended
"SITE": "GA-Citilink", # Mandatory,
"RL": "23218add", # Mandatory, should contain PNR value
"AMOUNT": "839000", # Mandatory
"CURRENCY": "IDR", # Mandatory
"LANGUAGE": "GB", # Mandatory, GB - English, ID - Indonesian, Default is English
"USER_TITLE": "MR", # Mandatory
"USER_LAST_NAME": "Pavel", # Mandatory
"USER_FIRST_NAME": "Pavel", # Mandatory
"USER_MOBILE_PHONE": "081122334455", # Mandatory
"USER_HOME_PHONE": "081122334455", # Optional
"USER_BUSINESS_PHONE": "", # Optional
"USER_EMAIL": "aaaaa@gmail.com", # Mandatory
"EMAIL": "aaaaa@gmail.com", # Optional
"EXTERNAL_ID": "BOOKING", # Optional
"EXTERNAL_ID#2": "APEX7", # Optional, for specifying Promo Code
"EXTERNAL_ID#3": "APEX7", # Optional
"EXTERNAL_ID#4": "", # Optional
"EXTERNAL_ID#5": "5501DF36F457AE122767", # Optional
"EXTERNAL_ID#6": "id-en#WEBSITE", # Optional
"TRAVELER_ID": "TestingUser", # Optional, Current logged in user, it will be shown in header
"OFFICE_CODE": "SA3RUDY", # (Mandatory for GOS/COS), tour_code parameter for Doku Deposit Topup
"PAYMENT_TIME_LIMIT": "2015-10-23T13:20:00.000Z", # Optional, maximum time that user is allowed to perform payment, if not specified defaults to 110 minutes since request is received
"NOTIFICATION_URL": "http://example.com/gos_notify", # Optional
# All fields are mandatory
"flights": {
"0": {
"segments": {
"0": {
"departure_code": "DPS",
"departure_date_time": "2015-10-23T13:20:00.000Z",
"arrival_code": "BDO",
"arrival_date_time": "2015-10-23T14:05:00.000Z",
"airline_code": "GA",
"airline_name": "Garuda Indonesia",
"flight_number": "335",
"flight_duration": "01h45min",
"booking_class": "ECONOMY",
"total_fare": 567000 # Requried for Sabre integration
}
}
}
},
** All fields are mandatory**
"passengers": {
"1": {
"travel_id": "1",
"title": "Mr",
"title_code": "MR",
"first_name": "Walter",
"last_name": "Jones",
"type": "ADT" # Type can be ADT - Adult, CHD - Child, INF - Infinity
}
},
"fares": {
"payment_amount": 13439000,
"payment_currency": "IDR",
"adult": {
"base_price": 3051000,
"taxes": [
{ "tax_code": "YR", "rate": 10000 },
{ "tax_code": "D5", "rate": 135000 },
{ "tax_code": "ID", "rate": 305100 }
],
"price": 3501100,
"discount": 51000,
"total_pax": 2,
"total_price": 7002200,
"base_price_insurance": 70000,
"total_price_insurance": 140000
},
"child": {
"base_price": 2288000,
"taxes": [
{ "tax_code": "YR", "rate": 10000 },
{ "tax_code": "D5", "rate": 135000 },
{ "tax_code": "ID", "rate": 228800 }
],
"price": 2661800,
"discount": 51000,
"total_pax": 2,
"total_price": 5323600,
"base_price_insurance": 70000,
"total_price_insurance": 140000
},
"infant": {
"base_price": 306000,
"taxes": [
{ "tax_code": "YR", "rate": 10000 },
{ "tax_code": "ID", "rate": 30600 }
],
"price": 346600,
"discount": 0,
"total_pax": 2,
"total_price": 693200,
"base_price_insurance": 70000,
"total_price_insurance": 140000
},
"total_payment_pax": 13019000,
"advanced_cashback": 225800,
"pph": 4516,
"pkp": 0,
"total_payment_agent": 12797716,
"insurance": {
"total_payment_insurance": 420000,
"total_payment_pax_and_insurance": 13439000,
"advanced_cashback_insurance": 105000,
"insurance_pph": 2100,
"insurance_pkp": 0,
"total_payment_agent_and_insurance": 13114816
}
}
}