### Customer Object Example Source: https://hub.finpay.id/id/docs/object/customer An example illustrating the structure of a populated Customer object. ```json "customer": { "id": "hajar@yahoo.com", "email": "hajar.finnet@gmail.com", "firstName": "Hajar", "lastName": "Ismail", "mobilePhone": "+6281286288844", "phone": "+6281286288844", "taxRegistrationId": "123456", "account": { "id": "1234" } } ``` -------------------------------- ### Example Shipping Object Source: https://hub.finpay.id/id/docs/object/shipping An example of a fully populated Shipping object, demonstrating the expected structure for shipping details. ```json "shipping": { "method": "SAME_DAY", "origin": { "postcodeZip": "12740" }, "contact": { "email": "hajar.finnet@gmail.com", "firstName": "Hajar", "lastName": "Ismail", "mobilePhone": "+6281286288844", "phone": "+62211500770" }, "address": { "city": "Jakarta Selatan", "company": "Finnet Indonesia", "country": "IDN", "postcodeZip": "12740", "stateProvince": "DKI Jakarta", "stateProvinceCode": "31", "street": "Jalan Gatot Subroto", "street2": "Jalan Gatot Subroto", "source": "Jakarta", "sameAsBilling": "SAME" } } ``` -------------------------------- ### Public Key x.509 Format Example Source: https://hub.finpay.id/id/docs/finpay-money/signature Example of a public key in x.509 format required for asymmetric signature verification. ```text -----BEGIN PUBLIC KEY----- MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAomV+Vm1xlRXanmh108Kusls7SSKec0oCejtc9QG Obpd4RnQ+7gihm2k6etnSNP7b+XrpY+fBkiQNaBInii9M10kW9Bhf/M9GH/edL3IqnzDNSi7tcoQgnO7h8x mzLNWHTjtR6bkrsdBS5dry6htotaF5KXomuoYgztCdGDOa0W20aeLzYSXIoW7s/Ay5yIXt0xaXTll3/bmez leguFPnwQZq5EqZFWlUZvutDi+f2l9rTRY0Fb64y+VAf+mnIbEovGqsPEeF/p97YWxcY7CWm8NsT0lwBVOt kmEl967Brz5yvEObF5bJgVodi6mNVsN1ki0MCitIhYO8shcE7eUilQIDAQAB -----END PUBLIC KEY----- ``` -------------------------------- ### Example Point Rule Configuration Source: https://hub.finpay.id/id/docs/object/point-rule An example JSON configuration for transaction filtering using point rules. It specifies rules for different card BINs with minimum and maximum transaction amounts and discounts. ```json "transactionFiltering": { "point": { "rule": [ { "cardBin": "454178001", "pointToIdr": "5", "min": { "amount": "20000" }, "max": { "amount": "150000", "disc": "50" } }, { "cardBin": "454179002", "pointToIdr": "5", "min": { "amount": "20000" }, "max": { "amount": "150000", "disc": "50" } } ] } } ``` -------------------------------- ### Customer Object Example Source: https://hub.finpay.id/id/docs/object/customer An example of how the Customer object might be structured in a request or response payload. ```APIDOC ## Customer Object Example ### Request Body Example ```json { "customer": { "id": "hajar@yahoo.com", "email": "hajar.finnet@gmail.com", "firstName": "Hajar", "lastName": "Ismail", "mobilePhone": "+6281286288844", "phone": "+6281286288844", "taxRegistrationId": "123456", "account": { "id": "1234" } } } ``` ``` -------------------------------- ### Transaction Object JSON Example Source: https://hub.finpay.id/id/docs/object/transaction Example of a transaction object configured for a purchase mode. ```json "transaction": { "mode": "PURCHASE" } ``` -------------------------------- ### DetailData JSON Example Source: https://hub.finpay.id/id/docs/object/detailData An example of the DetailData object in JSON format, illustrating a transaction with its associated details. ```json { "detailData": [ { "dateTime": "2022-12-02T08:18:13+00:00", "amount": { "value": "10000.00", "currency": "IDR" }, "remark": "Pulsa Rp. 10000", "status": "SUCCESS", "type": "TEST", "additionalInfo": { "partnerReferenceNo": "78912343452347003", "referenceNo": "2212020005597959", "trxcode": "WS_TRX_TRANSFER", "id": "16109172", "sum_in": "0", "sum_out": "10000", "channel_id": "140", "source": "+6281977817902", "destination": "+628198765432112", "name": "Testing" } }, { "dateTime": "2022-12-02T13:15:18+00:00", "amount": { "value": "1000.00", "currency": "IDR" }, "remark": "pulsa 1000", "status": "SUCCESS", "type": "TEST", "additionalInfo": { "partnerReferenceNo": "7891234345230001", "referenceNo": "2212020005599921", "trxcode": "WS_TRX_TRANSFER", "id": "16109272", "sum_in": "0", "sum_out": "1000", "channel_id": "140", "source": "+6281977817902", "destination": "+628198765432112", "name": "Testing" } } ] } ``` -------------------------------- ### QRIS Payment Response Example Source: https://hub.finpay.id/id/docs/finpay-pg/api/qris JSON response received after a successful QRIS payment initiation request. ```json { "responseCode": "2000000", "responseMessage": "Success", "redirecturl": "", "appurl": "", "imageurl": "https://devo.finpay.id/pg/payment/card/v2/access/17d6a417565a51e792c64a7f4b4b1e833743ceea6b93b6c7a5ee29e12ae980b1", "expiryLink": "2023-11-23 14:37:53", "paymentCode": "", "stringQr": "00020101021226570013ID.FINPAY.WWW01189360077732007220010207ZORA4840303UKE51410014ID.CO.QRIS.WWW0212ID12345678910303UKE52045814530336054062014105802ID5909PT Finnet6007Jakarta6105127106220071640788317006386736304F850", "processingTime": 0.28851914405822754 } ``` -------------------------------- ### Device Object JSON Example Source: https://hub.finpay.id/id/docs/object/device An example of the Device Object represented in JSON format. This structure can be used to send device details in API requests. ```json "device": { "ani": "1", "aniCallType": "ID", "browser": "MOZILLA", "fingerprint": "121311", "hostname": "telkom", "ipAddress": "202.1.201.1", "mobilePhoneModel": "ANDROID" } ``` -------------------------------- ### QRIS Payment Request Example Source: https://hub.finpay.id/id/docs/finpay-pg/api/qris JSON payload for initiating a QRIS payment transaction. ```json { "customer": { "email": "hajar.finnet@gmail.com", "firstName": "Hajar", "lastName": "Ismail", "mobilePhone": "+6281286288844" }, "order": { "id": "1680679096364", "amount": "1000", "description": "Testing" }, "url": { "callbackUrl": "https://sandbox.finpay.co.id/simdev/finpay/result/resultsuccess.php" }, "sourceOfFunds": { "type": "qris" } } ``` -------------------------------- ### Sample Response JSON Source: https://hub.finpay.id/id/docs/disbursement/check-status Example of a successful JSON response from the Cek Status endpoint. ```json { "responseCode": "2000000", "responseMessage": "Success", "processingTime": 0.11419391632080078 } ``` -------------------------------- ### Sample Response for Close Payment Source: https://hub.finpay.id/id/docs/finpay-pg/api/Virtual%20Account/close-payment Example JSON response returned by the API upon a successful payment initiation. ```json { "responseCode": "2000000", "responseMessage": "Success", "redirecturl": "https://devo.finpay.id/widgetpg/pending/5613", "expiryLink": "2023-04-05 09:56:35", "paymentCode": "8802700000076850", "processingTime": 0.9721949100494385 } ``` -------------------------------- ### Payment Notify Response Sample Source: https://hub.finpay.id/id/docs/finpay-pg/SNAP/QRIS/paymentNotify Example JSON response indicating a successful processing of the notification request. ```json { ""responseCode"":""2005200"", ""responseMessage"":""Request has been processed successfully"" } ``` -------------------------------- ### Sample Request for Payment Status Source: https://hub.finpay.id/id/docs/finpay-pg/after-payment/check-status Use this GET request to retrieve the status of a specific order by appending the order ID to the URL. ```http https://devo.finnet.co.id/pg/payment/card/check/1662448187759 ``` -------------------------------- ### Virtual Account Check Request Source: https://hub.finpay.id/id/docs/finpay-pg/api/Virtual%20Account/check-va Example URL for performing a GET request to verify a virtual account payment. ```http https://devo.finnet.co.id/pg/payment/card/openpayment/check/vabca/8804483313131312 ``` -------------------------------- ### Recurring Object Example Source: https://hub.finpay.id/id/docs/object/recurring An example of how the Recurring Object can be structured in a request payload. ```APIDOC ## Recurring Object Example ### Description This is an example of a populated Recurring Object. ### Request Body Example ```json { "recurring": { "subscribe": "Y", "productCode": "001001", "type": "PURCHASE", "id": "abcd", "amount": "1000", "interval": "1", "intervalUnit": "monthly", "maxInterval": "2", "startDate": "20220101", "endDate": "20220101", "retry": { "interval": "1", "intervalUnit": "minutes", "maxInterval": "1" } } } ``` ``` -------------------------------- ### Disbursement JSON Object Example Source: https://hub.finpay.id/id/docs/object/disbursement Example structure of a disbursement request payload. ```json "disbursement": { "refCode": "d191f909-d443-4d18-855c-aaea045f9a78", "amount": 1000, "feeAmount": 100, "destAccName": "Siti Finpay", "destAccNumber": "654321770", "destBankCode": "07615", "rrn": "123456" } ``` -------------------------------- ### Sample Request for Payment Initiation Source: https://hub.finpay.id/id/docs/finpay-pg-billing/payment-initation Contoh payload JSON untuk melakukan inisiasi pembayaran dengan detail order, customer, dan billing. ```json { "order": { "id": "TRVIDN-DS000001", "amount": "200000", "description": "Package Trip Bali 5D4N", "item": [ { "name": "VOA", "quantity": "1", "unitPrice": "100000", "subMerchantId": "MPN001" }, { "name": "Service Charge", "quantity": "1", "unitPrice": "100000", "subMerchantId": "VFS001" } ] }, "customer": { "email": "albert@gmail.com", "firstName": "Albert", "lastName": "Andreas", "mobilePhone": "+6285108014914" }, "url": { "callbackUrl": "https://sandbox.finpay.co.id/simdev/finpay/result/tangkapCurl.php" }, "billing": { "billerServiceProvider": { "customerId": "118120000441100", "id": "050017", "subId": "DP1002", "type": "post" } }, "sourceOfFunds": { "type": "cc" } } ``` -------------------------------- ### Sample Generate Request (with BillInfo) Source: https://hub.finpay.id/id/docs/finpay-widget/generate-widget Use this sample to generate a widget request that includes detailed bill information. Ensure all mandatory fields are populated correctly. ```json { "backUrl": "url", "trxId": "12315139062851", "username": "{{username}}", "uniqKey": "12457365867", "returnUrl": "url", "timestamp": "2024-05-30 00:21:12", "productCodes": [ "080003" ], "terminal": "48511", "terminalName": "Loket Bidakara", "billInfo": { "billNumber": "8888800393834857", "amount": "0", "period": "01", "customerName": "customer name", "customerPhone": "1234567890", "customerEmail": "customer@gmail.com" }, "isNotif": true, "timeout": "30", "merchantSignature": "9f64e59637dc36d5348dbb3cc600a1c2f07c68b513de083790abbf26f2eeee91" } ``` -------------------------------- ### Sample Notification Redirect Request Source: https://hub.finpay.id/id/docs/finpay-pg/after-payment/notification-redirect This is a sample URL for handling GET requests for notification redirects. It includes parameters for order ID and amount. ```url https://url.successfailback.merchant?orderId=1234&oderAmount=123 ``` -------------------------------- ### POST /pg/payment/card/initiate Source: https://hub.finpay.id/id/docs/finpay-pg/api/instant-payment/bca-klikpay Initiates a card payment transaction using BCA Klikpay. Supports both Development and Production environments. ```APIDOC ## POST /pg/payment/card/initiate ### Description Initiates a card payment transaction through the BCA Klikpay gateway. This endpoint is used to start the payment process by providing order, customer, and payment details. ### Method POST ### Endpoint - Development: `https://devo.finnet.co.id/pg/payment/card/initiate` - Production: `https://live.finnet.co.id/pg/payment/card/initiate` ### Parameters #### Request Body - **order** (Object) - Mandatory - Detail of Order - **customer** (Object) - Mandatory - Detail of Customer - **url** (Object) - Mandatory - Detail of Url - **billing** (Object) - Optional - Detail of Billing - **shipping** (Object) - Optional - Detail of Shipping - **meta** (Object) - Optional - Detail of MetaData - **card** (Object) - Optional - Detail of Card - **recurring** (Object) - Optional - Detail of Recurring - **sourceOfFunds** (Object) - Mandatory - Detail of SourceOfFunds - **device** (Object) - Optional - Detail of Device ### Request Example ```json { "customer": { "email": "hajar.finnet@gmail.com", "firstName": "Hajar", "lastName": "Ismail", "mobilePhone": "+6281286288844" }, "order": { "id": "1680771671970", "amount": "200", "description": "Testing", "item": [ { "name": "name", "quantity": "1", "unitPrice": "100" }, { "name": "name", "quantity": "1", "unitPrice": "100" } ] }, "url": { "callbackUrl": "https://sandbox.finpay.co.id/simdev/finpay/result/resultsuccess.php", "successUrl": "https://sandbox.finpay.co.id/simdev/finpay/result/resultsuccess.php", "failUrl": "https://sandbox.finpay.co.id/simdev/finpay/result/resultfailed.php" }, "sourceOfFunds": { "type": "bcaklikpay" } } ``` ### Response #### Success Response (200) - **responseCode** (Enum) - Response Code - **responseMessage** (String) - Response Message - **paymentCode** (String) - Payment Code (Conditional) - **redirecturl** (String) - Redirect URL (Conditional) - **expiryLink** (String) - Expiry Link (Conditional) - **processingTime** (Number) - Processing Time (Conditional) - **appurl** (String) - App URL (Conditional) - **imageurl** (String) - Image URL (Conditional) - **accountList** (Array) - Account List (Conditional) #### Response Example ```json { "responseCode": "2000000", "responseMessage": "Success", "redirecturl": "https://sandbox.finpay.id/card/access/access/7e5aeee01943a1d84dd0e77020465c93bb284a1d88e04afc526178e75f5200df", "appurl": "", "imageurl": "", "expiryLink": "2023-04-06 16:16:11", "paymentCode": "", "processingTime": 0.22559404373168945 } ``` ``` -------------------------------- ### Account Creation Sample Request Source: https://hub.finpay.id/id/docs/finpay-money/registration/accountcreation Use this JSON payload to create a new customer account via the Account Creation API. Ensure all mandatory fields are provided. ```json { "partnerReferenceNo": "78912343452347892", "phoneNo": "08190123436", "name": "Finnet" } ``` -------------------------------- ### Params Object JSON Example Source: https://hub.finpay.id/id/docs/object/params Example of a JSON object containing the 'params' key with 'redirectToDeeplink'. This structure is used for specifying redirection targets. ```json { "params": { "redirectToDeeplink": "https://snapstag.finnet.co.id/health" } } ``` -------------------------------- ### Sample Generate Request (without BillInfo) Source: https://hub.finpay.id/id/docs/finpay-widget/generate-widget Use this sample to generate a widget request when bill details are not required. This simplifies the request payload. ```json { "backUrl": "https://testing.com/back", "trxId": "12315139062851", "username": "{{userName}}", "uniqKey": "12457365867", "returnUrl": "https://testing.com/return", "timestamp": "2024-07-19 14:15:20", "productCodes": [ "080003" ], "terminal": "Term0001", "terminalName": "Terminal Testing", "isNotif": true, "timeout": "1800", "merchantSignature": "55f70ab4b1ebaba89af351885f8a019db4713aaa498642f43f8f9ae1731430e7" } ``` -------------------------------- ### Example Cashout Transaction JSON Source: https://hub.finpay.id/id/docs/object/cashout-transaction An example of a cashout transaction object in JSON format, illustrating the expected structure and data types for each field. ```json "transaction": { "amount": "100000", "mobile_phone": "08112875234", "referenceNumber": "11047578623", "token": "371775", "trxId": "T4DU2409041109320101" } ``` -------------------------------- ### Customer Top Up API Sample Request Source: https://hub.finpay.id/id/docs/finpay-money/topup/customertopup This is a sample request body for the Customer Top Up API. Ensure all fields, including partnerReferenceNo, customerNumber, customerName, amount, feeAmount, and transactionDate, are correctly formatted. ```json { "partnerReferenceNo": "78912343452347893", "customerNumber": "081977817902", "customerName": "sa**", "amount": { "value": "10000.00", "currency": "IDR" }, "feeAmount": { "value": "0.00", "currency": "IDR" }, "transactionDate": "2022-09-23T14:56:11+07:00" } ``` -------------------------------- ### Sample Get Check Token Request Body Source: https://hub.finpay.id/id/docs/finpay-widget/check-token This is a sample JSON payload for the 'Get Check Token' API request. Ensure all required fields like productCodes, reqId, and trxId are included. ```json { "data": { "productCodes": "080003", "reqId": "20240814011024998", "trxId": "175082" }, "pagination": [], "stat_code": "APP:SUCCESS", "stat_msg": "Success" } ``` -------------------------------- ### POST /pg/payment/card/initiate Source: https://hub.finpay.id/id/docs/finpay-pg/api/credit-card/twoclick-payment Initiates a two-click payment transaction using a stored card token. ```APIDOC ## POST /pg/payment/card/initiate ### Description Initiates a simplified payment process for online transactions using a stored credit card token. ### Method POST ### Endpoint https://devo.finnet.co.id/pg/payment/card/initiate (Development) https://live.finnet.co.id/pg/payment/card/initiate (Production) ### Parameters #### Request Body - **order** (Object) - Required - Detail of Order - **customer** (Object) - Required - Detail of Customer - **url** (Object) - Required - Detail of Url - **billing** (Object) - Optional - Detail of Billing - **shipping** (Object) - Optional - Detail of Shipping - **meta** (Object) - Optional - Detail of MetaData - **card** (Object) - Required - Detail of Card - **recurring** (Object) - Optional - Detail of Recurring - **sourceOfFunds** (Object) - Required - Detail of SourceOfFunds - **device** (Object) - Optional - Detail of Device ### Request Example { "customer": { "id": "hajar.finnet@gmail.com", "email": "hajar.finnet@gmail.com", "firstName": "Hajar", "lastName": "Ismail", "mobilePhone": "+6281286288844" }, "order": { "id": "1685522371836", "amount": "1000", "currency": "IDR", "description": "Testing" }, "url": { "callbackUrl": "https://sandbox.finpay.co.id/simdev/finpay/result/tangkapCurl.php" }, "card": { "token": "81b36a850c2e40458bad296f952084b516c919ca717d448722782769b81b9fd9", "storedOnFile": "STORED" }, "sourceOfFunds": { "type": "cc" } } ### Response #### Success Response (200) - **responseCode** (Enum) - Response Code - **responseMessage** (String) - Response Message - **paymentCode** (String) - Optional - Payment Code - **redirecturl** (String) - Redirect URL - **expiryLink** (String) - Expiry Link - **processingTime** (Number) - Processing Time - **appurl** (String) - Optional - App URL - **imageurl** (String) - Optional - Image URL - **accountList** (Array) - Optional - Account List #### Response Example { "responseCode": "2000000", "responseMessage": "Success", "redirecturl": "https://devo.finpay.id/pg/payment/card/saved/c5f6c6be1943b963ee764b374f8a24a708ed42c26a6727fb13d6c583b75db316", "expiryLink": "2023-06-01 15:39:31", "processingTime": 0.2061138153076172 } ``` -------------------------------- ### GET /pg/payment/card/disbursement/disbursement/balance Source: https://hub.finpay.id/id/docs/disbursement/check-balance Retrieves the current account balance from the disbursement service. ```APIDOC ## GET /pg/payment/card/disbursement/disbursement/balance ### Description Retrieves the current account balance information. ### Method GET ### Endpoint https://devo.finnet.co.id/pg/payment/card/disbursement/disbursement/balance (Development) https://live.finnet.co.id/pg/payment/card/disbursement/disbursement/balance (Production) ### Response #### Success Response (200) - **responseCode** (Enum) - Response Code - **responseMessage** (String) - Response Message - **refCode** (String) - Reference Code - **destAccName** (String) - Destination Account Name - **feeAmount** (Number) - Amount Fee - **processingTime** (Number) - Processing Time #### Response Example { "responseCode": "2000000", "responseMessage": "Success", "balance": 4804995, "processingTime": 0.20158600807189941 } ``` -------------------------------- ### Sample Request Data Source: https://hub.finpay.id/id/docs/finpay-pg/after-payment/notification-callback Contoh struktur JSON untuk data request callback yang dikirimkan ke merchant. ```json { "customer": { "id": "hajar@yahoo.com" }, "order": { "id": "1664255905824", "reference": "16642559058241000000000", "amount": 1000, "currency": "IDR" }, "card": { "mask": "512345xxxxxx0008", "info": { "brand": "MASTERCARD", "issuing": "BANCO DEL PICHINCHA CA", "type": "CREDIT", "subType": "STANDARD", "country": "ECUADOR" } }, "meta": { "data": null }, "result": { "payment": { "amount": 1000, "status": "CAPTURED", "statusDesc": null } }, "signature": "8e77b8ffa3f2766e7cd5355b3a37e96feae5d924d3eb06aa374bf10cb1c95d02fa301c856d09463de4b6655815cc29d3829440bb5249b3390caaed42b15a7eb9" } ``` -------------------------------- ### TransAmount JSON Structure Source: https://hub.finpay.id/id/docs/object/transAmount Example of the required JSON format for the TransAmount object. ```json { "transAmount": { "currency": "IDR", "value": "10000.00" } } ``` -------------------------------- ### GET /accountList Source: https://hub.finpay.id/id/docs/object/account-list Retrieves a list of card accounts linked to the user profile. ```APIDOC ## GET /accountList ### Description Retrieves a list of card accounts associated with the user. Each account entry contains the card token, masked card number, expiry date, and the name on the card. ### Method GET ### Endpoint /accountList ### Response #### Success Response (200) - **accountList** (array) - A list of account objects. #### Response Example { "accountList": [ { "cardToken": "3f80fbb6c73e3b0a47bb0045090c8362975fb18a0ea7b68b272e498b246edf8a", "cardNumber": "512345xxxxxx0008", "expiryDate": "3309", "nameOnCard": "Hajar Ismail" } ] } ``` -------------------------------- ### Card Object JSON Structure Source: https://hub.finpay.id/id/docs/object/card Example of a populated Card object JSON structure. ```json "card": { "storedOnFile": "TO_BE_STORED", "token": "db2883bdb8b10f044fe3f0c3774f8ddff5b4267cac737b9a962dc704f212a0cc", "number": "5123450000000008", "expiryDate": "3309", "cvv": "100", "nameOnCard": "Hajar Direct" } ``` -------------------------------- ### Sample Request for Close Payment Source: https://hub.finpay.id/id/docs/finpay-pg/api/Virtual%20Account/close-payment Example JSON payload for initiating a payment request, including customer, order, and source of funds details. ```json { "customer": { "email": "hajar.finnet@gmail.com", "firstName": "Hajar", "lastName": "Ismail", "mobilePhone": "+6281286288844" }, "order": { "id": "1680576995412", "amount": "1000", "description": "Testing" }, "url": { "callbackUrl": "https://sandbox.finpay.co.id/simdev/finpay/result/resultfailed.php" }, "sourceOfFunds": { "type": "vamandiri" } } ``` -------------------------------- ### POST /pg/payment/card/initiate Source: https://hub.finpay.id/id/docs/finpay-pg/api/credit-card/basic-payment Initiates a card payment transaction through the Finpay Payment Gateway. Supports both Development and Production environments. ```APIDOC ## POST /pg/payment/card/initiate ### Description Initiates a card payment transaction. This endpoint is used to start the payment process by providing order, customer, and URL details. ### Method POST ### Endpoint - Development: `https://devo.finnet.co.id/pg/payment/card/initiate` - Production: `https://live.finnet.co.id/pg/payment/card/initiate` ### Parameters #### Request Body - **order** (Object) - Mandatory - Detail of Order - **customer** (Object) - Mandatory - Detail of Customer - **url** (Object) - Mandatory - Detail of Url - **billing** (Object) - Optional - Detail of Billing - **shipping** (Object) - Optional - Detail of Shipping - **meta** (Object) - Optional - Detail of MetaData - **card** (Object) - Optional - Detail of Card - **recurring** (Object) - Optional - Detail of Recurring - **sourceOfFunds** (Object) - Mandatory - Detail of SourceOfFunds - **device** (Object) - Optional - Detail of Device ### Request Example ```json { "customer": { "id": "hajar.finnet@gmail.com", "email": "hajar.finnet@gmail.com", "firstName": "Hajar", "lastName": "Ismail", "mobilePhone": "+6281286288800" }, "order": { "id": "1686716101151", "amount": "1000", "currency": "IDR", "description": "Testing" }, "url": { "callbackUrl": "https://sandboxx.finpay.co.id/simdev/finpay/result/tangkapCurl.php" }, "sourceOfFunds": { "type": "cc" } } ``` ### Response #### Success Response (200) - **responseCode** (Enum) - Response Code - **responseMessage** (String) - Response Message - **paymentCode** (String) - Payment Code - **redirecturl** (String) - Redirect URL - **expiryLink** (String) - Expiry Link - **processingTime** (Number) - Processing Time - **appurl** (String) - App URL - **imageurl** (String) - Image URL - **accountList** (Array) - Account List #### Response Example ```json { "responseCode": "2000000", "responseMessage": "Success", "redirecturl": "https://devo.finpay.id/pg/payment/card/access/32067d326642e071a66eed548822f0ef0c00adea760b1204b89e1ee95e12bd24", "expiryLink": "2022-09-06 17:02:18", "processingTime": 0.6609270572662354 } ``` ``` -------------------------------- ### Authentication 3DS2 JSON Structure Source: https://hub.finpay.id/id/docs/object/authentication-3ds2 Example of the JSON structure for the 3DS2 authentication object. ```json "authentication": { "3ds2": { "custom": { "contoh": "1" }, "protocolVersion": "2.1.0", "statusReasonCode": "AB", "transactionStatus": "Y" } } ``` -------------------------------- ### 3DS Initiation Request Sample Source: https://hub.finpay.id/id/docs/finpay-pg/api/credit-card/threeds-initiation This JSON object represents a sample request payload for initiating a 3D Secure transaction. It includes detailed customer, order, URL, card, billing, shipping, device, payment plan, and transaction information. ```json { "billing": { "address": { "city": "Jakarta Selatan", "company": "Finnet Indonesia", "country": "IDN", "postcodeZip": "12740", "stateProvince": "DKI Jakarta", "stateProvinceCode": "31", "street": "Jalan Gatot Subroto", "street2": "Jalan Gatot Subroto" } }, "shipping": { "method": "SAME_DAY", "origin": { "postcodeZip": "12740" }, "contact": { "email": "hajar.finnet@gmail.com", "firstName": "Hajar", "lastName": "Ismail", "mobilePhone": "+6281286288844", "phone": "+62211500770" }, "address": { "city": "Jakarta Selatan", "company": "Finnet Indonesia", "country": "IDN", "postcodeZip": "12740", "stateProvince": "DKI Jakarta", "stateProvinceCode": "31", "street": "Jalan Gatot Subroto", "street2": "Jalan Gatot Subroto", "source": "Jakarta", "sameAsBilling": "SAME" } }, "customer": { "id": "hajar@yahoo.com", "email": "hajar.finnet@gmail.com", "firstName": "Hajar", "lastName": "Ismail", "mobilePhone": "+6281286288844", "phone": "+6281286288844", "taxRegistrationId": "123456", "account": { "id": "1234" } }, "order": { "id": "{{orderId}}", "amount": "1000", "lifetime": "1000", "description": "Testing", "itemAmount": "900", "localTaxRegistrationId": "1234", "merchantCategoryCode": "1234", "surchargeAmount": "100", "item": [ { "brand": "brand1", "category": "category", "description": "description", "industryCategory": "industryCategory", "name": "name", "quantity": "1", "sku": "sku", "unitDiscountAmount": "100", "unitOfMeasure": "1", "unitPrice": "100", "unitTaxAmount": "100" }, { "brand": "brand2", "category": "category", "description": "description", "industryCategory": "industryCategory", "name": "name", "quantity": "1", "sku": "sku", "unitDiscountAmount": "100", "unitOfMeasure": "1", "unitPrice": "100", "unitTaxAmount": "100" } ], "subMerchant": { "disputeContactPhone": "+62211500770", "email": "hajar.finnet@gmail.com", "registeredName": "Finnet", "tradingName": "Finpay", "address": { "city": "Jakarta Selatan", "company": "Finnet Indonesia", "country": "IDN", "postcodeZip": "12740", "stateProvince": "DKI Jakarta", "stateProvinceCode": "31", "street": "Jalan Gatot Subroto", "street2": "Jalan Gatot Subroto" } } }, "recurring": { "productCode": "001001", "type": "PURCHASE", "id": "abcd", "amount": "1000", "interval": "1", "intervalUnit": "monthly", "maxInterval": "2", "startDate": "20220101", "endDate": "20220101", "retry": { "interval": "1", "intervalUnit": "minutes", "maxInterval": "1" } }, "url": { "backUrl": "https://sandbox.finpay.co.id/simdev/finpay/result/resultfailed.php", "successUrl": "https://sandbox.finpay.co.id/simdev/finpay/result/resultsuccess.php", "failUrl": "https://sandbox.finpay.co.id/simdev/finpay/result/resultfailed.php", "callbackUrl": "https://sandbox.finpay.co.id/simdev/finpay/result/tangkapCurl.php" }, "card": { "number": "5123450000000008" }, "device": { "ani": "1", "aniCallType": "ID", "browser": "MOZILLA", "fingerprint": "121311", "hostname": "telkom", "ipAddress": "202.1.201.1", "mobilePhoneModel": "ANDROID" }, "paymentPlan": { "term": "12" }, "transaction": { "mode": "PURCHASE" } } ``` -------------------------------- ### GET /pg/payment/card/cancel/{orderId} Source: https://hub.finpay.id/id/docs/finpay-pg/after-payment/cancel Cancels a previously generated transaction that has not yet been paid by the customer. ```APIDOC ## GET /pg/payment/card/cancel/{orderId} ### Description Cancels a transaction that has been generated but not yet paid. Once cancelled, the transaction status is updated to 'cancelled' and cannot be paid. ### Method GET ### Endpoint https://{environment}/pg/payment/card/cancel/{orderId} ### Parameters #### Path Parameters - **orderId** (string) - Required - The unique identifier of the order to be cancelled. #### Request Body - **order** (Object) - Required - Detail of Order - **id** (string) - Required - Order ID (Min: 1, Max: 12) - **amount** (string) - Required - Transaction amount ### Request Example { "order": { "id": "INVW777555755", "amount": "18050" } } ### Response #### Success Response (200) - **responseCode** (string) - Status code of the request - **responseMessage** (string) - Description of the result - **processingTime** (number) - Time taken to process the request - **traceId** (string) - Unique identifier for the request trace #### Response Example { "responseCode": "2000000", "responseMessage": "Request has been processed successfully", "processingTime": 0.24898290634155273, "traceId": "93a76615-a2c2-44fd-9dd3-1c0a22a6fe23" } ``` -------------------------------- ### Authentication 3DS JSON Structure Source: https://hub.finpay.id/id/docs/object/authentication-3ds Example of the JSON object structure for 3DS authentication data. ```json "authentication": { "3ds": { "acsEci": "A1", "authenticationToken": "TmFtYSBTYXlhIFNpYXBhIFlhYWE=", "transactionId": "ABC23456789" } } ``` -------------------------------- ### POST /pg/payment/card/initiate Source: https://hub.finpay.id/id/docs/finpay-pg/hosted-payment Initiates a hosted payment transaction. This endpoint is used to create a payment request and obtain a redirect URL for the user to complete the payment. ```APIDOC ## POST /pg/payment/card/initiate ### Description Initiates a hosted payment transaction. This endpoint is used to create a payment request and obtain a redirect URL for the user to complete the payment. ### Method POST ### Endpoint Development: `https://devo.finnet.co.id/pg/payment/card/initiate` Production: `https://live.finnet.co.id/pg/payment/card/initiate` ### Parameters #### Request Body - **order** (Object) - Required - Detail of Order - **customer** (Object) - Required - Detail of Customer - **url** (Object) - Required - Detail of Url - **billing** (Object) - Optional - Detail of Billing - **shipping** (Object) - Optional - Detail of Shipping - **meta** (Object) - Optional - Detail of MetaData - **card** (Object) - Optional - Detail of Card - **recurring** (Object) - Optional - Detail of Recurring - **sourceOfFunds** (Object) - Optional - Detail of SourceOfFunds - **device** (Object) - Optional - Detail of Device ### Request Example ```json { "customer": { "email": "hajar.finnet@gmail.com", "firstName": "Hajar", "lastName": "Ismail", "mobilePhone": "+6281286288844" }, "order": { "id": "order123", "amount": "1000", "description": "Testing" }, "url": { "callbackUrl": "https://sandbox.finpay.co.id/simdev/finpay/result/resultsuccess.php" } } ``` ### Response #### Success Response (200) - **responseCode** (Enum) - Response Code - **responseMessage** (String) - Response Message - **paymentCode** (String) - Optional - Payment Code - **redirecturl** (String) - Redirect URL - **expiryLink** (String) - Expiry Link - **processingTime** (Number) - Processing Time - **appurl** (String) - Optional - App URL - **imageurl** (String) - Optional - Image URL - **accountList** (Array) - Optional - Account List #### Response Example ```json { "responseCode": "2000000", "responseMessage": "Success", "redirecturl": "https://devo.finpay.id/pg/payment/card/v2/access/ebb8367ac6a3efcb2498766234a528536df37e01db10831523dc03c67234ef82", "expiryLink": "2023-05-18 14:55:24", "processingTime": 0.5706689357757568 } ``` ``` -------------------------------- ### GET /v1/widget/check/:token Source: https://hub.finpay.id/id/docs/finpay-widget/check-token Retrieves token validation and billing information required for the payment widget. ```APIDOC ## GET /v1/widget/check/:token ### Description Validates the provided token and returns data used for billing and payment operations. ### Method GET ### Endpoint https://{environment}/v1/widget/check/:token ### Parameters #### Path Parameters - **token** (string) - Required - The unique token to be checked. #### Query Parameters - **includeBill** (Boolean) - Required - With or Without BillInfo. - **productCodes** (Array) - Required - List Of Biller. - **reqId** (String) - Required - Request ID generated by App Widget. - **trxId** (String) - Required - Transaction ID generated by App Widget. ### Response #### Success Response (200) - **data** (Object) - Contains productCodes, reqId, and trxId. - **stat_code** (String) - Status code of the operation. - **stat_msg** (String) - Status message. #### Response Example { "data": { "productCodes": "080003", "reqId": "20240814011024998", "trxId": "175082" }, "pagination": [], "stat_code": "APP:SUCCESS", "stat_msg": "Success" } ```