Payment URL
Q Endpoints
getPaymentURL
This service registers the transaction and returns a URL with encrypted parameters to continue the sale
Request Method
POST
Inputs
M = Mandatory
O = Optional
Name | Type | Description |
---|---|---|
merchant_id (M) | string | Your merchant ID provided to you by Q |
login_id (M) | string | Your login id provided to you by Q |
Password (M) | string | Your password provided to you by Q |
api_key | string | Key defined by Q for this service |
merchant_transaction_id (M) | string (20) | Your unique id for this transaction determined by you. Max length of 20 characters Eg. Order number, invoice number, etc This value will be returned to you in the response |
transaction_amount (M) | int | The total order amount in NZ cents. |
include_product_codes (O) | List product_code | Optional attribute. This list of Q product codes will cause our payment gateway to ONLY display the products in this list. This gives you the ability to nominate a LTF product or list of products applicable to the items being purchased. N.B. If the product code supplied is invalid then itwill not be displayed. If this list causes no products to be available, you will receive an error |
exclude_product_codes (O) | List product_code | Optional attribute. This is a list of Q product codes to be excluded from your normal list of financial products. This gives you the ability to exclude financial products that you do not deem appropriate for the transaction/customer. |
product_code (M) | string | The financial product code as defined by Q |
url_response (M) | string | Your URL that Flexi Cards payment gateway should redirect the customer too after completion of purchase transaction. Applicable for approved, declined or cancelled transactions. When Flexi Cards Payment Gateway redirects the transaction back to the URL, the following query parameters will be added:
|
direct_to_url_response (M) | boolean | If false the customer will be directed to a response page upon completion of the transaction. This page will display the result of the transaction i.e. Approved / Declined. The customer will then automatically be redirected back to you url_response in approximately 5seconds. If true the customer will be redirected to the value set in the url_response parameter on completion of the transaction. It will then be your responsibility to notify the customer on the success or failure of the payment. |
lineItems (O) | List LineItem | Optional array of line items that the customer wishes to purchase. |
transmission_date_time (M) | string | Timestamp when the request is being generated. The format is:yyyyMMddHHmmss where : yyyyMMddHHmmss where : |
Outputs
Name | Type | Description |
---|---|---|
payment_url | string | The unique URL which you will use to redirect the customer to proceed with the payment. |
process_no | string | Unique reference for this transaction. This number is used as the input value for the getPayment Status to find out the progress of the transaction |
merchant_transaction_id | string | Merchant's unique ID for this transaction |
resultCode | string | 00 is successful. Any other value is an error state and the response should be treated as such |
resultDesc | string | Description of the code |
transmission_date_time | string | Timestamp when the response has been generated by Flexi Payment Gateway. The format is: yyyyMMddHHmmss where: yyyy = year represented with four digit MM = two digit month in the year number (1-12) dd = two digit day in the month number (1-31) HH = two digit hour in a day number (00 – 23) mm = two digit minutes in an hour number (00 – 59) ss = two digit seconds in a minute number (00 – 59) |
Examples
Rest Example Request
{
"merchant_id": "12321",
"login_id":"203399",
"password":"Password01",
"api_key":"2bef9740cd0be5995e58f9eef3249cabbd65d4bc",
"merchant_transaction_id": "123",
"transaction_amount": 2000,
"include_product_codes": {
"product_code": [
"6_MTHS","12_MTHS"
]
},
"url_response": "https://www.google.co.nz",
"direct_to_url_response": "True",
"lineItems": {
"lineItem": {
"merchant_product_code": "S7",
"description": "Galaxy S7",
"quantity": "1",
"amount": "2000"
}
},
"transmission_date_time": "20160909090990"
}
Rest Example Response - Success
{
"payment_url": "https://fpforawls02.int.rfs.co.nz:8812/gateway_simulator/payment/url?tid=josBrqe0cRAx2-QReFliFg&requestvalue=BT4ujqJ1md0MEN0Owl7fDrtYCIxJQlJKkkzfRRMCRSPVbOU2TvKiqDgtLQ73cJT4PogBAKdOjF-nJz8DFS4utj9vaNxhHzgXbbtB6Lu76882igkdInTFG7QQEYId47rP",
"process_no": "2000",
"merchant_transaction_id": "123",
"result": {
"resultCode": "00",
"resultDesc": "ACCEPT_SUCCESSFUL"
}
}
Rest Example Response - Unsuccessful
{
"payment_url": null,
"process_no": null,
"merchant_transaction_id": null,
"result": {
"resultCode": "203",
"resultDesc": "SYSTEM_ERROR"
},
"transmissionDateTime": null
}
Response Codes
Code | Value | Description |
---|---|---|
00 | ACCEPT_UNSUCCESSFUL | Web service was successful |
202 | NOT_VALID | Combination of attributes is invalid. Eg, no product codes are available due to transaction value thresholds |
203 | SYSTEM_ERROR | Unrecoverable error. If this issue persists please contact support |
204 | INVALID_USER_DETAIL | Either the username or password was incorrect |
209 | ACCESS_NOT_ALLOWED | Either the API Key is invalid or the service has been disabled |
257 | INVALID_PRODUCT_CODES | There are no applicable product codes for the request Possible Reasons:
|
Updated 3 months ago