Package com.xendit.model
Class QRCode
- java.lang.Object
-
- com.xendit.model.QRCode
-
public class QRCode extends java.lang.Object
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classQRCode.QRCodeStatusstatic classQRCode.QRCodeType
-
Constructor Summary
Constructors Constructor Description QRCode()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static QRCodecreateQRCode(java.lang.String externalId, QRCode.QRCodeType type, java.lang.String callbackUrl, java.lang.Number amount)Create QR Code with given parametersstatic QRCodecreateQRCode(java.util.Map<java.lang.String,java.lang.Object> params)Create QR Code with parameters in a HashMapstatic QRCodecreateQRCode(java.util.Map<java.lang.String,java.lang.String> headers, java.util.Map<java.lang.String,java.lang.Object> params)Create QR Code with headers and parameters in a HashMapstatic QRCodegetQRCode(java.lang.String externalId)Get QR Code by external id
-
-
-
Method Detail
-
createQRCode
public static QRCode createQRCode(java.lang.String externalId, QRCode.QRCodeType type, java.lang.String callbackUrl, java.lang.Number amount) throws XenditException
Create QR Code with given parameters- Parameters:
externalId- An ID of your choice. Often it is unique identifier in your system like customer ID or order IDtype- DYNAMIC or STATIC. DYNAMIC QR code contains the payment value upon scanning and can be paid multiple times. STATIC QR code requires end user to input the payment value and can be paid multiple timescallbackUrl- The URL to receive payment notification after payment has been made by end useramount- The payment value embedded in the QR code, end user can only pay the specified amount after scanning the QR code. For STATIC QR code, amount parameter will be ignored.- Returns:
- QRCode
- Throws:
XenditException- XenditException
-
createQRCode
public static QRCode createQRCode(java.util.Map<java.lang.String,java.lang.Object> params) throws XenditException
Create QR Code with parameters in a HashMap- Parameters:
params- listed here https://xendit.github.io/apireference/#create-qr-code- Returns:
- QRCode
- Throws:
XenditException- XenditException
-
createQRCode
public static QRCode createQRCode(java.util.Map<java.lang.String,java.lang.String> headers, java.util.Map<java.lang.String,java.lang.Object> params) throws XenditException
Create QR Code with headers and parameters in a HashMap- Parameters:
headers-params- listed here https://xendit.github.io/apireference/#create-qr-code- Returns:
- QRCode
- Throws:
XenditException- XenditException
-
getQRCode
public static QRCode getQRCode(java.lang.String externalId) throws XenditException
Get QR Code by external id- Parameters:
externalId- Merchant provided unique ID used to create QR code- Returns:
- QRCode
- Throws:
XenditException- XenditException
-
-