Pre-Auth & Capture - Payment API Credit Card
Setelah melakukan pendaftaran dengan tipe fitur Pre-Auth & Capture pada Pre-Auth & Capture - Registration API Credit Card, dapat melanjutkan langkah selanjutnya ke pada tersebut melalui ini.
Pelajari mengenai fitur dengan RecurringToken di Fitur Kartu Kredit atau kunjungi penjelasan teknis mengenai Pre-Auth Capture di Pre-Auth & Capture - Payment API Credit Card.
API Endpoint | /nicepay/direct/v2/payment |
Request Method | POST |
Description | Pre-Auth (Hold Fund) |
Merchant Token | SHA256(timeStamp+iMid+referenceNo+amt+merchantKey) |
Request Format | application/json |
Untuk dapat melakukan fitur Pre-Auth dari akan lakukan, diperlukan untuk mengisi tXid dari hasil response pada Pre-Auth & Capture - Registration API Credit Card sudah lakukan sebelumnya.
Parameter | Tipe | Ukuran | Deskripsi | Contoh / Catatan |
timeStamp Required | N | 14 | Request Timestamp (YYYYMMDDHH24MISS) | 20230522130518 |
tXid Required | AN | 30 | Transaction ID | IONPAYTEST01202305161007570327 |
referenceNo Required | ANS | 40 | ||
merchantToken Required | AN | 255 | ff139e49606387091cd9baeadff3161aff6afd9406e1f481e0fdb8b46d1ae5ae | |
cardHolderNm Required | AN | 45 | Card Holder Name | John Doe |
cardHolderEmail Required | ANS | 100 | Card Holder Email | |
cardCvv Required | N | 6 | Card CVV | 100 |
callBackUrl Required | ANS | 255 | https://www.merchant.com/callbackUrl/ |
juga memerlukan cardNo, cardExpYymm, cardHolderNm, cardHolderEmail & cardCvv bisa dapatkan dari agar tagihan nya dapat di.
Parameter | Tipe | Ukuran | Deskripsi | Contoh / Catatan |
timeStamp | N | 14 | Response Date (YYYYMMDDHH24MISS) | 20230516135959 |
resultCd | N | 4 | Result Code | 0000 |
resultMsg | AN | 255 | Result Message: Error Code | SUCCESS |
tXid | AN | 30 | Transaction ID | IONPAYTEST01202305161007570327 |
referenceNo | ANS | 40 | MerchantReferenceNumber001 | |
payMethod | N | 2 | 01 When Success | |
amount | N | 12 | 10000 When Success | |
currency | AN | 3 | Currency | IDR When Success |
goodsNm | AN | 100 | Goods Name | |
billingNm | AN | 100 | Buyer Name | John Doe When Success |
transDt | N | 8 | Transaction Date (YYYYMMDD) | 20230522 When Success |
transTm | N | 6 | Transaction Time (HH24MISS) | 135959 When Success |
description | AN | 100 | Description | |
authNo | N | 10 | Approval Number | 123456 When Success |
issuBankCd | A | 4 | CENA When Success | |
acquBankCd | A | 4 | BNIA When Success | |
cardNo | AN | 20 | Card Number (Masked) | 443426******0008 When Success
|
cardExpYymm | N | 4 | Card Expiry (YYMM) | 3901 When Success |
instmntMon | N | 2 | Installment Month | 1 When Success |
instmnType | N | 2 | 1 When Success | |
preauthToken | AN | | Pre-Auth Token | 5c6ba40e61c45d9fa37e763ea1f86b9d6ac5f1f7ed279e4d4531191c83279320 When Success |
ccTransType | AN | 2 | 3 When Success | |
vat | N | 12 | 0 When Success | |
fee | N | 12 | Service Fee | 0 When Success |
notaxAmt | N | 12 | Tax Free Amount | 0 When Success |
acquBankNm | A | 255 | CIMB | |
issuBankNm | A | 255 | BCA |
Apabila ini berhasil maka dana sudah dibayarkan akan di-hold secara otomatis dan pun akan mendapatkan preauthToken diperlukan untuk melakukan Capture nantinya.
API URL | /nicepay/direct/v2/payment |
Request Method | POST |
Description | Capture Process from Pre-Auth |
Merchant Token | SHA256(timeStamp+iMid+referenceNo+amt+merchantKey) |
Request Format | application/json |
Setelah mendapatkan preauthToken pada sudah dibayarkan oleh dan di API Pre-Auth Payment (Hold),
Langkah selanjutnya adalah melakukan Capture pada dana telah di-hold. Namun, untuk melakukan itu, diperlukan untuk registrasi kembali dengan baru pada Pre-Auth & Capture - Registration API Credit Card dengan amount capture harus berjumlah kurang atau sama dari amount telah di-hold pada Pre-Auth sebelumnya.
Berikut ini adalah daftar untuk melakukan menggunakan PreauthToken tanpa cardNo, cardExpYymm maupun cardCvv.
Parameter | Tipe | Ukuran | Deskripsi | Contoh / Catatan |
timeStamp Required | N | 14 | Request Timestamp (YYYYMMDDHH24MISS) | 20230516135959 |
tXid Required | AN | 30 | Transaction ID | IONPAYTEST01202305161007570327 |
referenceNo Required | ANS | 40 | MerchantReferenceNumber001 | |
merchantToken Required | AN | 255 | ff139e49606387091cd9baeadff3161aff6afd9406e1f481e0fdb8b46d1ae5ae | |
cardHolderNm Required | AN | 45 | Card Holder Name | John Doe |
cardCvv | N | 6 | Card CVV | 100 |
callBackUrl Required | ANS | 255 | https://www.nicepay.co.id/IONPAY_CLIENT/paymentResult.jsp | |
preauthToken Required For Capture Process in Pre-Auth | AN | 64 | Pre-Auth Token | 5976c263fe6116503645057bb00be809c3a6f9c1e355efa12ef2cda2be03d5eb |
Parameter | Tipe | Ukuran | Deskripsi | Contoh / Catatan |
timeStamp | N | 14 | Response Date (YYYYMMDDHH24MISS) | 20230516135959 |
resultCd | N | 4 | Result Code | 0000 |
resultMsg | AN | 255 | Result Message: Error Code | SUCCESS |
tXid | AN | 30 | Transaction ID | IONPAYTEST01202305161007570327 |
referenceNo | ANS | 40 | MerchantReferenceNumber001 | |
payMethod | N | 2 | 01 When Success | |
amount | N | 12 | 10000 When Success | |
currency | AN | 3 | Currency | IDR When Success |
goodsNm | AN | 100 | Goods Name | |
billingNm | AN | 100 | Buyer Name | John Doe When Success |
transDt | N | 8 | Transaction Date (YYYYMMDD) | 20230522 When Success |
transTm | N | 6 | Transaction Time (HH24MISS) | 224343 When Success |
description | AN | 100 | Description | |
authNo | N | 10 | Approval Number | 123456 When Success |
issuBankCd | A | 4 | CENA When Success | |
acquBankCd | A | 4 | BNIA When Success | |
cardNo | AN | 20 | Card Number (Masked) | 51234500****0008 When Success
|
cardExpYymm | N | 4 | Card Expiry (YYMM) | 3901 When Success |
instmntMon | N | 2 | Installment Month | 1 When Success |
instmnType | N | 2 | 1 When Success | |
ccTransType | AN | 2 | 3 When Success | |
vat | N | 12 | 0 When Success | |
fee | N | 12 | Service Fee | 0 When Success |
notaxAmt | N | 12 | Tax Free Amount | 0 When Success |
acquBankNm | A | 255 | CIMB | |
issuBankNm | A | 255 | BCA |
Saat Callback telah diterima callbackUrl , kami sangat menganjurkan untuk melakukan verifikasi Status menggunakan Status Inquiry - API Credit Card.