API integration

With assuming you have information authorization token via 3DS Authentication TMS, we shall inform below, regarding Payment Service API integration.Parameters and fields stated in the document are required values.

Merchant verification

You should request Payment Service by consisting Header, with authorizationId that can be received after 3DS authentication completed, and received data after below merchant verification succeeded, so that you may use payment(approval and other services).

Request Authentication Code
  • Live Request URL : GEThttps:/pay.opt-pay.com/authorize
  • Test Request URL : GEThttps:/test-pay.opt-pay.com/authorize
Sample Code
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 import axios from "axios" class Api extends React.Component {     const handleSubmit = async ( ) => {         try {             const response = await axios.get("https:/test-pay.opt-pay.com/authorize", {                 headers: {                   'Content-type': "application/json",                   'clientCode': "clientCode",                   'clientSecret': "clientSecret"                 }             }             console.log(response);         } catch(e){             console.error(e);         }     render() {         (...)     );
Request Header
HeaderTypeDescription
clientCodeStringProvided Client code
clientSecretStringProvided Client password
Response Data
HeaderTypeDescription
AuthorizationStringMerchant verification code

Payment request

Service that verifies customer’s identity before payment, and only authorized customer may use the payment service. The authorization shall process via browser, and the result would be sent to CallbackLocation separately, and process page move to redirectUrl. Module shall not provide UI.

URL
  • Live : POST https://pay.opt-pay.com/order/start
  • Test : POST https://test-pay.opt-pay.com/order/start
Content-Type

x-www-form-urlencoded

Description of CallbackLocation

This is the URL to receive the final result after the payment is completed. If partner company has a firewall, you need to allow Optatum Server IP 112.175.117.124 and Port 80, 443.

precaution

The request must be made as Form submit in a web browser. UI for integration shall NOT be provided from Optatum, partner company should provide the UI.Requests other than Form submit are not allowed

Sample Code
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 <form method="post" action="https://test-pay.opt-pay.com/order/start">     <input type="text" name="merchantId" value="">     <input type="text" name="merchantReferenceCode" value="Payment Authenticate sample Test">     <input type="text" name="currency" value="USD">     <input type="text" name="cardAccountNumber" value="5200000000001096">     <input type="text" name="cardType" value="MASTER">     <input type="text" name="cardExpirationMonth" value="01">     <input type="text" name="cardExpirationYear" value="2023">     <input type="text" name="firstName" value="John">     <input type="text" name="lastName" value="Doe">     <input type="text" name="country" value="KR">     <input type="text" name="state" value="">     <input type="text" name="city" value="busan">     <input type="text" name="address" value="optatumbuilding, 61, Geumjeong-ro, Geumjeong-gu, Busan, Republic of Korea">     <input type="text" name="postalCode" value="46293">     <input type="text" name="phone" value="+8212341234">     <input type="text" name="email" value="test@test-email.com">     <input type="text" name="callbackLocation" value="">     <input type="text" name="redirectUrl" value="">     <input type="text" name="isWindowed" value="N">     <input type="text" name="isRedirect" value="N">     <input type="text" name="isAuthenticate" value="Y">     <input type="text" name="verifyId" value="">     <input type="text" name="authorization" value="">     <input type="text" name="amount" value="100">     <button type="submit">Submit</button> </form>
  • isRedirect : Y - process Redirect when 3DS Authentication failed / N(default value) – Not moving when 3DS Authentication failed
  • isWindowed : Y - process authorization with new window / N(default value) – process authorization by moving page
  • isAuthenticate : Y(default value) – process payment approval / N – process only authorization
Request Form Fields
FieldTypeDescription
merchantIdStringmerchant MID
merchantReferenceCodeStringfield to manage transaction history from merchant
currencyStringCurrency code (ISO 4217 refer, “3 digits”)
cardAccountNumberNumberCard Number Test Ex) VISA 4000000000001091 MASTER 5200000000001096 JCB 3569960010083758
cardTypeStringCard company Ex)VISA, MASTER, JCB
cardExpirationMonthStringCard expiration month(MM) Test Ex) 01
cardExpirationYearStringCard expiration year(YYYY) Test Ex) Current Year + 3
firstNameStringFirst name of customer
lastNameStringLast name of customer
countryStringCountry code (refer ISO 3166-1 alpha-2 , “2 digit)
stateStringstate (only in case of U.S.A. and Canada)
cityStringCity
addressStringAddress
postalCodeStringPost code (zip code)
phoneStringCustomer contact
emailStringCustomer E-mail
callbackLocationStringServer URL to receive results URL address must end with “/”.
redirectUrlStringURL to go to after completing 3DS authentication. URL address must end with “/”.
isWindowedStringOption default: Y (available only “Y” or “N”) N : page move | Y : new page Going back when N Perform closing page when Y
isRedirectStringOption Default: N (“Y” or “N” only) If Y, Redirect is executed even when 3DS fails.
verifyIdStringProvided Merchant code
authorizationStringMerchant verification code
isAuthenticateStringOption Default: N (only “Y” or “N” can be used) If Y, payment approval is in progress.
Response Data
FieldTypeDescription
decisionStringResult value (ACCEPT/REJECT)
reasonCodeStringResult code / when succeed 100
transactionIdStringtransaction ID
originalTransactionIdStringOriginal transaction ID
When payment is not approved (isAuthenticate = “N”)
xidString3DS MPI Transaction ID
eciString3DS authentication result value
commerceIndicatorString3DS certification results
cavvAlgorithmString3DS authentication result
paresStatusString3DS authentication result
paSpecificationVersionString3DS authentication result (if any)
directoryServerTransactionIDString3DS authentication result (if any)
cavvStringCavv generated by 3DS issuer (Not applicable for MASTERCARD)
ucafCollectionIndicatorString3DS certification results (MASTERCARD only)
ucafAuthenticationDataString3DS certification results (MASTERCARD only)

Reverse, Capture, Refund

URL
  • Reverse Request URL : POST /reverse
  • Capture Request URL : POST /capture
  • Refund Request URL : POST /refund
Sample Code
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 import axios from "axios" class Api extends React.Component {     const submitData = {         merchantId: "test_merchant_id",         merchantReferenceCode: "test_merchant_reference_code",         currency: "USD",         amount: "1",         email: "payment@optatumplatform.com",         originalTransactionId: "100000000000001"     };     const handleSubmit = async ( ) => {         try {             const response = await axios.post("https:/test-pay.opt-pay.com/[Request URL]", submitData, {                 headers: {                   'Content-type': "application/json",                   'verifyId': "verifyId",                   'Authorization': "Authorization"                 }             }             console.log(response);         } catch(e){             console.error(e);         }     render() {         (...)     );
Request Fields
FieldTypeDescription
merchantIdStringMerchant ID
merchantReferenceCodeStringMerchant’s reference code of transaction history
currencyStringCurrency code (ISO 4217, 3digits)
amountNumberAmount
emailStringcustomer Email
originalTransactionIdStringOriginal transaction ID
Response Fields
FieldTypeDescription
decisionStringResult value (ACCEPT/REJECT)
reasonCodeStringResult code
transactionIdStringtransaction ID
originalTransactionIdStringOriginal transaction ID

Void

URL
  • Void Request URL : POST /void
Sample Code
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 import axios from "axios" class Api extends React.Component {     const submitData = {         merchantId: "test_merchant_id",         merchantReferenceCode: "test_merchant_reference_code",         currency: "USD",         amount: "1",         email: "payment@optatumplatform.com",         transactionId: "100000000000001",         type: "CAPTURE",     };     const handleSubmit = async ( ) => {         try {             const response = await axios.post("https:/test-pay.opt-pay.com/void", submitData, {                 headers: {                   'Content-type': "application/json",                   'verifyId': "verifyId",                   'Authorization': "Authorization"                 }             }             console.log(response);         } catch(e){             console.error(e);         }     render() {         (...)     );
Request Fields
FieldTypeDescription
merchantIdStringMerchant ID
merchantReferenceCodeStringMerchant’s reference code of transaction history
currencyStringCurrency code (ISO 4217, 3digits)
amountStringAmount
emailStringcustomer Email
transactionIdStringRequest ID
typeStringrequest TransactionId’s transaction status only CAPTURE or REFUND
Response Fields
FieldTypeDescription
decisionStringResult value (ACCEPT/REJECT)
reasonCodeStringResult code
transactionIdStringtransaction ID
originalTransactionIdStringOriginal transaction ID

Payment Retrieve

URL
  • Live URL https://pay.opt-pay.com/payment/retrieve/[Merchant ID]/[Transaction ID]
  • Test URL https://test-pay.opt-pay.com/payment/retrieve/[Merchant ID]/[Transaction ID]
Sample Code
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 import axios from "axios" class Api extends React.Component {     const handleSubmit = async ( ) => {         try {             const response = await axios.get("https:/test-pay.opt-pay.com/payment/retrieve/test_merchant_id/100000000000001", {                 headers: {                   'Content-type': "application/json",                   'verifyId': "verifyId",                   'Authorization': "Authorization"                 }             }             console.log(response);         } catch(e){             console.error(e);         }     render() {         (...)     );
Transaction History Inquiry Response
FieldTypeDescription
merchantReferenceCodeStringMerchant’s transaction history reference code
transactionIdStringTransaction ID
originalTransactionIdStringOriginal transaction ID
stepStringTransaction request division
reasonCodeStringReason code
statusStringRequest result (successful/declined/error)
captureStatusStringPayout service status (only when payout)
messageStringResult message
approvalCodeStringApproval number
cardTypeStringCard company
currencyCodeStringCurrency code (ISO 4217, 3 digits)
amountNumberamount
cardPrefixStringCard front number(except MASTERCARD)
cardSuffixStringCard back number
Transaction History Inquiry payout status detail(CaptureStatus)
Status ValueTypeDescription
PENDINGStringThe authorization was captured, the credit request was successful, or the credit card transaction was captured, and the request was sent to the payment processor. The reply from the payment processor is pending.
TRANSMITTEDStringThe Capture/Credit request was successfully sent to the Processor.
VOIDEDStringThe request for the credit card capture, credit card credit, check debit, or check credit was successfully deleted. The authorization has not been deleted. You can see this transaction only on the search results page and in the exported search results.
TRXN_ERRORStringThere was an error processing this transaction at the Processor.

Reason Code

Transaction History Inquiry Response Detail(reasonCode)
Reason CodeReply Flag (SCMP)Description
100SOKSuccessful transaction
101DMISSINGFIELDDeclined - The request is missing one or more fields
102DINVALIDDATADeclined - One or more fields in the request contains invalid data.
104DDUPLICATEDeclined - The merchantReferenceCode sent with this authorization request matches the merchantReferenceCode of another authorization request that you sent in the last 15 minutes.
110SPARTIALAPPROVALPartial amount was approved
150ESYSTEMError - General system failure.
151ETIMEOUTError - The request was received but there was a server timeout. This error does not include timeouts between the client and the server.
152ETIMEOUTError: The request was received, but a service did not finish running in time.
200DAVSNOSoft Decline - The authorization request was approved by the issuing bank but flagged by CyberSource because it did not pass the Address Verification Service (AVS) check.
201DCALLDecline - The issuing bank has questions about the request. You do not receive an authorization code programmatically, but you might receive one verbally by calling the processor.
202DCARDEXPIREDDecline - Expired card. You might also receive this if the expiration date you provided does not match the date the issuing bank has on file.
203DCARDREFUSEDDecline - General decline of the card. No other information provided by the issuing bank.
204DCARDREFUSEDDecline - Insufficient funds in the account.
205DCARDREFUSEDDecline - Stolen or lost card.
207DCARDREFUSEDDecline - Issuing bank unavailable.
208DCARDREFUSEDDecline - Inactive card or card not authorized for card-not-present transactions.
209DCARDREFUSEDDecline - card verification number (CVN) did not match.
210DCARDREFUSEDDecline - The card has reached the credit limit.
211DCARDREFUSEDDecline - Invalid Card Verification Number (CVN).
220DCHECKREFUSEDDecline - Generic Decline.
221DCHECKREFUSEDDecline - The customer matched an entry on the processor's negative file.
222DCHECKREFUSEDDecline - customer's account is frozen
230DCVSoft Decline - The authorization request was approved by the issuing bank but flagged by CyberSource because it did not pass the Card Verification Number (CVN) check.
231DINVALIDCARDDecline - Invalid account number
232DINVALIDDATADecline - The card type is not accepted by the payment processor.
233DINVALIDDATADecline - General decline by the processor.
234DINVALIDDATADecline - There is a problem with your merchant configuration.
235DINVALIDDATADecline - The requested amount exceeds the originally authorized amount. Occurs, for example, if you try to capture an amount larger than the original authorization amount.
236DINVALIDDATADecline - Processor failure.
237DINVALIDDATADecline - The authorization has already been reversed.
238DINVALIDDATADecline - The transaction has already been settled.
239DINVALIDDATADecline - The requested transaction amount must match the previous transaction amount.
240DINVALIDDATADecline - The card type sent is invalid or does not correlate with the credit card number.
241DINVALIDDATADecline - The referenced request id is invalid for all follow-on transactions.
242DNOAUTHDecline - The request ID is invalid. @@@@ You requested a capture, but there is no corresponding, unused authorization record. Occurs if there was not a previously successful authorization request or if the previously successful authorization has already been used in another capture request.
243DINVALIDDATADecline - The transaction has already been settled or reversed.
246DNOTVOIDABLEDecline - The capture or credit is not voidable because the capture or credit information has already been submitted to your processor. Or, you requested a void for a type of transaction that cannot be voided.
247DINVALIDDATADecline - You requested a credit for a capture that was previously voided.
248DBOLETODECLINEDDecline - The boleto request was declined by your processor.
250ETIMEOUTError - The request was received, but there was a timeout at the payment processor.
251DCARDREFUSEDDecline - The Pinless Debit card's use frequency or maximum amount per use has been exceeded.
254DINVALIDDATADecline - Account is prohibited from processing stand-alone refunds.
400DSCORESoft Decline - Fraud score exceeds threshold.
450DINVALIDADDRESSApartment number missing or not found.
451DINVALIDADDRESSInsufficient address information.
452DINVALIDADDRESSHouse/Box number not found on street.
453DINVALIDADDRESSMultiple address matches were found.
454DINVALIDADDRESSP.O. Box identifier not found or out of range.
455DINVALIDADDRESSRoute service identifier not found or out of range.
456DINVALIDADDRESSStreet name not found in Postal code.
457DINVALIDADDRESSPostal code not found in database.
458DINVALIDADDRESSUnable to verify or correct address.
459DINVALIDADDRESSMultiple address matches were found (international)
460DINVALIDADDRESSAddress match not found (no reason given)
461DINVALIDADDRESSUnsupported character set
475DAUTHENTICATEThe cardholder is enrolled in Payer Authentication. Please authenticate the cardholder before continuing with the transaction.
476DAUTHENTICATIONFAILEDEncountered a Payer Authentication problem. Payer could not be authenticated.
480DREVIEWThe order is marked for review by Decision Manager
481DREJECTThe order has been rejected by Decision Manager
490Your aggregator or acquirer is not accepting transactions from you at this time.
491Your aggregator or acquirer is not accepting this transaction.
520DSETTINGSSoft Decline - The authorization request was approved by the issuing bank but declined based on your Smart Authorization settings.
700DRESTRICTEDThe customer matched the Denied Parties List
701DRESTRICTEDExport bill_country/ship_country match
702DRESTRICTEDExport email_country match
703DRESTRICTEDExport hostname_country/ip_country match