Transaction API
Scroll down for code samples, example requests and responses. Select a language for code samples from the tabs above or the mobile navigation menu.
Till Payments Gateway - Payment Platform
Endpoint: https://gateway.fishbulbpay.com.au/api
Request format
Requests to the Transaction API are sent via HTTPS containing a JSON body.
- The server accepts TLS version >= 1.2 connections.
- Content-Type must be
application/json - Authentication credentials are sent via Bearer Auth (see below)
Headers Example:
Content-Type: application/json; charset=utf-8
Accept: application/json
Authorization: Bearer {your access token}
Authentication
Get your client_id and client_secret
Login to the gateway dashboard and get your client_id and client_secret from the API Keys section.
You will use these to generate an access token.
For you to create transactions like DEBIT and REFUND, you first need to have an access_token.
The access_token must be sent as part of your header when making an API call to the gateway.
Requesting for an access_token:
-
Make a POST request to
https://gateway.fishbulbpay.com.au/oauth/tokenwith the following request body{ "client_id": "your client_id", "client_secret": "your client_secret", "username": "your username", "password": "your password", "grant_type": "password" } - From the response you can get your
access_token{ "token_type": "Bearer", "expires_in": 36000, "access_token": "eyJ0eXAiOiJKV1...zfi5GUdzj6tPg3HB9QzvMBAVYg", "refresh_token": "def50200a6a89da473...88cfaa076d53e", } - Use your access_token when making a transaction as part of the header
"Authorization": "Bearer {access_token}"
Error handling
Example
{
"success": false,
"errorMessage": "invalid data",
"errorCode": 1004
}
General errors, such as authentication errors or validation errors will return an appropriate JSON response body containing an error message and error code.
| Name | type |
|---|---|
| success | boolean |
| errorMessage | string |
| errorCode | int |
For errors caused during the processing of requests, please refer to the
corresponding request's respond section.
Transaction Request
The examples show the basic data most connector requires. Depending on the connector type more data could be necessary. Please refer to the Connector Types documentation for concrete requirements.
To see all available fields please refer to Transaction Data.
For some languages we already provide a ready-to-use client implementation on GitHub.
Debit
Code samples
<?php
require 'vendor/autoload.php';
$headers = array(
'Content-Type' => 'application/json',
'Accept' => 'application/json',
);
$client = new \GuzzleHttp\Client();
// Define array of request body.
$request_body = array();
try {
$response = $client->request('POST','https://gateway.fishbulbpay.com.au/api/transaction/debit', array(
'headers' => $headers,
'json' => $request_body,
)
);
print_r($response->getBody()->getContents());
}
catch (\GuzzleHttp\Exception\BadResponseException $e) {
// handle exception or api errors.
print_r($e->getMessage());
}
// ...
# You can also use wget
curl -X POST https://gateway.fishbulbpay.com.au/api/transaction/{apiKey}/debit \
-H 'Content-Type: application/json' \
-H 'Accept: application/json'
var client = new RestClient("https://gateway.fishbulbpay.com.au/api/transaction/debit");
var request = new RestRequest(Method.POST);
var data = "{}";
request.AddHeader("accept", "application/json");
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", data, ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
URL obj = new URL("https://gateway.fishbulbpay.com.au/api/transaction/debit");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("POST");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
response.append(inputLine);
}
in.close();
System.out.println(response.toString());
require 'rest-client'
require 'json'
headers = {
'Content-Type' => 'application/json',
'Accept' => 'application/json'
}
result = RestClient.post 'https://gateway.fishbulbpay.com.au/api/transaction/debit',
params: {
}, headers: headers
p JSON.parse(result)
import requests
headers = {
'Content-Type': 'application/json',
'Accept': 'application/json'
}
r = requests.post('https://gateway.fishbulbpay.com.au/api/transaction/debit', params={
}, headers = headers)
print r.json()
package main
import (
"bytes"
"net/http"
)
func main() {
headers := map[string][]string{
"Content-Type": []string{"application/json"},
"Accept": []string{"application/json"},
}
data := bytes.NewBuffer([]byte{jsonReq})
req, err := http.NewRequest("POST", "https://gateway.fishbulbpay.com.au/api/transaction/debit", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
// ...
}
const inputBody = '{}';
const headers = {
'Content-Type':'application/json',
'Accept':'application/json'
};
fetch('https://gateway.fishbulbpay.com.au/api/transaction/debit',
{
method: 'POST',
body: inputBody,
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
A Debit performs a complete customer-to-merchant payment
POST /transaction/debit
Request body
Request body example
{
"merchantTransactionId": "2019-09-02-0001",
"mode": "LIVE or SANDBOX"
"additionalId1": "x0001",
"additionalId2": "y0001",
"withRegister": true,
"referenceUuid": "b77a3980d3234a364707",
"merchantMetaData": "merchantRelevantData",
"amount": "9.99",
"currency": "EUR",
"callbackUrl": "http://example.com/callback",
"transactionToken": "ix::tRaNsAcT1OnToK3N",
"description": "Example Product",
"customer": {
"identification": "c0001",
"firstName": "John",
"lastName": "Doe",
"birthDate": "1990-10-10",
"gender": "M",
"billingAddress1": "Maple Street 1",
"billingAddress2": "Syrup Street 2",
"billingCity": "Victoria",
"billingPostcode": "V8W",
"billingState": "British Columbia",
"billingCountry": "CA",
"billingPhone": "1234567890",
"shippingFirstName": "John",
"shippingLastName": "Doe",
"shippingCompany": "Big Company Inc.",
"shippingAddress1": "Yellow alley 3",
"shippingAddress2": "Yellow alley 4",
"shippingCity": "Victoria",
"shippingPostcode": "V8W",
"shippingState": "British Columbia",
"shippingCountry": "CA",
"shippingPhone": "1234567890",
"company": "John's Maple Syrup",
"email": "jon@example.com",
"emailVerified": false,
"ipAddress": "127.0.0.1",
"nationalId": "123123"
},
"language": "en"
}
| Name | Type | Required | Description |
|---|---|---|---|
| merchantTransactionId | string | true | your unique transaction ID |
| mode | string | true | LIVE or SANDBOX |
| amount | string | true | decimals separated by ., max. 3 decimals |
| currency | string | true | 3 letter currency code |
| customer | object | true | see Customer |
| additionalId1 | string | false | any additional ID if required by adapter |
| additionalId2 | string | false | any additional ID if required by adapter |
| withRegister | boolean | false | store customer's payment instrument for recurring transactions |
| referenceUuid | string | false | UUID of an initial transaction |
| merchantMetaData | string | false | max. 255 characters |
| referenceUuid | string | false | UUID of an initial transaction |
| callbackUrl | string | false | endpoint to receive status notifications |
| transactionToken | string | true | token generated via payment.js |
| description | string | false | max. 255 characters |
| items | object | false | object containing Items |
| language | string | false | 2 characters |
Response
Example responses
finished
{
"success": true,
"uuid": "abcde12345abcde12345",
"purchaseId": "20190927-abcde12345abcde12345",
"returnType": "FINISHED",
"paymentMethod": "Creditcard"
}
redirect
{
"success": true,
"uuid": "abcde12345abcde12345",
"purchaseId": "20190927-abcde12345abcde12345",
"returnType": "REDIRECT",
"redirectUrl": "http://redirectComesUrlHere.com",
"paymentMethod": "Creditcard"
}
errors
{
"success": false,
"uuid": "abcde12345abcde12345"
"purchaseId": "20190927-abcde12345abcde12345",
"returnType": "ERROR",
"paymentMethod": "Creditcard",
"errors": [
{
"errorMessage": "Request failed",
"errorCode": 1000,
"adapterMessage": "Invalid parameters given",
"adapterCode": "1234"
}
]
}
| Name | Type | Description |
|---|---|---|
| success | boolean | returns true or false depending on whether the request was successful |
| uuid | string | UUID of the transaction |
| purchaseId | string | purchase ID of the transaction |
| returnType | string | FINISHED, REDIRECT, HTML, PENDING, ERROR |
| redirectType | string | iframe, fullpage, 3ds |
| redirectUrl | string | where the customer must be redirected to |
| htmlContent | string | |
| paymentDescriptor | string | |
| paymentMethod | string | payment method used (if already determined) |
| returnData | object | containing one of ReturnData |
| scheduleData | object | see ScheduleData |
| customerProfileData | object | see CustomerProfileData |
| riskCheckData | object | see RiskCheckData |
| extraData | object | object containing key-value pairs (string-to-string) |
| errors | object | contains transaction errors, see TransactionResponseError |
Refund
Code samples
<?php
require 'vendor/autoload.php';
$headers = array(
'Content-Type' => 'application/json',
'Accept' => 'application/json',
);
$client = new \GuzzleHttp\Client();
// Define array of request body.
$request_body = array();
try {
$response = $client->request('POST','https://gateway.fishbulbpay.com.au/api/transaction/refund', array(
'headers' => $headers,
'json' => $request_body,
)
);
print_r($response->getBody()->getContents());
}
catch (\GuzzleHttp\Exception\BadResponseException $e) {
// handle exception or api errors.
print_r($e->getMessage());
}
// ...
# You can also use wget
curl -X POST https://gateway.fishbulbpay.com.au/api/transaction/{apiKey}/refund \
-H 'Content-Type: application/json' \
-H 'Accept: application/json'
var client = new RestClient("https://gateway.fishbulbpay.com.au/api/transaction/refund");
var request = new RestRequest(Method.POST);
var data = "{}";
request.AddHeader("accept", "application/json");
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", data, ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
URL obj = new URL("https://gateway.fishbulbpay.com.au/api/transaction/refund");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("POST");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
response.append(inputLine);
}
in.close();
System.out.println(response.toString());
require 'rest-client'
require 'json'
headers = {
'Content-Type' => 'application/json',
'Accept' => 'application/json'
}
result = RestClient.post 'https://gateway.fishbulbpay.com.au/api/transaction/refund',
params: {
}, headers: headers
p JSON.parse(result)
import requests
headers = {
'Content-Type': 'application/json',
'Accept': 'application/json'
}
r = requests.post('https://gateway.fishbulbpay.com.au/api/transaction/refund', params={
}, headers = headers)
print r.json()
package main
import (
"bytes"
"net/http"
)
func main() {
headers := map[string][]string{
"Content-Type": []string{"application/json"},
"Accept": []string{"application/json"},
}
data := bytes.NewBuffer([]byte{jsonReq})
req, err := http.NewRequest("POST", "https://gateway.fishbulbpay.com.au/api/transaction/refund", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
// ...
}
const inputBody = '{}';
const headers = {
'Content-Type':'application/json',
'Accept':'application/json'
};
fetch('https://gateway.fishbulbpay.com.au/api/transaction/refund',
{
method: 'POST',
body: inputBody,
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
A Refund reverses a payment which was previously performed with Debit.
Depending on the payment method you can even refund only a partial amount of the original transaction amount.
POST /transaction/refund
Request body
Request body example
{
"merchantTransactionId": "2019-09-02-0007",
"mode": "LIVE or SANDBOX"
"referenceUuid": "bcdef23456bcdef23456",
"amount": "9.99",
"currency": "EUR",
"callbackUrl": "http://example.com/callback",
"description": "Refund money"
}
| Name | Type | Required | Description |
|---|---|---|---|
| merchantTransactionId | string | true | your unique transaction ID |
| mode | string | true | LIVE or SANDBOX |
| amount | string | true | decimals separated by ., max. 3 decimals |
| currency | string | true | 3 letter currency code |
| referenceUuid | string | true | UUID of a debit or capture |
| additionalId1 | string | false | any additional ID if required by adapter |
| additionalId2 | string | false | any additional ID if required by adapter |
| extraData | object | false | object containing key-value pairs (string-to-string) |
| merchantMetaData | string | false | max. 255 characters |
| callbackUrl | string | false | endpoint to receive status notifications |
| transactionToken | string | false | token generated via payment.js |
| description | string | false | max. 255 characters |
| items | object | false | object containing Items |
Response
Example responses
finished
{
"success": true,
"uuid": "abcde12345abcde12345",
"purchaseId": "20190927-abcde12345abcde12345",
"returnType": "FINISHED",
"paymentMethod": "Creditcard"
}
redirect
{
"success": true,
"uuid": "abcde12345abcde12345",
"purchaseId": "20190927-abcde12345abcde12345",
"returnType": "REDIRECT",
"redirectUrl": "http://redirectComesUrlHere.com",
"paymentMethod": "Creditcard"
}
errors
{
"success": false,
"uuid": "abcde12345abcde12345"
"purchaseId": "20190927-abcde12345abcde12345",
"returnType": "ERROR",
"paymentMethod": "Creditcard",
"errors": [
{
"errorMessage": "Request failed",
"errorCode": 1000,
"adapterMessage": "Invalid parameters given",
"adapterCode": "1234"
}
]
}
| Name | Type | Description |
|---|---|---|
| success | boolean | returns true or false depending on whether the request was successful |
| uuid | string | UUID of the transaction |
| purchaseId | string | purchase ID of the transaction |
| returnType | string | FINISHED, REDIRECT, HTML, PENDING, ERROR |
| redirectType | string | iframe, fullpage, 3ds |
| redirectUrl | string | where the customer must be redirected to |
| htmlContent | string | |
| paymentDescriptor | string | |
| paymentMethod | string | payment method used (if already determined) |
| returnData | object | containing one of ReturnData |
| scheduleData | object | see ScheduleData |
| customerProfileData | object | see CustomerProfileData |
| riskCheckData | object | see RiskCheckData |
| extraData | object | object containing key-value pairs (string-to-string) |
| errors | object | contains transaction errors, see TransactionResponseError |
Transaction Response
As response to the API call the gateway answers with a response containing the status and further instructions.
Generally there are 4 possible results:
FINISHED
{
"success": true,
"uuid": "abcde12345abcde12345",
"purchaseId": "20190927-abcde12345abcde12345",
"returnType": "FINISHED",
"paymentMethod": "Creditcard"
}
The transaction completed and was processed successfully. You can deliver the ordered goods.
ERROR
{
"success": false,
"uuid": "abcde12345abcde12345"
"purchaseId": "20190927-abcde12345abcde12345",
"returnType": "ERROR",
"paymentMethod": "Creditcard",
"errors": [
{
"errorMessage": "Request failed",
"errorCode": 1000,
"adapterMessage": "Invalid parameters given",
"adapterCode": "1234"
}
]
}
The transaction failed or was declined. See the error code and message for further details.
You will find the native error message and code from the payment provider/acquiring bank in the fields adapterMessage and adapterCode.
REDIRECT
{
"success": true,
"uuid": "abcde12345abcde12345",
"purchaseId": "20190927-abcde12345abcde12345",
"returnType": "REDIRECT",
"redirectUrl": "http://redirectComesUrlHere.com",
"paymentMethod": "Creditcard"
}
You must redirect the user to the URL defined in redirectUrl to proceed with the transaction. Afterwards the user will be back redirected to your shop (one of the URLs you defined in the API call in successUrl, cancelUrl or errorUrl). In parallel the gateway sends a status notification to you callbackUrl with the final result.
PENDING
{
"success": true,
"uuid": "abcde12345abcde12345",
"purchaseId": "20190927-abcde12345abcde12345",
"returnType": "PENDING",
"paymentMethod": "Creditcard"
}
The transaction was accepted for processing, but is not yet completed. You will receive a status notification to the URL you defined in callbackUrl once it reaches a final state.
Depending on the payment method, this can take from seconds up to several days.
Transaction Data
Customer
Example
{
"customer": {
"identification": "c0001",
"firstName": "John",
"lastName": "Doe",
"birthDate": "1990-10-10",
"gender": "M",
"billingAddress1": "Maple Street 1",
"billingAddress2": "Syrup Street 2",
"billingCity": "Victoria",
"billingPostcode": "V8W",
"billingState": "British Columbia",
"billingCountry": "CA",
"billingPhone": "1234567890",
"shippingFirstName": "John",
"shippingLastName": "Doe",
"shippingCompany": "Big Company Inc.",
"shippingAddress1": "Yellow alley 3",
"shippingAddress2": "Yellow alley 4",
"shippingCity": "Victoria",
"shippingPostcode": "V8W",
"shippingState": "British Columbia",
"shippingCountry": "CA",
"shippingPhone": "1234567890",
"company": "John's Maple Syrup",
"email": "[email protected]",
"emailVerified": false,
"ipAddress": "127.0.0.1",
"nationalId": "123123",
"extraData": {
"someCustomerDataKey": "value",
"anotherKey": "anotherValue"
}
}
}
| Name | Type | Required | Description |
|---|---|---|---|
| identification | string | false | max. 36 characters |
| firstName | string | false | max. 50 characters |
| lastName | string | false | max. 50 characters |
| birthDate | string | false | YYYY-MM-DD |
| gender | string | false | M, F |
| billingAddress1 | string | false | max. 50 characters |
| billingAddress2 | string | false | max. 50 characters |
| billingCity | string | false | max. 30 characters |
| billingPostcode | string | false | max. 8 characters |
| billingState | string | false | max. 30 characters |
| billingCountry | string | false | 2-letter country code |
| billingPhone | string | false | max. 20 characters |
| shippingFirstName | string | false | max. 50 characters |
| shippingLastName | string | false | max. 50 characters |
| shippingCompany | string | false | max. 50 characters |
| shippingAddress1 | string | false | max. 50 characters |
| shippingAddress2 | string | false | max. 50 characters |
| shippingCity | string | false | max. 30 characters |
| shippingPostcode | string | false | max. 8 characters |
| shippingState | string | false | max. 30 characters |
| shippingCountry | string | false | 2-letter country code |
| shippingPhone | string | false | max. 20 characters |
| company | string | false | max. 50 characters |
| string | false | valid e-mail | |
| emailVerified | boolean | false | |
| ipAddress | string | false | |
| nationalId | string | false | max. 14 characters |
| extraData | object | false | object containing key-value pairs (string-to-string) |
| paymentData | object | false | one of PaymentData |
CustomerProfileData
| Name | Type | Required | Description |
|---|---|---|---|
| profileGuid | string | conditional | |
| customerIdentification | string | conditional | |
| markAsPreferred | boolean | false | mark payment instrument as preferred |
Item
| Name | Type | Required | Description |
|---|---|---|---|
| identification | string | false | |
| name | string | false | |
| description | string | false | |
| quantity | number | false | |
| price | number | false | |
| currency | string | false | 3 letter currency code |
| extraData | object | false | object containing key-value pairs (string-to-string) |
PaymentData
ibanData
Example
{
"paymentData": {
"ibanData": {
"iban": "AT123456789012345678",
"bic": "ABC",
"mandateId": "1234",
"mandateDate": "2019-09-29"
}
}
}
| Name | Type | Required | Description |
|---|---|---|---|
| iban | string | false | |
| bic | string | false | |
| mandateId | string | false | |
| mandateDate | string | false | YYYY-MM-DD |
walletData
Example
{
"paymentData": {
"walletData": {
"walletType": "paypal",
"walletOwner": "John Doe",
"walletReferenceId": "12345abcde"
}
}
}
| Name | Type | Required | Description |
|---|---|---|---|
| walletType | string | false | Type of wallet |
| walletOwner | string | false | Owner |
| walletReferenceId | string | false | Reference ID |
ReturnData
cardData
Example cardData
{
"_TYPE": "cardData",
"type": "visa",
"cardHolder": "John Doe",
"expiryMonth": 12,
"expiryYear": 2020,
"firstSixDigits": "123456",
"lastFourDigits": "4321",
"fingerprint": "s0mEF1n6eRpr1n7",
"threeDSecure": "OFF",
"binBrand": "VISA",
"binBank": "SOME BANK",
"binCountry": "US"
}
| Name | Type | Description |
|---|---|---|
| _TYPE | string | will contain value cardData |
| type | string | type of credit card |
| firstName | string | |
| lastName | string | |
| country | string | |
| cardHolder | string | |
| expiryMonth | number | MM |
| expiryYear | number | YYYY |
| firstSixDigits | string | |
| lastFourDigits | string | |
| fingerprint | string | |
| binBrand | string | |
| binBank | string | |
| binType | string | |
| binLevel | string | |
| binCountry | string | |
| threeDSecure | string | |
| eci | string |
ibanData
Example ibanData
{
"_TYPE": "ibanData",
"accountOwner": "John Doe",
"iban": "AT123456789012345678",
"bic": "ABC",
"bankName": "ABC Bank",
"country": "US"
}
| Name | Type | Description |
|---|---|---|
| _TYPE | string | will contain value ibanData |
| accountOwner | string | |
| iban | string | |
| bic | string | |
| bankName | string | |
| country | string |
phoneData
Example phoneData
{
"_TYPE": "phoneData",
"phoneNumber": "1234567890",
"country": "US",
"operator": "OperatorXy"
}
| Name | Type | Description |
|---|---|---|
| _TYPE | string | will contain value phoneData |
| phoneNumber | string | |
| country | string | |
| operator | string |
walletData
Example walletData
{
"_TYPE": "walletData",
"walletReferenceId": "1234567890",
"walletOwner": "John Doe",
"walletType": "someType"
}
| Name | Type | Description |
|---|---|---|
| _TYPE | string | will contain value walletData |
| walletReferenceId | string | |
| walletOwner | string | |
| walletType | string |
RiskCheckData
| Name | Type | Description |
|---|---|---|
| riskCheckResult | string | APPROVED, DECLINED, REVIEW |
| riskScore | number | |
| threeDSecureRequired | boolean |
Schedule
| Name | Type | Required | Description |
|---|---|---|---|
| amount | string | true | decimals separated by ., max. 3 decimals |
| currency | string | true | 3 letter currency code |
| periodLength | number | true | |
| periodUnit | string | true | DAY, WEEK, MONTH, YEAR |
| startDateTime | string | false | RFC8601 Date/Time YYYY-MM-DD\THH:MM:SS+00:00 |
ScheduleData
| Name | Type | Description |
|---|---|---|
| scheduleId | string | ID of schedule which was started with the transaction |
| scheduleStatus | string | status of schedule |
| scheduledAt | string | scheduled date and time |
TransactionError
| Name | Type |
|---|---|
| message | string |
| code | number |
| adapterMessage | string |
| adapterCode | string |
TransactionResponseError
| Name | Type |
|---|---|
| errorMessage | string |
| errorCode | number |
| adapterMessage | string |
| adapterCode | string |
3D-Secure 2.0 data
As explained in 3D Secure 2.0 Authentication you should provide as many data as you have to apply for the 3D Secure 2.0 frictionless flow.
ThreeDSecureData
{
...
"threeDSecureData": {
"3dsecure": "MANDATORY",
"channel" => "01",
"authenticationIndicator" => "01" ,
"cardholderAuthenticationMethod" => "01" ,
"cardholderAuthenticationDateTime" => "2020-01-01 12:00",
...
}
}
| Name | Type | Required | Accepted values |
|---|---|---|---|
3dsecureTriggers the 3D Secure authentication for this transaction |
string | false | OFF, OPTIONAL, MANDATORY |
channelIndicates the type of channel interface being used to initiate the transaction 01 -> App-based 02 -> Browser 03 -> 3DS Requestor Initiated |
string | false | 01, 02, 03 |
authenticationIndicatorIndicates the type of Authentication request. This data element provides additional information to the ACS to determine the best approach for handling an authentication request. 01 -> Payment transaction 02 -> Recurring transaction 03 -> Installment transaction 04 -> Add card 05 -> Maintain card 06 -> Cardholder verification as part of EMV token ID&V |
string | false | 01, 02, 03 |
cardholderAuthenticationMethodMechanism used by the Cardholder to authenticate to the 3DS Requestor. 01 -> No 3DS Requestor authentication occurred (i.e. cardholder "logged in" as guest) 02 -> Login to the cardholder account at the 3DS Requestor system using 3DS Requestor's own credentials 03 -> Login to the cardholder account at the 3DS Requestor system using federated ID 04 -> Login to the cardholder account at the 3DS Requestor system using issuer credentials 05 -> Login to the cardholder account at the 3DS Requestor system using third-party authentication 06 -> Login to the cardholder account at the 3DS Requestor system using FIDO Authenticator |
string | false | 01, 02, 03, 04, 05, 06 |
cardholderAuthenticationDateTimeDate and time in UTC of the cardholder authentication. Format: YYYY-MM-DD HH:mm Example: 2019-05-12 18:34 |
string | false | YYYY-MM-DD HH:MM |
cardHolderAuthenticationDataData that documents and supports a specific authentication process. In the current version of the specification, this data element is not defined in detail, however the intention is that for each 3DS Requestor Authentication Method, this field carry data that the ACS can use to verify the authentication process. |
string | false | |
challengeIndicatorIndicates whether a challenge is requested for this transaction. For example: For 01-PA, a 3DS Requestor may have concerns about the transaction, and request a challenge. 01 -> No preference 02 -> No challenge requested 03 -> Challenge requested: 3DS Requestor Preference 04 -> Challenge requested: Mandate 05 -> No challenge requested (transactional risk analysis is already performed) 06 -> No challenge requested (Data share only) 07 -> No challenge requested (strong consumer authentication is already performed) 08 -> No challenge requested (utilise whitelist exemption if no challenge required) 09 -> Challenge requested (whitelist prompt requested if challenge required) |
string | false | 01, 02, 03, 04, 05, 06, 07, 08, 09 |
priorReferenceThis data element provides additional information to the ACS to determine the best approach for handling a request. The field is limited to 36 characters containing ACS Transaction ID for a prior authenticated transaction (for example, the first recurring transaction that was authenticated with the cardholder). |
string | false | |
priorAuthenticationMethodMechanism used by the Cardholder to previously authenticate to the 3DS Requestor. 01 -> Frictionless authentication occurred by ACS 02 -> Cardholder challenge occurred by ACS 03 -> AVS verified 04 -> Other issuer methods |
string | false | 01, 02, 03, 04 |
priorAuthenticationDateTimeDate and time in UTC of the prior authentication. Format: YYYY-MM-DD HH:mm Example: 2019-05-12 18:34 |
string | false | YYYY-MM-DD HH:MM |
priorAuthenticationDataData that documents and supports a specfic authentication porcess. In the current version of the specification this data element is not defined in detail, however the intention is that for each 3DS Requestor Authentication Method, this field carry data that the ACS can use to verify the authentication process. In future versionsof the application, these details are expected to be included. Field is limited to maximum 2048 characters. |
string | false | |
cardholderAccountTypeIndicates the type of account. For example, for a multi-account card product. 01 -> Not applicable 02 -> Credit 03 -> Debit 04 -> JCB specific value for Prepaid |
string | false | 01, 02, 03, 04 |
3ds:cardholderAccountAgeIndicatorLength of time that the cardholder has had the account with the 3DS Requestor. 01 -> No account (guest check-out) 02 -> During this transaction 03 -> Less than 30 days 04 -> 30 - 60 days 05 -> More than 60 days |
string | false | 01, 02, 03, 04, 05 |
cardholderAccountDateDate that the cardholder opened the account with the 3DS Requestor. Format: YYYY-MM-DD Example: 2019-05-12 |
string | false | YYYY-MM-DD |
cardholderAccountChangeIndicatorLength of time since the cardholder’s account information with the 3DS Requestor waslast changed. Includes Billing or Shipping address, new payment account, or new user(s) added. 01 -> Changed during this transaction 02 -> Less than 30 days 03 -> 30 - 60 days 04 -> More than 60 days |
string | false | 01, 02, 03, 04 |
cardholderAccountLastChangeDate that the cardholder’s account with the 3DS Requestor was last changed. Including Billing or Shipping address, new payment account, or new user(s) added. Format: YYYY-MM-DD Example: 2019-05-12 |
string | false | YYYY-MM-DD |
cardholderAccountPasswordChangeIndicatorLength of time since the cardholder’s account with the 3DS Requestor had a password change or account reset. 01 -> No change 02 -> Changed during this transaction 03 -> Less than 30 days 04 -> 30 - 60 days 05 -> More than 60 days |
string | false | 01, 02, 03, 04, 05 |
cardholderAccountLastPasswordChangeDate that cardholder’s account with the 3DS Requestor had a password change or account reset. Format: YYYY-MM-DD Example: 2019-05-12 |
string | false | YYYY-MM-DD |
shippingAddressUsageIndicatorIndicates when the shipping address used for this transaction was first used with the 3DS Requestor. 01 -> This transaction 02 -> Less than 30 days 03 -> 30 - 60 days 04 -> More than 60 days. |
string | false | 01, 02, 03, 04 |
shippingAddressFirstUsageDate when the shipping address used for this transaction was first used with the 3DS Requestor. Format: YYYY-MM-DD Example: 2019-05-12 |
string | false | YYYY-MM-DD |
transactionActivityDayNumber of transactions (successful and abandoned) for this cardholder account with the 3DS Requestor across all payment accounts in the previous 24 hours. |
number | false | |
transactionActivityYearNumber of transactions (successful and abandoned) for this cardholder account with the 3DS Requestor across all payment accounts in the previous year. |
number | false | |
addCardAttemptsDayNumber of Add Card attempts in the last 24 hours. |
number | false | |
purchaseCountSixMonthsNumber of purchases with this cardholder account during the previous six month |
number | false | |
suspiciousAccountActivityIndicatorIndicates whether the 3DS Requestor has experienced suspicious activity (including previous fraud) on the cardholder account. 01 -> No suspicious activity has been observed 02 -> Suspicious activity has been observed |
string | false | 01, 02 |
shippingNameEqualIndicatorIndicates if the Cardholder Name on the account is identical to the shipping Name used for this transaction. 01 -> Account Name identical to shipping Name 02 -> Account Name different than shipping Name |
string | false | 01, 02 |
paymentAccountAgeIndicatorIndicates the length of time that the payment account was enrolled in the cardholder’s account with the 3DS Requestor. 01 -> No account (guest check-out) 02 -> During this transaction 03 -> Less than 30 days 04 -> 30 - 60 days 05 -> More than 60 days |
string | false | 01, 02, 03, 04, 05 |
paymentAccountAgeDateDate that the payment account was enrolled in the cardholder’s account with the 3DS Requestor. Format: YYYY-MM-DD Example: 2019-05-12 |
string | false | YYYY-MM-DD |
billingAddressLine3Line 3 of customer's billing address |
string | false | |
shippingAddressLine3Line 3 of customer's shipping address |
string | false | |
billingShippingAddressMatchIndicates whether the Cardholder Shipping Address and Cardholder Billing Address are the same. Y -> Shipping Address matches Billing Address N -> Shipping Address does not match Billing Address |
string | false | Y, N |
homePhoneCountryPrefixCountry Code of the home phone, limited to 1-3 characters |
string | false | |
homePhoneNumbersubscriber section of the number, limited to maximum 15 characters. |
string | false | |
mobilePhoneCountryPrefixCountry Code of the mobile phone, limited to 1-3 characters |
string | false | |
mobilePhoneNumbersubscriber section of the number, limited to maximum 15 characters. |
string | false | |
workPhoneCountryPrefixCountry Code of the work phone, limited to 1-3 characters |
string | false | |
workPhoneNumbersubscriber section of the number, limited to maximum 15 characters. |
string | false | |
purchaseInstalDataIndicates the maximum number of authorisations permitted for instalment payments. The field is limited to maximum 3 characters and value shall be greater than 1. The fields is required if the Merchant and Cardholder have agreed to installment payments, i.e. if 3DS Requestor Authentication Indicator = 03. Omitted if not an installment payment authentication. |
number | false | |
shipIndicatorIndicates shipping method chosen for the transaction. Merchants must choose the Shipping Indicator code that most accurately describes the cardholder's specific transaction. If one or more items are included in the sale, use the Shipping Indicator code for the physical goods, or if all digital goods, use the code that describes the most expensive item. 01 -> Ship to cardholder's billing address 02 -> Ship to another verified address on file with merchant 03 -> Ship to address that is different than the cardholder's billing address 04 -> "Ship to Store" / Pick-up at local store (Store address shall be populated in shipping address fields) 05 -> Digital goods (includes online services, electronic gift cards and redemption codes) 06 -> Travel and Event tickets, not shipped 07 -> Other (for example, Gaming, digital services not shipped, emedia subscriptions, etc.) |
string | false | 01, 02, 03, 04, 05, 06, 07 |
deliveryTimeframeIndicates the merchandise delivery timeframe. 01 -> Electronic Delivery 02 -> Same day shipping 03 -> Overnight shipping 04 -> Two-day or more shipping |
string | false | 01, 02, 03, 04 |
deliveryEmailAddressFor electronic delivery, the email address to which the merchandise was delivered. |
string | false | |
reorderItemsIndicatorIndicates whether the cardholder is reoreding previously purchased merchandise. 01 -> First time ordered 02 -> Reordered |
string | false | 01, 02 |
preOrderPurchaseIndicatorIndicates whether Cardholder is placing an order for merchandise with a future availability or release date. 01 -> Merchandise available 02 -> Future availability |
string | false | 01, 02 |
preOrderDateFor a pre-ordered purchase, the expected date that the merchandise will be available. Format: YYYY-MM-DD |
string | false | YYYY-MM-DD |
giftCardAmountFor prepaid or gift card purchase, the purchase amount total of prepaid or gift card(s) in major units (for example, USD 123.45 is 123). |
number | false | |
giftCardCurrencyFor prepaid or gift card purchase, the currency code of the card |
string | false | |
giftCardCountFor prepaid or gift card purchase, total count of individual prepaid or gift cards/codes purchased. Field is limited to 2 characters. |
number | false | |
purchaseDateDate and time of the purchase, expressed in UTC. Format: YYYY-MM-DD HH:mm:ss **Note: if omitted we put in today's date |
string | false | YYYY-MM-DD HH:MM |
recurringExpiryDate after which no further authorizations shall be performed. This field is required for 01-PA and for 02-NPA, if 3DS Requestor Authentication Indicator = 02 or 03. Format: YYYY-MM-DD |
string | false | YYYY-MM-DD |
recurringFrequencyIndicates the minimum number of days between authorizations. The field is limited to maximum 4 characters. This field is required if 3DS Requestor Authentication Indicator = 02 or 03. |
number | false | |
transTypeIdentifies the type of transaction being authenticated. The values are derived from ISO 8583. 01 -> Goods / Service purchase 03 -> Check Acceptance 10 -> Account Funding 11 -> Quasi-Cash Transaction 28 -> Prepaid activation and Loan |
string | false | 01, 03, 10, 11, 28 |
exemptionIndicatorRequests an SCA exemption for this transaction. Possible values are: 01 -> Low Value Transaction (amount under 30 EUR) 02 -> Low Risk Transaction 03 -> Whitelisted transaction, merchant is added as "Trusted Beneficiary" by cardholder 04 -> Secure Corporate Payment 05 -> Recurring or Merchant-initiated transaction 06 -> Mail or Telephone Order 07 -> Anonymous payment card |
string | false | 01, 02, 03, 04, 05, 06, 07 |
3D-Secure 2.0 device data
For 3DS v2, the device data below are mandatory. Transaction will not succeed if either all browser or all SDK parameters are provided.
Browser data
{
...
"threeDSecureData": {
...
"browserChallengeWindowSize" => "04"
"browserAcceptHeader" => "*/*",
"browserIpAddress" => "127.0.0.1",
"browserJavaEnabled" => "false",
"browserLanguage" => "en-GB",
"browserColorDepth" => "24",
"browserScreenHeight" => "1080",
"browserScreenWidth" => "1920",
"browserTimezone" => "-60",
"browserUserAgent" => "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/89.0.4389.21 Safari/537.12",
...
}
}
The following fields are filled automatically by the Gateway if you are using hosted payment pages or payment.js integration. For any other integration flow you will need to provide them:
| Name | Type | Accepted values |
|---|---|---|
browserChallengeWindowSizeDimensions of the challenge window that has been displayed to the Cardholder. The ACS shall reply with content that is formatted to appropriately render in this window to provide the best possible user experience. 01 -> 250 x 400 02 -> 390 x 400 03 -> 500 x 600 04 -> 600 x 400 05 -> Full screen |
string | 01, 02, 03, 04, 05 |
browserAcceptHeaderExact content of the HTTP accept headers as sent to the 3DS Requestor from the Cardholder's browser |
string | |
browserIpAddressIP address of the browser as returned by the HTTP headers to the 3DS Requestor. - IPv4 address is represented in the dotted decimal format of 4 sets of decimal numbers separated by dots. The decimal number in each and every set is in the range 0 - 255. Example: 1.12.123.255 - IPv6 adress is represented as eight groups of four hexadecimal digits, each group representing 16 bits (two octets). The groups are separated by colons (:). Example: 2011:0db8:85a3:0101:0101:8a2e:0370:7334 |
string | |
browserJavaEnabledBoolean that represents the ability of the cardholder browser to execute Java. Value is returned from the navigator.javaEnabled property. |
boolean | |
browserLanguageValue representing the browser language as defined in IETF BCP47. The value is limited to 1-8 characters. Value is returned from navigator.language property. |
string | |
browserColorDepthValue representing the bit depth of the colour palette for displaying images, in bits per pixel. Obtained from Cardholder browser using the screen.colorDepth property. 1 -> 1 bit 4 -> 4 bits 8 -> 8 bits 15 -> 15 bits 16 -> 16 bits 24 -> 24 bits 32 -> 32 bits 48 -> 48 bits |
string | 1, 4, 8, 15, 16, 24, 32, 48 |
browserScreenHeightTotal height of the Cardholder's screen in pixels. Value is returned from the screen.height property. |
number | |
browserScreenWidthTotal width of the Cardholder's screen in pixels. Value is returned from the screen.width property. |
number | |
browserTimezoneTime difference between UTC time and the Cardholder browser local time, in minutes. The field is limited to 1-5 characters where the value is returned from the getTimezoneOffset() method. |
number | |
browserUserAgentExact content of the HTTP user-agent header. The field is limited to maximum 2048 caracters. |
string |
SDK data
| Name | Type | Accepted values |
|---|---|---|
sdkInterfaceSpecifies all of the SDK Interface types that the device supports for displaying specific challenge user interfaces within the SDK. Accepted values are: 01 -> Native 02 -> HTML 03 -> Both |
string | 01, 02, 03 |
sdkUiTypeContains a comma-separated list of all UI types that the device supports for displaying specific challenge user interfaces within the SDK. Accepted values for each UI type are: 01 -> Text 02 -> Single select 03 -> Multi select 04 -> OOB 05 -> Html Other (valid only for HTML UI) E.g. 01,02,05 |
string | comma-separated list with values: 01, 02, 03, 04, 05 |
sdkAppIDUniversally unique ID created upon all installations and updates of the 3DS Requestor App on a Customer Device. |
string | |
sdkEncDataJWE Object as defined 3DS Specs Section 6.2.2.1 containing data encrypted by the SDK for the DS to decrypt. |
string | |
sdkEphemPubKeyPublic key component of the ephemeral key pair generated by the 3DS SDK and used to establish session keys between the 3DS SDK and ACS The value should be a JSON string containing the keys kty, crv, x, y, e.g. {"kty":"EC","crv":"P-256","x":"...","y":"..."} |
string | |
sdkMaxTimeoutIndicates the maximum amount of time (in minutes) for all exchanges. The field shall have value greater than or equal to 05. |
number | |
sdkReferenceNumberIdentifies the vendor and version of the 3DS SDK that is integrated in a 3DS Requestor App, assigned by EMVCo whenthe 3DS SDK is approved. The field is limited to 32 characters. |
string | |
sdkTransIDUniversally unique transaction identifier assigned by the 3DS SDK to identify a single transaction. |
string |
Status Request
Retrieve the status of transactions
transactionStatusByUuid
Code samples
<?php
require 'vendor/autoload.php';
$headers = array(
'Accept' => 'application/json',
);
$client = new \GuzzleHttp\Client();
// Define array of request body.
$request_body = array();
try {
$response = $client->request('GET','https://gateway.fishbulbpay.com.au/api/status/getByUuid/{uuid}', array(
'headers' => $headers,
'json' => $request_body,
)
);
print_r($response->getBody()->getContents());
}
catch (\GuzzleHttp\Exception\BadResponseException $e) {
// handle exception or api errors.
print_r($e->getMessage());
}
// ...
# You can also use wget
curl -X GET https://gateway.fishbulbpay.com.au/api/status/{apiKey}/getByUuid/{uuid} \
-H 'Accept: application/json'
var client = new RestClient("https://gateway.fishbulbpay.com.au/api/status/getByUuid/{uuid}");
var request = new RestRequest(Method.GET);
request.AddHeader("accept", "application/json");
IRestResponse response = client.Execute(request);
URL obj = new URL("https://gateway.fishbulbpay.com.au/api/status/getByUuid/{uuid}");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("GET");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
response.append(inputLine);
}
in.close();
System.out.println(response.toString());
require 'rest-client'
require 'json'
headers = {
'Accept' => 'application/json'
}
result = RestClient.get 'https://gateway.fishbulbpay.com.au/api/status/getByUuid/{uuid}',
params: {
}, headers: headers
p JSON.parse(result)
import requests
headers = {
'Accept': 'application/json'
}
r = requests.get('https://gateway.fishbulbpay.com.au/api/status/getByUuid/{uuid}', params={
}, headers = headers)
print r.json()
package main
import (
"bytes"
"net/http"
)
func main() {
headers := map[string][]string{
"Accept": []string{"application/json"},
}
data := bytes.NewBuffer([]byte{jsonReq})
req, err := http.NewRequest("GET", "https://gateway.fishbulbpay.com.au/api/status/getByUuid/{uuid}", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
// ...
}
const headers = {
'Accept':'application/json'
};
fetch('https://gateway.fishbulbpay.com.au/api/status/getByUuid/{uuid}',
{
method: 'GET',
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
Retrieve status of a transaction
GET /status/getByUuid/{uuid}
Path parameters
| Name | Type | Required | Description |
|---|---|---|---|
| apiKey | string | true | API Key of Connector |
| uuid | string | true | UUID of transaction |
Request body
none
Response
Example responses
success
{
"success": true,
"transactionStatus": "SUCCESS",
"uuid": "abcde12345abcde12345",
"merchantTransactionId": "2019-09-02-0001",
"purchaseId": "20190902-abcde12345abcde12345",
"transactionType": "debit",
"paymentMethod": "Creditcard",
"amount": "9.99",
"currency": "EUR",
"customer": {
"firstName": "John",
"lastName": "Doe",
"company": "ACME Corp.",
"emailVerified": true
},
"extraData": {
"someKey": "someValue",
"otherKey": "otherValue"
},
"returnData": {
"creditcardData": {
"type": "visa",
"cardHolder": "John Doe",
"expiryMonth": 12,
"expiryYear": 2030,
"firstSixDigits": "123456",
"lastFourDigits": "4321",
"threeDSecure": "OFF",
"binBrand": "VISA",
"binBank": "SOME BIG BANK",
"binCountry": "US"
}
}
}
success with transaction error
{
"success": true,
"transactionStatus": "ERROR",
"uuid": "abcde12345abcde12345",
"merchantTransactionId": "2019-09-02-0001",
"purchaseId": "20190902-abcde12345abcde12345",
"transactionType": "DEBIT",
"paymentMethod": "Creditcard",
"amount": "9.99",
"currency": "EUR",
"errors": [
{
"message": "Payment could not be processed.",
"code": "1234",
"adapterMessage": "Processing failed.",
"adapterCode": "1000"
}
]
}
error
{
"success": false,
"errorMessage": "Transaction not found",
"errorCode": 8001
}
| Name | Type | Description |
|---|---|---|
| success | boolean | returns true or false depending on whether the request was successful |
| transactionStatus | string | status of the transaction |
| uuid | string | UUID of the transaction |
| referenceUuid | string | UUID of the related transaction |
| merchantTransactionId | string | your transaction ID |
| purchaseId | string | purchase ID |
| transactionType | string | transaction type |
| paymentMethod | string | payment method |
| amount | string | transaction amount |
| currency | string | transaction currency |
| schedules | object | an array containing attached schedules, see ScheduleData |
| errors | object | an array containing transaction errors, see TransactionError |
| chargebackData | object | see ChargebackData |
| chargebackReversalData | object | see ChargebackReversalData |
| extraData | object | object containing key-value pairs (string-to-string) |
| merchantMetaData | string | merchant metadata |
| returnData | object | one of ReturnData |
| customer | object | see Customer |
| customerProfileData | object | see CustomerProfileData |
| errorMessage | string | description if request fails |
| errorCode | number | error identifier |
transactionStatusByMerchantTransactionId
Code samples
<?php
require 'vendor/autoload.php';
$headers = array(
'Accept' => 'application/json',
);
$client = new \GuzzleHttp\Client();
// Define array of request body.
$request_body = array();
try {
$response = $client->request('GET','https://gateway.fishbulbpay.com.au/api/status/getByMerchantTransactionId/{merchantTransactionId}', array(
'headers' => $headers,
'json' => $request_body,
)
);
print_r($response->getBody()->getContents());
}
catch (\GuzzleHttp\Exception\BadResponseException $e) {
// handle exception or api errors.
print_r($e->getMessage());
}
// ...
# You can also use wget
curl -X GET https://gateway.fishbulbpay.com.au/api/status/{apiKey}/getByMerchantTransactionId/{merchantTransactionId} \
-H 'Accept: application/json'
var client = new RestClient("https://gateway.fishbulbpay.com.au/api/status/getByMerchantTransactionId/{merchantTransactionId}");
var request = new RestRequest(Method.GET);
request.AddHeader("accept", "application/json");
IRestResponse response = client.Execute(request);
URL obj = new URL("https://gateway.fishbulbpay.com.au/api/status/getByMerchantTransactionId/{merchantTransactionId}");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("GET");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
response.append(inputLine);
}
in.close();
System.out.println(response.toString());
require 'rest-client'
require 'json'
headers = {
'Accept' => 'application/json'
}
result = RestClient.get 'https://gateway.fishbulbpay.com.au/api/status/getByMerchantTransactionId/{merchantTransactionId}',
params: {
}, headers: headers
p JSON.parse(result)
import requests
headers = {
'Accept': 'application/json'
}
r = requests.get('https://gateway.fishbulbpay.com.au/api/status/getByMerchantTransactionId/{merchantTransactionId}', params={
}, headers = headers)
print r.json()
package main
import (
"bytes"
"net/http"
)
func main() {
headers := map[string][]string{
"Accept": []string{"application/json"},
}
data := bytes.NewBuffer([]byte{jsonReq})
req, err := http.NewRequest("GET", "https://gateway.fishbulbpay.com.au/api/status/getByMerchantTransactionId/{merchantTransactionId}", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
// ...
}
const headers = {
'Accept':'application/json'
};
fetch('https://gateway.fishbulbpay.com.au/api/status/getByMerchantTransactionId/{merchantTransactionId}',
{
method: 'GET',
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
Retrieve status of a transaction
GET /status/getByMerchantTransactionId/{merchantTransactionId}
Request body
| Name | Type | Required | Description |
|---|---|---|---|
| apiKey | string | true | API Key of Connector |
| merchantTransactionId | string | true | ID of merchant transaction |
Response
Example responses
success
{
"success": true,
"transactionStatus": "SUCCESS",
"uuid": "abcde12345abcde12345",
"merchantTransactionId": "2019-09-02-0001",
"purchaseId": "20190902-abcde12345abcde12345",
"transactionType": "debit",
"paymentMethod": "Creditcard",
"amount": "9.99",
"currency": "EUR",
"customer": {
"firstName": "John",
"lastName": "Doe",
"company": "ACME Corp.",
"emailVerified": true
},
"extraData": {
"someKey": "someValue",
"otherKey": "otherValue"
},
"returnData": {
"creditcardData": {
"type": "visa",
"cardHolder": "John Doe",
"expiryMonth": 12,
"expiryYear": 2030,
"firstSixDigits": "123456",
"lastFourDigits": "4321",
"threeDSecure": "OFF",
"binBrand": "VISA",
"binBank": "SOME BIG BANK",
"binCountry": "US"
}
}
}
success with transaction error
{
"success": true,
"transactionStatus": "ERROR",
"uuid": "abcde12345abcde12345",
"merchantTransactionId": "2019-09-02-0001",
"purchaseId": "20190902-abcde12345abcde12345",
"transactionType": "DEBIT",
"paymentMethod": "Creditcard",
"amount": "9.99",
"currency": "EUR",
"errors": [
{
"message": "Payment could not be processed.",
"code": "1234",
"adapterMessage": "Processing failed.",
"adapterCode": "1000"
}
]
}
error
{
"success": false,
"errorMessage": "Transaction not found",
"errorCode": 8001
}
| Name | Type | Description |
|---|---|---|
| success | boolean | returns true or false depending on whether the request was successful |
| transactionStatus | string | status of the transaction |
| uuid | string | UUID of the transaction |
| referenceUuid | string | UUID of the related transaction |
| merchantTransactionId | string | your transaction ID |
| purchaseId | string | purchase ID |
| transactionType | string | transaction type |
| paymentMethod | string | payment method |
| amount | string | transaction amount |
| currency | string | transaction currency |
| schedules | object | an array containing attached schedules, see ScheduleData |
| errors | object | an array containing transaction errors, see TransactionError |
| chargebackData | object | see ChargebackData |
| chargebackReversalData | object | see ChargebackReversalData |
| extraData | object | object containing key-value pairs (string-to-string) |
| merchantMetaData | string | merchant metadata |
| returnData | object | one of ReturnData |
| customer | object | see Customer |
| customerProfileData | object | see CustomerProfileData |
| errorMessage | string | description if request fails |
| errorCode | number | error identifier |
Status Data
ChargebackData
| Name | Type |
|---|---|
| originalUuid | string |
| originalMerchantTransactionId | string |
| amount | string |
| currency | string |
| reason | string |
| chargebackDateTime | string |
ChargebackReversalData
| Name | Type |
|---|---|
| originalUuid | string |
| originalMerchantTransactionId | string |
| chargebackUuid | string |
| amount | string |
| currency | string |
| reason | string |
| reversalDateTime | string |
Schedule Request
Set and manage transaction schedules
Find out more about the Scheduler API
startSchedule
Code samples
<?php
require 'vendor/autoload.php';
$headers = array(
'Content-Type' => 'application/json',
'Accept' => 'application/json',
);
$client = new \GuzzleHttp\Client();
// Define array of request body.
$request_body = array();
try {
$response = $client->request('POST','https://gateway.fishbulbpay.com.au/api/schedule/start', array(
'headers' => $headers,
'json' => $request_body,
)
);
print_r($response->getBody()->getContents());
}
catch (\GuzzleHttp\Exception\BadResponseException $e) {
// handle exception or api errors.
print_r($e->getMessage());
}
// ...
# You can also use wget
curl -X POST https://gateway.fishbulbpay.com.au/api/schedule/{apiKey}/start \
-H 'Content-Type: application/json' \
-H 'Accept: application/json'
var client = new RestClient("https://gateway.fishbulbpay.com.au/api/schedule/start");
var request = new RestRequest(Method.POST);
var data = "{}";
request.AddHeader("accept", "application/json");
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", data, ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
URL obj = new URL("https://gateway.fishbulbpay.com.au/api/schedule/start");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("POST");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
response.append(inputLine);
}
in.close();
System.out.println(response.toString());
require 'rest-client'
require 'json'
headers = {
'Content-Type' => 'application/json',
'Accept' => 'application/json'
}
result = RestClient.post 'https://gateway.fishbulbpay.com.au/api/schedule/start',
params: {
}, headers: headers
p JSON.parse(result)
import requests
headers = {
'Content-Type': 'application/json',
'Accept': 'application/json'
}
r = requests.post('https://gateway.fishbulbpay.com.au/api/schedule/start', params={
}, headers = headers)
print r.json()
package main
import (
"bytes"
"net/http"
)
func main() {
headers := map[string][]string{
"Content-Type": []string{"application/json"},
"Accept": []string{"application/json"},
}
data := bytes.NewBuffer([]byte{jsonReq})
req, err := http.NewRequest("POST", "https://gateway.fishbulbpay.com.au/api/schedule/start", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
// ...
}
const inputBody = '{}';
const headers = {
'Content-Type':'application/json',
'Accept':'application/json'
};
fetch('https://gateway.fishbulbpay.com.au/api/schedule/start',
{
method: 'POST',
body: inputBody,
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
Start a schedule. Requires the registrationId of an existing transaction of type Register / Debit-with-register / Preauthorize-with-register
POST /schedule/start
Path parameters
| Name | Type | Required | Description |
|---|---|---|---|
| apiKey | string | true | API Key of Connector |
Request body
Request body example
{
"registrationUuid": "abcde12345abcde12345",
"amount": "9.99",
"currency": "EUR",
"periodLength": 6,
"periodUnit": "MONTH",
"startDateTime": "2019-09-30T01:00:00+00:00"
}
| Name | Type | Required | Description |
|---|---|---|---|
| registrationUuid | string | true | UUID of an initial register, debit-with-register or preauthorize-with-register |
| amount | string | false | decimals separated by ., max. 3 decimals |
| currency | string | false | 3 letter currency code |
| periodLength | number | false | |
| periodUnit | string | false | DAY, WEEK, MONTH, YEAR |
| startDateTime | string | false | RFC8601 Date/Time YYYY-MM-DD\THH:MM:SS+00:00 |
Response
Example responses
success
{
"success": true,
"scheduleId": "SC-1234-1234-1234-1234-1234-1234",
"registrationUuid": "abcde12345abcde12345",
"oldStatus": "NON-EXISTING",
"newStatus": "ACTIVE",
"scheduledAt": "2019-09-30T12:00:00+00:00"
}
error
{
"success": false,
"errorMessage": "The scheduleId is not valid or does not match to the connector",
"errorCode": 7040
}
| Name | Type | Description |
|---|---|---|
| success | boolean | returns true or false depending on whether the request was successful |
| scheduleId | string | ID of the schedule |
| registrationUuid | string | UUID of the transaction the schedule was attached to |
| oldStatus | string | status before the request |
| newStatus | string | status after the request |
| scheduledAt | string | scheduled date |
| errorMessage | string | description if request fails |
| errorCode | number | error identifier |
updateSchedule
Code samples
<?php
require 'vendor/autoload.php';
$headers = array(
'Content-Type' => 'application/json',
'Accept' => 'application/json',
);
$client = new \GuzzleHttp\Client();
// Define array of request body.
$request_body = array();
try {
$response = $client->request('POST','https://gateway.fishbulbpay.com.au/api/schedule/start', array(
'headers' => $headers,
'json' => $request_body,
)
);
print_r($response->getBody()->getContents());
}
catch (\GuzzleHttp\Exception\BadResponseException $e) {
// handle exception or api errors.
print_r($e->getMessage());
}
// ...
# You can also use wget
curl -X POST https://gateway.fishbulbpay.com.au/api/schedule/{apiKey}/start \
-H 'Content-Type: application/json' \
-H 'Accept: application/json'
var client = new RestClient("https://gateway.fishbulbpay.com.au/api/schedule/start");
var request = new RestRequest(Method.POST);
var data = "{}";
request.AddHeader("accept", "application/json");
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", data, ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
URL obj = new URL("https://gateway.fishbulbpay.com.au/api/schedule/start");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("POST");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
response.append(inputLine);
}
in.close();
System.out.println(response.toString());
require 'rest-client'
require 'json'
headers = {
'Content-Type' => 'application/json',
'Accept' => 'application/json'
}
result = RestClient.post 'https://gateway.fishbulbpay.com.au/api/schedule/start',
params: {
}, headers: headers
p JSON.parse(result)
import requests
headers = {
'Content-Type': 'application/json',
'Accept': 'application/json'
}
r = requests.post('https://gateway.fishbulbpay.com.au/api/schedule/start', params={
}, headers = headers)
print r.json()
package main
import (
"bytes"
"net/http"
)
func main() {
headers := map[string][]string{
"Content-Type": []string{"application/json"},
"Accept": []string{"application/json"},
}
data := bytes.NewBuffer([]byte{jsonReq})
req, err := http.NewRequest("POST", "https://gateway.fishbulbpay.com.au/api/schedule/start", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
// ...
}
const inputBody = '{}';
const headers = {
'Content-Type':'application/json',
'Accept':'application/json'
};
fetch('https://gateway.fishbulbpay.com.au/api/schedule/start',
{
method: 'POST',
body: inputBody,
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
To update an existing schedule, simply send the fields which you wish to update.
POST /schedule/{scheduleId}/update
Path parameters
| Name | Type | Required | Description |
|---|---|---|---|
| apiKey | string | true | API Key of Connector |
| scheduleId | string | true | ID of the schedule |
Request body
Request body example
{
"amount": "9.99",
"periodUnit": "YEAR"
}
| Name | Type | Required | Description |
|---|---|---|---|
| registrationUuid | string | false | UUID of an initial register, debit-with-register or preauthorize-with-register |
| amount | string | false | decimals separated by ., max. 3 decimals |
| currency | string | false | 3 letter currency code |
| periodLength | number | false | |
| periodUnit | string | false | DAY, WEEK, MONTH, YEAR |
| startDateTime | string | false | RFC8601 Date/Time YYYY-MM-DD\THH:MM:SS+00:00 |
Response
Example responses
success
{
"success": true,
"scheduleId": "SC-1234-1234-1234-1234-1234-1234",
"registrationUuid": "abcde12345abcde12345",
"oldStatus": "ACTIVE",
"newStatus": "ACTIVE",
"scheduledAt": "2019-09-30T12:00:00+00:00"
}
error
{
"success": false,
"errorMessage": "The scheduleId is not valid or does not match to the connector",
"errorCode": 7040
}
| Name | Type | Description |
|---|---|---|
| success | boolean | returns true or false depending on whether the request was successful |
| scheduleId | string | ID of the schedule |
| registrationUuid | string | UUID of the transaction the schedule was attached to |
| oldStatus | string | status before the request |
| newStatus | string | status after the request |
| scheduledAt | string | scheduled date |
| errorMessage | string | description if request fails |
| errorCode | number | error identifier |
getSchedule
Code samples
<?php
require 'vendor/autoload.php';
$headers = array(
'Accept' => 'application/json',
);
$client = new \GuzzleHttp\Client();
// Define array of request body.
$request_body = array();
try {
$response = $client->request('GET','https://gateway.fishbulbpay.com.au/api/schedule/{scheduleId}/get', array(
'headers' => $headers,
'json' => $request_body,
)
);
print_r($response->getBody()->getContents());
}
catch (\GuzzleHttp\Exception\BadResponseException $e) {
// handle exception or api errors.
print_r($e->getMessage());
}
// ...
# You can also use wget
curl -X GET https://gateway.fishbulbpay.com.au/api/schedule/{apiKey}/{scheduleId}/get \
-H 'Accept: application/json'
var client = new RestClient("https://gateway.fishbulbpay.com.au/api/schedule/{scheduleId}/get");
var request = new RestRequest(Method.GET);
request.AddHeader("accept", "application/json");
IRestResponse response = client.Execute(request);
URL obj = new URL("https://gateway.fishbulbpay.com.au/api/schedule/{scheduleId}/get");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("GET");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
response.append(inputLine);
}
in.close();
System.out.println(response.toString());
require 'rest-client'
require 'json'
headers = {
'Accept' => 'application/json'
}
result = RestClient.get 'https://gateway.fishbulbpay.com.au/api/schedule/{scheduleId}/get',
params: {
}, headers: headers
p JSON.parse(result)
import requests
headers = {
'Accept': 'application/json'
}
r = requests.get('https://gateway.fishbulbpay.com.au/api/schedule/{scheduleId}/get', params={
}, headers = headers)
print r.json()
package main
import (
"bytes"
"net/http"
)
func main() {
headers := map[string][]string{
"Accept": []string{"application/json"},
}
data := bytes.NewBuffer([]byte{jsonReq})
req, err := http.NewRequest("GET", "https://gateway.fishbulbpay.com.au/api/schedule/{scheduleId}/get", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
// ...
}
const headers = {
'Accept':'application/json'
};
fetch('https://gateway.fishbulbpay.com.au/api/schedule/{scheduleId}/get',
{
method: 'GET',
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
Retrieve a schedule. Requires the UUID of an existing transaction of type Register / Debit-with-register / Preuathorize-with-register
GET /schedule/{scheduleId}/get
Path parameters
| Name | Type | Required | Description |
|---|---|---|---|
| apiKey | string | true | API Key of Connector |
| scheduleId | string | true | ID of the schedule |
Request body
none
Response
Example responses
success
{
"success": true,
"scheduleId": "SC-1234-1234-1234-1234-1234-1234",
"registrationUuid": "abcde12345abcde12345",
"oldStatus": "ACTIVE",
"newStatus": "ACTIVE",
"scheduledAt": "2019-09-30T12:00:00+00:00"
}
error
{
"success": false,
"errorMessage": "The scheduleId is not valid or does not match to the connector",
"errorCode": 7040
}
| Name | Type | Description |
|---|---|---|
| success | boolean | returns true or false depending on whether the request was successful |
| scheduleId | string | ID of the schedule |
| registrationUuid | string | UUID of the transaction the schedule was attached to |
| oldStatus | string | status before the request |
| newStatus | string | status after the request |
| scheduledAt | string | scheduled date |
| errorMessage | string | description if request fails |
| errorCode | number | error identifier |
pauseSchedule
Code samples
<?php
require 'vendor/autoload.php';
$headers = array(
'Content-Type' => 'application/json',
'Accept' => 'application/json',
);
$client = new \GuzzleHttp\Client();
// Define array of request body.
$request_body = array();
try {
$response = $client->request('POST','https://gateway.fishbulbpay.com.au/api/schedule/{scheduleId}/pause', array(
'headers' => $headers,
'json' => $request_body,
)
);
print_r($response->getBody()->getContents());
}
catch (\GuzzleHttp\Exception\BadResponseException $e) {
// handle exception or api errors.
print_r($e->getMessage());
}
// ...
# You can also use wget
curl -X POST https://gateway.fishbulbpay.com.au/api/schedule/{apiKey}/{scheduleId}/pause \
-H 'Content-Type: application/json' \
-H 'Accept: application/json'
var client = new RestClient("https://gateway.fishbulbpay.com.au/api/schedule/{scheduleId}/pause");
var request = new RestRequest(Method.POST);
request.AddHeader("accept", "application/json");
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{}", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
URL obj = new URL("https://gateway.fishbulbpay.com.au/api/schedule/{scheduleId}/pause");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("POST");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
response.append(inputLine);
}
in.close();
System.out.println(response.toString());
require 'rest-client'
require 'json'
headers = {
'Content-Type' => 'application/json',
'Accept' => 'application/json'
}
result = RestClient.post 'https://gateway.fishbulbpay.com.au/api/schedule/{scheduleId}/pause',
params: {
}, headers: headers
p JSON.parse(result)
import requests
headers = {
'Content-Type': 'application/json',
'Accept': 'application/json'
}
r = requests.post('https://gateway.fishbulbpay.com.au/api/schedule/{scheduleId}/pause', params={
}, headers = headers)
print r.json()
package main
import (
"bytes"
"net/http"
)
func main() {
headers := map[string][]string{
"Content-Type": []string{"application/json"},
"Accept": []string{"application/json"},
}
data := bytes.NewBuffer([]byte{jsonReq})
req, err := http.NewRequest("POST", "https://gateway.fishbulbpay.com.au/api/schedule/{scheduleId}/pause", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
// ...
}
const inputBody = '{}';
const headers = {
'Content-Type':'application/json',
'Accept':'application/json'
};
fetch('https://gateway.fishbulbpay.com.au/api/schedule/{scheduleId}/pause',
{
method: 'POST',
body: inputBody,
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
Pause a schedule. Requires the registrationId of an existing transaction of type Register / Debit-with-register / Preuathorize-with-register
POST /schedule/{scheduleId}/pause
Path parameters
| Name | Type | Required | Description |
|---|---|---|---|
| apiKey | string | true | API Key of Connector |
| scheduleId | string | true | ID of the schedule |
Request body
none
Response
Example responses
success
{
"success": true,
"scheduleId": "SC-1234-1234-1234-1234-1234-1234",
"oldStatus": "ACTIVE",
"newStatus": "PAUSED"
}
error
{
"success": false,
"errorMessage": "The status of the schedule is not valid for the requested operation",
"errorCode": 7070
}
| Name | Type | Description |
|---|---|---|
| success | boolean | returns true or false depending on whether the request was successful |
| scheduleId | string | ID of the schedule |
| registrationUuid | string | UUID of the transaction the schedule was attached to |
| oldStatus | string | status before the request |
| newStatus | string | status after the request |
| scheduledAt | string | scheduled date |
| errorMessage | string | description if request fails |
| errorCode | number | error identifier |
continueSchedule
Code samples
<?php
require 'vendor/autoload.php';
$headers = array(
'Content-Type' => 'application/json',
'Accept' => 'application/json',
);
$client = new \GuzzleHttp\Client();
// Define array of request body.
$request_body = array();
try {
$response = $client->request('POST','https://gateway.fishbulbpay.com.au/api/schedule/{scheduleId}/continue', array(
'headers' => $headers,
'json' => $request_body,
)
);
print_r($response->getBody()->getContents());
}
catch (\GuzzleHttp\Exception\BadResponseException $e) {
// handle exception or api errors.
print_r($e->getMessage());
}
// ...
# You can also use wget
curl -X POST https://gateway.fishbulbpay.com.au/api/schedule/{apiKey}/{scheduleId}/continue \
-H 'Content-Type: application/json' \
-H 'Accept: application/json'
var client = new RestClient("https://gateway.fishbulbpay.com.au/api/schedule/{scheduleId}/continue");
var request = new RestRequest(Method.POST);
var data = "{}";
request.AddHeader("accept", "application/json");
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", data, ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
URL obj = new URL("https://gateway.fishbulbpay.com.au/api/schedule/{scheduleId}/continue");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("POST");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
response.append(inputLine);
}
in.close();
System.out.println(response.toString());
require 'rest-client'
require 'json'
headers = {
'Content-Type' => 'application/json',
'Accept' => 'application/json'
}
result = RestClient.post 'https://gateway.fishbulbpay.com.au/api/schedule/{scheduleId}/continue',
params: {
}, headers: headers
p JSON.parse(result)
import requests
headers = {
'Content-Type': 'application/json',
'Accept': 'application/json'
}
r = requests.post('https://gateway.fishbulbpay.com.au/api/schedule/{scheduleId}/continue', params={
}, headers = headers)
print r.json()
package main
import (
"bytes"
"net/http"
)
func main() {
headers := map[string][]string{
"Content-Type": []string{"application/json"},
"Accept": []string{"application/json"},
}
data := bytes.NewBuffer([]byte{jsonReq})
req, err := http.NewRequest("POST", "https://gateway.fishbulbpay.com.au/api/schedule/{scheduleId}/continue", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
// ...
}
const inputBody = '{}';
const headers = {
'Content-Type':'application/json',
'Accept':'application/json'
};
fetch('https://gateway.fishbulbpay.com.au/api/schedule/{scheduleId}/continue',
{
method: 'POST',
body: inputBody,
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
Continue a schedule which has been paused. Requires the registrationId of an existing transaction of type Register / Debit-with-register / Preuathorize-with-register
POST /schedule/{scheduleId}/continue
Path parameters
| Name | Type | Required | Description |
|---|---|---|---|
| apiKey | string | true | API Key of Connector |
| scheduleId | string | true | ID of the schedule |
Request body
Request body example
{
"continueDateTime": "2019-09-30T01:00:00+00:00"
}
| Name | Type | Required | Description |
|---|---|---|---|
| continueDateTime | string | true | RFC8601 Date/Time YYYY-MM-DD\THH:MM:SS+00:00 |
Response
Example responses
success
{
"success": true,
"scheduleId": "SC-1234-1234-1234-1234-1234-1234",
"oldStatus": "PAUSED",
"newStatus": "ACTIVE",
"scheduledAt": "2019-10-05T14:26:11+00:00"
}
error
{
"success": false,
"errorMessage": "The status of the schedule is not valid for the requested operation",
"errorCode": 7070
}
| Name | Type | Description |
|---|---|---|
| success | boolean | returns true or false depending on whether the request was successful |
| scheduleId | string | ID of the schedule |
| registrationUuid | string | UUID of the transaction the schedule was attached to |
| oldStatus | string | status before the request |
| newStatus | string | status after the request |
| scheduledAt | string | scheduled date |
| errorMessage | string | description if request fails |
| errorCode | number | error identifier |
cancelSchedule
Code samples
<?php
require 'vendor/autoload.php';
$headers = array(
'Content-Type' => 'application/json',
'Accept' => 'application/json',
);
$client = new \GuzzleHttp\Client();
// Define array of request body.
$request_body = array();
try {
$response = $client->request('POST','https://gateway.fishbulbpay.com.au/api/schedule/{scheduleId}/cancel', array(
'headers' => $headers,
'json' => $request_body,
)
);
print_r($response->getBody()->getContents());
}
catch (\GuzzleHttp\Exception\BadResponseException $e) {
// handle exception or api errors.
print_r($e->getMessage());
}
// ...
# You can also use wget
curl -X POST https://gateway.fishbulbpay.com.au/api/schedule/{apiKey}/{scheduleId}/cancel \
-H 'Content-Type: application/json' \
-H 'Accept: application/json'
var client = new RestClient("https://gateway.fishbulbpay.com.au/api/schedule/{scheduleId}/cancel");
var request = new RestRequest(Method.POST);
request.AddHeader("accept", "application/json");
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{}", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
URL obj = new URL("https://gateway.fishbulbpay.com.au/api/schedule/{scheduleId}/cancel");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("POST");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
response.append(inputLine);
}
in.close();
System.out.println(response.toString());
require 'rest-client'
require 'json'
headers = {
'Content-Type' => 'application/json',
'Accept' => 'application/json'
}
result = RestClient.post 'https://gateway.fishbulbpay.com.au/api/schedule/{scheduleId}/cancel',
params: {
}, headers: headers
p JSON.parse(result)
import requests
headers = {
'Content-Type': 'application/json',
'Accept': 'application/json'
}
r = requests.post('https://gateway.fishbulbpay.com.au/api/schedule/{scheduleId}/cancel', params={
}, headers = headers)
print r.json()
package main
import (
"bytes"
"net/http"
)
func main() {
headers := map[string][]string{
"Content-Type": []string{"application/json"},
"Accept": []string{"application/json"},
}
data := bytes.NewBuffer([]byte{jsonReq})
req, err := http.NewRequest("POST", "https://gateway.fishbulbpay.com.au/api/schedule/{scheduleId}/cancel", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
// ...
}
const inputBody = '{}';
const headers = {
'Content-Type':'application/json',
'Accept':'application/json'
};
fetch('https://gateway.fishbulbpay.com.au/api/schedule/{scheduleId}/cancel',
{
method: 'POST',
body: inputBody,
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
Cancel a schedule. Requires the registrationId of an existing transaction of type Register / Debit-with-register / Preuathorize-with-register
POST /schedule/{scheduleId}/cancel
Path parameters
| Name | Type | Required | Description |
|---|---|---|---|
| apiKey | string | true | API Key of Connector |
| scheduleId | string | true | ID of the schedule |
Request body
none
Response
Example responses
success
{
"success": true,
"scheduleId": "SC-1234-1234-1234-1234-1234-1234",
"oldStatus": "ACTIVE",
"newStatus": "CANCELLED"
}
error
{
"success": false,
"errorMessage": "The status of the schedule is not valid for the requested operation",
"errorCode": 7070
}
| Name | Type | Description |
|---|---|---|
| success | boolean | returns true or false depending on whether the request was successful |
| scheduleId | string | ID of the schedule |
| registrationUuid | string | UUID of the transaction the schedule was attached to |
| oldStatus | string | status before the request |
| newStatus | string | status after the request |
| scheduledAt | string | scheduled date |
| errorMessage | string | description if request fails |
| errorCode | number | error identifier |
Options Request
Some adapters can provide additional information for your payment integration, for example a bank list for EPS transactions. This allows you to show the bank selection already on your shop checkout site.
See the adapter specific page for additional information about available Options request methods.
POST /options/{optionsName}
Options Request
Path parameters
Code samples
<?php
require 'vendor/autoload.php';
$headers = array(
'Content-Type' => 'application/json',
'Accept' => 'application/json',
);
$client = new \GuzzleHttp\Client();
// Define array of request body.
$request_body = array();
try {
$response = $client->request('POST','https://gateway.fishbulbpay.com.au/api/options/{optionsName}', array(
'headers' => $headers,
'json' => $request_body,
)
);
print_r($response->getBody()->getContents());
}
catch (\GuzzleHttp\Exception\BadResponseException $e) {
// handle exception or api errors.
print_r($e->getMessage());
}
// ...
# You can also use wget
curl -X POST https://gateway.fishbulbpay.com.au/api/options/{apiKey}/{optionsName} \
-H 'Content-Type: application/json' \
-H 'Accept: application/json'
var client = new RestClient("https://gateway.fishbulbpay.com.au/api/options/{optionsName}");
var request = new RestRequest(Method.POST);
var data = "{}";
request.AddHeader("accept", "application/json");
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", data, ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
URL obj = new URL("https://gateway.fishbulbpay.com.au/api/options/{optionsName}");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("POST");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
response.append(inputLine);
}
in.close();
System.out.println(response.toString());
require 'rest-client'
require 'json'
headers = {
'Content-Type' => 'application/json',
'Accept' => 'application/json'
}
result = RestClient.post 'https://gateway.fishbulbpay.com.au/api/options/{optionsName}',
params: {
}, headers: headers
p JSON.parse(result)
import requests
headers = {
'Content-Type': 'application/json',
'Accept': 'application/json'
}
r = requests.post('https://gateway.fishbulbpay.com.au/api/options/{optionsName}', params={
}, headers = headers)
print r.json()
package main
import (
"bytes"
"net/http"
)
func main() {
headers := map[string][]string{
"Content-Type": []string{"application/json"},
"Accept": []string{"application/json"},
}
data := bytes.NewBuffer([]byte{jsonReq})
req, err := http.NewRequest("POST", "https://gateway.fishbulbpay.com.au/api/options/{optionsName}", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
// ...
}
const inputBody = '{}';
const headers = {
'Content-Type':'application/json',
'Accept':'application/json'
};
fetch('https://gateway.fishbulbpay.com.au/api/options/{optionsName}',
{
method: 'POST',
body: inputBody,
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
| Name | Type | Required | Description |
|---|---|---|---|
| apiKey | string | true | API Key of Connector |
| optionsName | string | true | Options identifier of the appropriate adapter |
Request body
Request body example
{
"parameters": {
"property1": "string",
"property2": "string"
}
}
| Name | Type | Required | Description |
|---|---|---|---|
| parameters | object | false | Parameters which may be required for certain adapters |
Response
Example responses
success
{
"success": true,
"options": {
"bank1": "Bank One",
"bank2": "Bank Two",
"bank3": "Bank Three",
"bank4": "Bank Four"
}
}
error
{
"success": false,
"errorMessage": "Given identifier 'someIdentifier' is invalid."
}
| Name | Description |
|---|---|
| success | returns true or false depending on whether the request was successful |
| options | on success, returns an array containing key-value pairs |
| errorMessage | string |
Asynchronous Status Notification
The Gateway sends you a asynchronous notification once a transaction reaches a final state. This notification should be your source of trust when dealing with asynchronous transactions involving a redirect of the customer.
Depending on the payment method this can either happen immediately or can take up to several days.
Also for any follow-up transactions, such as Chargebacks and Chargeback Reversals, you will receive a notification.
Success Notification
Example
{
"result": "OK",
"uuid": "abcde12345abcde12345",
"merchantTransactionId": "2019-09-02-0007",
"purchaseId": "20190927-abcde12345abcde12345",
"transactionType": "DEBIT",
"paymentMethod": "DirectDebit",
"amount": "9.99",
"currency": "EUR",
"customer": {
"firstName": "John",
"lastName": "Doe",
"emailVerified": "false"
},
"returnData": {
"_TYPE": "cardData",
"type": "visa",
"cardHolder": "John Doe",
"expiryMonth": "12",
"expiryYear": "2022",
"firstSixDigits": "411111",
"lastFourDigits": "1111",
"fingerprint": "9s92FBBvMuw7nn8t7ChHDRuFXS6gZOnHymbGnO/BZBUw3j25LW6dcl50aHWTcdJtSFDvTqLPM4stZLbGb6EVpQ",
"threeDSecure": "OFF",
"binBrand": "VISA",
"binBank": "JPMORGAN CHASE BANK N.A.",
"binType": "",
"binLevel": "",
"binCountry": "US"
}
}
When a transaction has reached the final state and is successful, the result field
will contain the value OK. You may then assume that the transaction has been
successfully processed.
Error Notification
Example
{
"result": "ERROR",
"message": "STOLEN_CARD",
"code": "2016",
"adapterMessage": "Transaction was rejected",
"adapterCode": "1234",
"uuid": "abcde12345abcde12345",
"merchantTransactionId": "2019-09-02-0008",
"purchaseId": "20190927-abcde12345abcde12345",
"transactionType": "DEBIT",
"paymentMethod": "DirectDebit",
"amount": "9.99",
"currency": "EUR",
"customer": {
"firstName": "John",
"lastName": "Doe",
"emailVerified": "false",
},
"returnData": {
"_TYPE": "cardData",
"type": "visa",
"cardHolder": "John Doe",
"expiryMonth": "12",
"expiryYear": "2022",
"firstSixDigits": "411111",
"lastFourDigits": "1111",
"fingerprint": "9s92FBBvMuw7nn8t7ChHDRuFXS6gZOnHymbGnO/BZBUw3j25LW6dcl50aHWTcdJtSFDvTqLPM4stZLbGb6EVpQ",
"threeDSecure": "OFF",
"binBrand": "VISA",
"binBank": "JPMORGAN CHASE BANK N.A.",
"binType": "",
"binLevel": "",
"binCountry": "US"
}
}
If a transaction fails, the result field will contain the value ERROR. Depending
on the type of error, you may either find useful information in the message
and code fields, or in adapterMessage and adapterCode fields which
contain the errors returned by the respective adapter.
Chargeback Notification
Example
{
"result": "OK",
"uuid": "abcde12345abcde12345",
"merchantTransactionId": "auto-2019-09-02-0010",
"purchaseId": "20190927-abcde12345abcde12345",
"transactionType": "CHARGEBACK",
"paymentMethod": "Creditcard",
"amount": 9.99,
"currency": "EUR",
"chargebackData": {
"originalUuid": "0r1gIN4luU1D",
"originalMerchantTransactionId": "2019-09-02-0009",
"amount": 9.99,
"currency": "EUR",
"reason": "Unauthorized payment",
"chargebackDateTime": "2019-10-10T15:06:47Z"
}
}
When a Chargeback comes in, you may find relevant chargeback information in ChargebackData
Chargeback Reversal Notification
Example
{
"result": "OK",
"uuid": "abcde12345abcde12345",
"merchantTransactionId": "auto-2019-09-02-0012",
"purchaseId": "20191210-abcde12345abcde12345",
"transactionType": "CHARGEBACK-REVERSAL",
"paymentMethod": "Creditcard",
"amount": "9.99",
"currency": "EUR",
"chargebackReversalData": {
"originalUuid": "0r1gIN4luU1D",
"originalMerchantTransactionId": "2019-09-02-0011",
"chargebackUuid": "Ch4rG3baCkUu1D",
"amount": "9.99",
"currency": "EUR",
"reason": "Chargeback reversed",
"reversalDateTime": "2019-10-15T16:22:12Z"
}
}
When a Chargeback Reversal comes in, you may find relevant chargeback reversal information in ChargebackReversalData
Data Verification
To prove the authenticity of the notification the Gateway signs every request with the same shared secret as used for signing your requests.
You should verify the signature by calculating it on your system and compare it to the given one.
The mechanism is the same as described in Signature, but instead of defining the various values (request URI, date, etc.), you must take them out of the HTTP request you received from us. You should also verify that the Date header is within a reasonable deviation of the current timestamp (e.g. 60 seconds)
Additional data
If you need additional information to process the notification for your shop order, you can use the optional field
merchantMetaData or you can provide that data as GET parameters in the callbackUrl you define.
E.g. https://www.merchant.com/notification-url?someKey=someValue&anything=else
Callback data
| Name | Type | Description |
|---|---|---|
| result | string | OK, PENDING, ERROR |
| uuid | string | UUID of the transaction |
| merchantTransactionId | string | your unique transaction ID |
| purchaseId | string | purchase ID |
| transactionType | string | DEBIT, CAPTURE, DEREGISTER, PREAUTHORIZE, REFUND, REGISTER, VOID, CHARGEBACK, CHARGEBACK-REVERSAL, PAYOUT |
| paymentMethod | string | payment method |
| amount | string | decimals separated by ., max. 3 decimals |
| currency | string | 3 letter currency code |
| scheduleData | object | see ScheduleData |
| chargebackData | object | see ChargebackData |
| chargebackReversalData | object | see ChargebackReversalData |
| extraData | object | object containing key-value pairs (string-to-string) |
| merchantMetaData | string | merchant metadata |
| returnData | object | one of ReturnData |
| customer | object | see Customer |
| customerProfileData | object | see CustomerProfileData |
| message | string | error message in case of error transaction |
| code | number | error code in case of error transaction |
| adapterMessage | string | error message of adapter |
| adapterCode | string | error identifier of adapter |