Suggest Edits

/payments

 
post/payments

Use this call to initiate a payment.

*Note: If the "authorize" action is specified, a follow-up capture transaction is required to request for funding. Some brands do not allow a separate authorize - capture flow, and an "authorize" action leads directly to a final payment. For these brands the "payment" action is returned in the response.

Request Body Params

action
String(50)
required

Payment action to perform. Valid values:
"payment" to perform a final payment transaction. A successful final payment transaction can only be refunded, not cancelled.
"authorize" to perform a payment that can be captured or cancelled afterwards.

header
Object
required

Header block.

businessId
String(50)
required

The ID provided to identify your company.

body
Object
required

Body block.

transaction
Object
required

Transaction-block.

trackingCode
String(100)
required

Your Unique Transaction Reference. Minimal length: 8 characters.

amount
Amount
required

The amount of the payment.

currencyCode
String(3)
required

Currency code for the transaction amount (ISO 4217-Alpha 3).

storeId
Number

An ID given to the business. It can be used to indicate a specific sub-account, generally to force a type of routing.

invoiceId
String(255)

A reference to the invoice/order within the Merchant's system.

purchaseId
String(100)
conditional

A reference to the purchase within the Merchant's system.

countryCode
String(2)
conditional

Country code (ISO 3166-1 Alpha 2). This is a conditional field. It is not needed for card payments but is needed for some alternative payment brands.

languageCode
String(2)

Language code (ISO 639-1) of customer paying for the transaction. It can be used for some alternative payment methods.

brandId
Number
conditional

Identifies the transaction payment brand. Mandatory for all transactions, except for card transactions when your configuration allows the presence of the card block to be enough. See brand list.

source
String(10)

Source of transaction, EC assumed. Possible values:

EC - Ecommerce transaction.
MO - Mail Order transaction.
TO - Telephone Order transaction.
type
String(10)

Type of transaction. Single assumed. Possible values:

SINGLE - Default transaction type, single, non-recurring transaction.
FIRST - First transaction of a recurrent sequence of transactions.
RECURRING - Second and subsequent transactions in a recurrent sequence.
LAST - Last transaction of a recurrent sequence. Used optionally for SEPA direct debit.
descriptor
String(127)

Description of the order as it would appear for the customer on for example (if applicable) the customer’s bank statement. The maximum length is generally bound to rules depending on the processor and brand.

notifyUrl
String(2048)

URL to which the notifications can be sent. Please URL-encode this field.

returnUrl
String(2048)
conditional

URL to which the consumer is redirected after the transaction is completed or canceled for certain payment methods (e.g. iDEAL, PayPal). When the redirection takes place, the id query parameter is appended to this URL with the current transaction id as value, as seen in the example below.

Example:
If in the transaction request the returnUrl field has the value http://store.merchant.com, after the transaction is completed, the consumer will be redirected to the URL http://store.merchant.com?id=1234 (where 1234 is the id of the transaction).

Please URL-encode this field.

token
String(50)

Token identifier to replace the card information. For more information check the tokenization guide.

tokenize
Boolean

Indicates if a token should be created based on the following fields: businessId, card.number, card.expiryMonth and card.expiryYear. For more information check the tokenization guide.

payTimeout
Number

Indicates the payment timeout in seconds. It can be used for some alternative payment methods.

dba
Object
conditional

Block with merchant data.

name
String(255)

Doing business as – name. For applicable suppliers, a.o. Union Pay, used generally as (first part of the) dynamic descriptor.

street
String(56)

Street address of merchant. Used for applicable suppliers.

shortName
String(255)

Short name for “Doing business as”. Can be used for Union Pay as part of the dynamic descriptor.

city
String(255)

City of merchant. Used for applicable suppliers as part of dynamic descriptor.

zip
String(10)

ZIP of merchant. Used for applicable suppliers as part of dynamic descriptor.

stateCode
String(15)

US State code. Used for applicable suppliers as part of dynamic descriptor.

countryCode
String(2)

Country code of merchant. Used for applicable suppliers as part of dynamic descriptor (ISO 3166-1 Alpha 2).

email
String(255)

Email of merchant. Used for applicable suppliers as part of dynamic descriptor.

phoneNumber
String(64)

Phone Number of merchant. Used for applicable suppliers as part of dynamic descriptor. The number can start with '+' prefix, but only numbers, letters, whitespaces and the characters ().#- are allowed.

subMerchantId
String(255)

The ID of the sub-merchant. This value is assigned by the sub-merchant's payment facilitator or acquirer. Cannot be space or zero filled. Used for applicable suppliers.

card
Object
conditional

Block with card data, required for credit card transactions.

holderName
String(255)
conditional

Name of the card holder as printed on the card.

number
Card Number
conditional

Credit card number (PAN). See Data Types.

expiryMonth
Number(2)
conditional

Month part of expiry date. Format MM.

expiryYear
Number(4)
conditional

Year part of expiry date. Format: YYYY.

cvv
String(4)
conditional

CVV printed on the back of the card.

issueNumber
String(2)
conditional

Issue number, used for some Maestro and Solo cards.

threeDSecure
Object

Optional block to provide 3D Secure data from an external MPI or to initiate a 3D Secure flow. For more information see 3D Secure.

eci
String

Ecommerce indicator. Possible values:

00 - Internet Transaction (SecureCode)
01 - Authentication Attempted (SecureCode)
02 - Authenticated (SecureCode)
05 - Authenticated (VbV)
06 - Authentication Attempted (VbV)
07 - Internet Transaction (VbV)

Values 0, 1, 2,... instead of 00, 01, 02,... are also accepted.

avv
String

Authentication verification value (CAVV or AAV), Base64 encoded.

xid
String

Transaction identifier, Base64 encoded.

checkEnrollment
Boolean
conditional

Indicates the system that a 3D Secure flow should be inititated.

bank
Object

Block needed for bank account transactions.

issuerId
Number
conditional

Identifier of the issuing bank. This can be used for certain brands like iDeal.

countryCode
String(2)
conditional

Country code of issuing bank. Mandatory in some specific cases e.g. for brand iDeal when issuerId is used (ISO 3166-1 Alpha 2).

name
String(256)

Name of the bank.

accountNumber
String(255)
conditional

Bank account number or IBAN when in one field.

accountHolderName
String(256)
conditional

Bank account holder name.

iban
String(256)
conditional

IBAN, mandatory for some transactions e.g. Direct Debit.

bic
String(11)
conditional

Bank Identifier Code. This value must be either 8 or 11 characters long, following ISO 9362.

bankCode
String(15)
conditional

Bank Code.

mandateId
String(256)
conditional

ID of the mandate.

dateCollection
Date
conditional

Date the payment should be collected. Format YYYY-MM-DD.

dateMandateSigned
Date
conditional

Date the mandate was signed. Format: YYYY-MM-DD.

wallet
Object

Block needed for wallet transactions (could also be used for pre-paid card authorizations, such as vouchers).

accountIdentifier
String(255)
conditional

Account identifier.

accountKey
String(255)
conditional

Key (sometimes password) for wallet/virtual account.

qr
Object

Optional block to initiate a QR code payment (available for some alternative payment methods).

generate
Boolean
required

Indicates if a QR code should be generated to initiate a payment.

size
Number

Size in pixels of the QR code to generate.

option
Object

Block to set options for the payment process. Please refer to the description per method/brand.

noShipping
Number(1)

PayPal – Determines whether or not PayPal displays shipping address fields on the experience pages. Allowed values:
0 - PayPal displays the shipping address on the PayPal pages.
1 - PayPal does not display shipping address fields at all.
2 - If shipping address wouldn't be provided, PayPal obtains it from the buyer’s account profile.For digital goods, this field is required and you must set it to 1.

brandName
String

Name of brand the business wants to indicate. Paypal specific.

cartBorderColor
String

Cart border color. Paypal specific.

headerImage
String

Header image. Paypal specific.

quantity
Number(5)

Total quantity. Paypal specific.

locale
String

To control the language on the page of the shopper. Paypal specific.

processingType
Number(1)

Indicates how the transaction is processed.
0 – Complete payment on PayPal site.
1 – Paypal Express. Paypal specific.

minAgeRestriction
Number(3)

Used to restrict payments to customers who are at least the specified number of years old. Supported only by some payment methods (e.g. PaySafeCard).

countryRestriction
String(2)

Country code (ISO 3166-1 Alpha 2) used to restrict payments to customers of the specified country . Supported only by some payment methods (e.g. PaySafeCard).

customer
Object

Customer specific data, needed for some alternative payment methods and fraud checks.

customerId
String(255)

The ID you want to use to identify a customer.

givenName
String(255)

Given name of the customer.

familyName
String(255)

Last name of the customer.

sex
String(1)

Sex of customer, M=Male, F=Female.

birthDate
Date

Birth date of the customer, format YYYY-MM-DD. Required for some risk checks.

phoneNumber
String(64)

Phone number of the customer. Recommended format E.164. Required for some risk checks.

mobileNumber
String(64)

Mobile number of the customer. Recommended format E.164. Required for some risk checks.

email
String(255)

Email address of the customer.

companyName
String(255)

Company name of the customer.

identificationTypeId
Number(5)

Type of National Identification Number
1 – Passport
2 – Driver’s license
3 – ID card
4 – Tax statement

identificationNumber
String(255)

National Identification Number. The number used on the document identified by the identificationTypeId. This value is mandatory if identificationTypeId is 4.

ipAddress
String(64)

IPV4 or IPV6 address of customer (as registered by merchant).

type
Number(1)

Customer type:
1 - personal
2 - company

taxNumber
String(255)

Tax number.

httpUserAgent
String(255)

HTTP User agent as detected by the business.

deviceType
Number (1)

Device types supported:
1 - Desktop Web
2 - Desktop App
3 - Mobile Web
4 - Mobile App
5 - Tablet Web
6 - Tablet App

billingAddress
Object
conditional

Billing address data of the customer, for specific brands, also needed for AVS and fraud checks.

street
String(255)

The name of the street.

houseNumber
String(255)

The number of the house.

houseNumberSuffix
String(255)

The suffix of the house number.

streetInfo
String(255)

Additional street information.

city
String(255)

The name of the city.

stateCode
String(3)

State code (ISO 3166-2).

zip
String(20)

ZIP code for the billing address.

countryCode
String(2)

Country code (ISO 3166-2).

shippingAddress
Object
conditional

Shipping address data of the customer. Needed for some brands (PayPal) and fraud checks.

street
String(255)

The name of the street.

houseNumber
String(255)

The number of the house.

houseNumberSuffix
String(255)

The suffix of the house number.

streetInfo
String(255)

Additional street information.

city
String(255)

The name of the City.

stateCode
String(3)

State code (ISO 3166-2).

zip
String(20)

ZIP code for the shipping address.

countryCode
String(2)

Country code (ISO 3166-2).

customer
Object

Customer specific data, needed for some alternative payment methods and fraud checks.

customerId
String(255)

The ID you want to use to identify a customer.

givenName
String(255)

Given name of the customer.

familyName
String(255)

Last name of the customer.

sex
String(1)

Sex of customer, M=Male, F=Female.

birthDate
Date

Birth date of the customer, format YYYY-MM-DD. Required for some risk checks.

phoneNumber
String(64)

Phone number of the customer. Recommended format E.164. Required for some risk checks.

mobileNumber
String(64)

Mobile number of the customer. Recommended format E.164. Required for some risk checks.

email
String(255)

Email address of the customer.

companyName
String(255)

Company name of the customer.

identificationTypeId
Number(5)

Type of National Identification Number
1 – Passport
2 – Driver’s license
3 – ID card
4 – Tax statement

identificationNumber
String(255)

National Identification Number. The number used on the document identified by the identificationTypeId. This value is mandatory if identificationTypeId is 4.

ipAddress
String(64)

IPV4 or IPV6 address of customer (as registered by merchant).

type
Number(1)

Customer type:
1 - personal
2 - company

taxNumber
String(255)

Tax number.

httpUserAgent
String(255)

HTTP User agent as detected by the business.

deviceType
Number (1)

Device types supported:
1 - Desktop Web
2 - Desktop App
3 - Mobile Web
4 - Mobile App
5 - Tablet Web
6 - Tablet App

order
Object
conditional

Order information, including the products of the transaction.

orderlines
array[object]
conditional

Zero, one, or multiple order lines.

purchaseType
String(255)
conditional

Identifier assigned by the payment acceptor that categorizes the item being purchased.

quantity
Number(5)
conditional

Number of items being purchased.

totalAmount
Amount(10,2)
conditional

Total amount of the order line.

productCode
String(255)
conditional

Code of the product or service.

description
String(2048)
conditional

Order line description.

Response Body Params

result
Number
required

The result of the payment. See result codes.

description
String(150)
required

A short description of the result.

header
Object
required

Header block.

requestTimestamp
Date-time
required

The combined date and time in UTC (ISO8601).

requestCode
String(64)

An internally-generated tracking code.

body
Object
required

Body block.

transaction
Object
conditional

Transaction data.

action
String(50)
required

Actual action performed. In case a separate capture is NOT possible, the transaction will be interpreted and performed as a payment transaction and cannot be cancelled, but can be refunded and with result=0 considered as a “successful payment".

id
String(100)
required

Unique transaction ID given to each transaction.

trackingCode
String(100)
required

Merchant tracking code.

amount
Amount
required

Amount of the transaction.

currencyCode
String(3)
required

Currency code of the amount of the transaction.

brandId
Number

Identified payment brand.

descriptor
String(127)

Descriptor determined by Gateway.

redirect
Object
conditional

Returned in case of payments for which the customer needs to be redirected to a bank.

method
String(4)
conditional

POST or GET (depends on brand used).

url
String
conditional

URL including the query string to which your customer is redirected (depends on brand used).

fields
Object
conditional

Hidden fields (parameters) to post in the body of the message (can be present for redirect method POST only).

{key}*
String(4000)
conditional

Keys to be POST in hidden parameters when redirecting the customer. All keys need to be posted.

card
Object
conditional

Data referencing the card payment made.

approvalCode
String(10)

Approval code of issuer/supplier.

avsResult
String(1)

Result of the AVS check. See AVS Result.

cvvResult
String(1)

Result of the CVV check. See CVV Result.

firstSixDigits
String(6)

Initial six digits or bin of the credit or debit card.

lastFourDigits
String(4)

Last four digits of the used credit or debit card number.

expiryMonth
String(2)

Month part of the expiry date of the card.

expiryYear
String(4)

Year part of the expiry date of the card.

holderName
String(255)

Name of the card holder as printed on the card.

avsAuthorizationEntity
String(1)

The code for the entity checking the AVS.

recurringAdvice
String(2)
conditional

For recurring transactions a recurring advice code may be returned by card schemes. See recurring advice code.

threeDResult
String(1)
conditional

Result of the AVV (CAVV or UCAF) check. See 3D Secure Result.

threeDSecure
Object
conditional

3D Secure results. For more information see 3D Secure.

enrollmentResult
String(1)

Enrollment result:
Y - Yes, consumer enrolled in 3D Secure program and eligible for authentication.
N - No, consumer not enrolled in 3D Secure program.
U - Unavailable, Directory Server (DS) or Access Control Server (ACS) not available at the time of the request.
B - Bypass, 3D Secure program not applied.

authenticationResult
String(1)

Authentication result:
Y - Authenticated (Issuer liability).
A - Attempted.
N - Failed (Merchant liability).
U - Unavailable (Merchant liability).

bank
Object

Contains the bank responses.

name
String(256)

Name of bank used in transaction.

countryCode
String(2)

ISO country code used for bank in transaction.

accountNumber
String(255)

Bank account number or IBAN used in transaction.

accountHolderName
String(256)

Name of account Holder used in transaction.

iban
String(256)

IBAN (International Bank Account Number) used in transaction.

bic
String(11)

Bank Identifier Code. This value must be either 8 or 11 characters long, following ISO 9362.

qr
Object
conditional

QR data needed for QR code payments. It will be returned if in the request the QR generate field is set to true and it is supported by the payment method.

resource
String
required

URL/Location of the QR code image.

token
Object
conditional

Block containing token information. It will be returned when in the transaction request the tokenize field is set to true or when a token has been used. See the tokenization section for further information.

token
String(50)
required

Token identifier.

displayHint
String(19)
required

Shows the card number information masked with the following format: ************1234 (i.e. with only the last four digits visible).

error
Object

Contains the error(s) when the transaction resulted in an error.

code
Number
required

Multiple errors are possible. Not mandatory for a number of results.

message
String
required

Error code (internally raised EVENT/ERROR CODE) on detailed level.

https://stagconnect.acehubpaymentservices.com/gateway/v3/payments

{
  "header" : {
    "businessId" : "{businessId}"
  },
  "action" : "authorize",
  "body" : {
    "card" : {
      "holderName" : "John Doe",
      "number" : "4111111111111111",
      "expiryMonth" : "03",
      "expiryYear" : "2020"
    },
    "transaction" : {
      "amount" : "1.00",
      "brandId" : "1010",
      "trackingCode" : "7F4BFD5D-55E4-4775-81F7-0784188876C7",
      "currencyCode" : "EUR"
    }
  }
} 
https://stagconnect.acehubpaymentservices.com/gateway/v3/payments/

{
   "action" : "payment",
   "header" : {
      "businessId" : "{businessId}"
   },
   "body" : {
      "transaction" : {
         "trackingCode" : "7F4BFD5D-55E4-4775-81F7-0784188876C7",
         "brandId" : "1010",
         "amount" : "1.00",
         "currencyCode" : "USD",
         "countryCode" : "NL",
         "returnUrl" : "https://returnurl.com"
      },
      "card" : {
         "holderName" : "John Doe",
         "number" : "4111111111111111",
         "expiryMonth" : "03",
         "expiryYear" : "2020"
      },
      "threeDSecure" : {
         "checkEnrollment" : true
      }
   }
}
https://stagconnect.acehubpaymentservices.com/gateway/v3/payments/

{
  "header" : {
    "businessId" : "{businessId}"
  },
  "action" : "payment",
    "body" : {
      "qr" : {
        "generate": "true"
      },  
      "dba" : {
        "name": "PV"
      },
      "bank" : {
        "issuerId": "30"
      },
      "transaction" : {
        "purchaseId": 1234567890,
        "trackingCode": "6E37EC4C-44D3-3664-70E6-F673077765B6",
        "brandId": "3010",
        "amount": "25.45",
        "currencyCode": "EUR",
        "returnUrl": "https://returnurl.com",
        "descriptor": "Demo Descriptor",
        "languageCode": "nl"
      }
    }
}
var http = require('https')

var options = {
  'method': 'POST',
  'hostname': 'stagconnect.acehubpaymentservices.com',
  'port': null,
  'path': 'gateway/v3/payments',
  'headers': {
    'accept': 'application/json',
    'content-type': 'application/json',
    'authorization': 'Basic ******'
  }
}

var req = http.request(options, function (res) {
  var chunks = []

  res.on('data', function (chunk) {
    chunks.push(chunk)
  })

  res.on('end', function () {
    var body = Buffer.concat(chunks)
    console.log(body.toString())
  })
})

req.end()
package main

import (
  "fmt"
  "net/http"
  "io/ioutil"
)

func main() {
  url := "https://stagconnect.acehubpaymentservices.com/gateway/v3/payments"

  req, _ := http.NewRequest("POST", url, nil)

  req.Header.Add("accept", "application/json")
  req.Header.Add("content-type", "application/json")
  req.Header.Add("authorization", "Basic ******")

  res, _ := http.DefaultClient.Do(req)

  defer res.Body.Close()
  body, _ := ioutil.ReadAll(res.Body)

  fmt.Println(res)
  fmt.Println(string(body))
}
require 'uri'
require 'net/http'

url = URI("https://stagconnect.acehubpaymentservices.com/gateway/v3/payments")

http = Net::HTTP.new(url.host, url.port)

request = Net::HTTP::Post.new(url)
request["accept"] = 'application/json'
request["content-type"] = 'application/json'
request["authorization"] = 'Basic ******'

response = http.request(request)
puts response.read_body
import http.client

conn = http.client.HTTPSConnection("stagconnect.acehubpaymentservices.com")

payload = "" # Fill with request body

headers = {
  'accept': "application/json",
  'content-type': "application/json",
  'authorization': "Basic ******"
}

conn.request("POST", "/gateway/v3/payments", payload, headers)

res = conn.getresponse()
data = res.read()

print(data.decode("utf-8"))
<?php

$curl = curl_init();

curl_setopt_array($curl, array(
  CURLOPT_URL => "https://stagconnect.acehubpaymentservices.com/gateway/v3/payments",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => "",
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 30,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => "POST",
  CURLOPT_POSTFIELDS => "",
  CURLOPT_HTTPHEADER => array(
    "accept: application/json",
    "authorization: Basic ******",
    "content-type: application/json"
  ),
));

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
  echo "cURL Error #:" . $err;
} else {
  echo $response;
}
public static String excutePost(String targetURL, String urlParameters) 
{
  try (CloseableHttpClient client = HttpClients.createDefault()) {
    int contentLength = urlParameters.getBytes().length;

    HttpPost post = new HttpPost(targetURL);
    post.setHeader(new BasicHeader("Content-Type", "application/json"));

    post.setEntity(new StringEntity(urlParameters));

    HttpResponse response = client.execute(post);

    if (response.getStatusLine().getStatusCode() == HttpStatus.SC_OK) {
      return EntityUtils.toString(response.getEntity());
    }

    // Or whatever clever strategy to handle the error.
    throw new RuntimeException(response.getStatusLine().getReasonPhrase());
  } catch (Exception ex) {
    Logger.getLogger(Main.class.getName()).log(Level.SEVERE, null, ex);
    throw new RuntimeException(ex.getMessage(), ex);
  }
}
A binary file was returned

You couldn't be authenticated

{
  "result" : 0,
  "description" : "Ok",
  "header" : {
    "requestTimestamp" : "2017-06-19T10:20:51Z",
    "requestCode" : "2764688E-0EBC-4768-9A04-919FC74DA757"
  },
  "body" : {
    "card" : {
      "approvalCode" : "844875",
      "expiryMonth" : "05",
      "expiryYear" : "2020",
      "firstSixDigits" : "411111",
      "holderName" : "John Doe",
      "lastFourDigits" : "1111"
    },
    "transaction" : {
      "amount" : 1,
      "brandId" : 1010,
      "currencyCode" : "EUR",
      "action" : "authorize",
      "id" : "50F4A9D9-FB2A-4308-A085-9E22C344DD12",
      "trackingCode" : "7F4BFD5D-55E4-4775-81F7-0784188876C7"
    }
  }
}
{
   "result" : 2,
   "description" : "Pending",
   "header" : {
      "requestTimestamp" : "2017-05-08T10:09:23Z",
      "requestCode" : "3A57CEBA-3001-46A4-A044-5769D4B5319F"
   },
   "body" : {
      "redirect" : {
         "method" : "POST",
         "url" : "https://0eafstag.cardinalcommerce.com/EAFService/jsp/v1/redirect",
         "fields" : {
            "MD" : "7F4BFD5D-55E4-4775-81F7-0784188876C7",
            "PaReq" : "P.d304729f6767a5dced71a2b18644daeb093b23d9a6465121d5186de2dcd1ebd1194156582bed6e9dc3b25bdbcf80e7283efb503917349dce107c83ddabc42e20",
            "TermUrl" : "https://stagconnect.acehubpaymentservices.com/gateway/v3/threedsecure/d2828090-7917-4ff9-b1cb-0a1737bca364?action=payment"
         }
      },
      "threeDSecure" : {
         "enrollmentResult" : "Y"
      },
      "transaction" : {
         "amount" : 1,
         "brandId" : 1010,
         "currencyCode" : "USD",
         "id" : "1C737F60-6E58-4C05-987B-E5683087D82C",
         "trackingCode" : "7F4BFD5D-55E4-4775-81F7-0784188876C7"
      }
   }
}
{
  "result" : 3,
  "description" : "Pending merchant",
  "header" : {
    "requestTimestamp": "2018-09-26T14:35:40Z"
  },
  "body" : {
    "qr": {
      "resource": "https://qr3.ideal.nl/qrcode/404e4228-0e42-44ac-952f-de377a5daafc.png"
    },
    "transaction" : {         
      "descriptor": "Demo Descriptor",
      "amount": 25.45,
      "brandId": 3010,
      "currencyCode": "EUR",
      "action": "payment",
      "id": "193a7611-ea8b-46bc-a13d-2b90c3abfc99",
      "trackingCode": "6E37EC4C-44D3-3664-70E6-F673077765B6"
    }
  }
}
 
Suggest Edits

/payments/:id/capture

 
post/payments/id/capture

Path Params

id
string
required

Unique transaction ID of the initial authorize transaction.

Use this call to capture a successful authorize transaction so that the charge is placed and funding occurs. The transaction id returned in the response of the authorize transaction should be used as the path parameter. The amount to be captured must be included. Partial captures, in which only a part of the authorized amount is captured, are possible for most brands. Capturing an amount larger than the authorized amount is possible for some brands. Also, multiple captures are possible for some brands.

Request Body Params

header
Object
required

Header block.

businessId
String(50)
required

The ID provided to identify your company.

body
Object
required

Body block.

transaction
Object
required

Transaction-block.

trackingCode
String(100)
required

Your Unique Transaction Reference. Minimal length: 8 characters.

amount
Amount
required

Amount to be captured.

currencyCode
String(3)
required

Currency code of the amount to be captured (ISO 4217 – Alpha 3). Must be the same as the currency code of the original transaction.

invoiceId
String(255)

Additional info, e.g. Invoice Id given by merchant.

Response Body Params

result
Number
required

The result of the payment. See result codes.

description
String(150)
required

A short description of the result.

header
Object
required

Header block.

requestTimestamp
Date-time
required

The combined date and time in UTC (ISO8601).

requestCode
String(64)

An internally-generated tracking code.

body
Object
required

Body block.

transaction
Object
conditional

Transaction data.

action
String(50)
required

Actual action performed.

id
String(100)
required

Unique transaction ID given to each transaction.

trackingCode
String(100)
required

Unique transaction reference.

parentId
String(100)
required

Parent transaction identifier.

amount
Amount
required

Amount of the transaction.

currencyCode
String(3)
required

Currency code of the amount of the transaction.

brandId
Number

Identified brand of the payment.

descriptor
String(127)

Descriptor determined by Gateway.

card
Object
conditional

Card data.

firstSixDigits
String(6)

The bin of the used credit or debit card.

lastFourDigits
String(4)

Last four digits of the used credit or debit card number.

expiryMonth
String(2)

Month of the expiry date of the card used.

expiryYear
String(4)

Year of the expiry date of the card used.

holderName
String(255)

Name on the card used.

approvalCode
String(10)

Approval code of issuer / supplier.

avsResult
String(1)

Result of the AVS check. See AVS Result.

cvvResult
String(1)

Result of the CVV check. See CVV Result.

avsAuthorizationEntity
String(1)

The code for the entity checking the AVS.

recurringAdvice
String(2)
conditional

For recurring transactions a recurring advice code may be returned by card schemes. See recurring advice code.

threeDResult
String(1)
conditional

Result of the AVV (CAVV or UCAF) check. See 3D Secure Result.

bank
Object

Contains the bank responses.

name
String(255)

Name submitted in request.

countryCode
String(2)

CountryCode.

accountHolderName
String(255)

Name of accountHolder.

iban
String(255)

IBAN.

bic
String(11)

BIC.

error
Object

Contains the error(s) when the transaction resulted in an error.

code
Number
required

Multiple errors are possible. Not mandatory for a number of results.

message
String
required

Error code (internally raised EVENT/ERROR CODE) on detailed level.

https://stagconnect.acehubpaymentservices.com/gateway/v3/payments/{id}/capture

{
  "header" : {
    "businessId" : "{businessId}"
  },
  "body" : {
    "transaction" : {
      "amount" : "1.00",
      "currencyCode" : "EUR",
      "trackingCode" : "1C6B38AC-64B6-4BB8-8356-B438D46004FE"
    }
  }
} 
var http = require('https')

var options = {
  'method': 'POST',
  'hostname': 'stagconnect.acehubpaymentservices.com',
  'port': null,
  'path': 'gateway/v3/payments/{id}/capture',
  'headers': {
    'accept': 'application/json',
    'content-type': 'application/json',
    'authorization': 'Basic ******'
  }
}

var req = http.request(options, function (res) {
  var chunks = []

  res.on('data', function (chunk) {
    chunks.push(chunk)
  })

  res.on('end', function () {
    var body = Buffer.concat(chunks)
    console.log(body.toString())
  })
})

req.end()
package main

import (
  "fmt"
  "net/http"
  "io/ioutil"
)

func main() {
  url := "https://stagconnect.acehubpaymentservices.com/gateway/v3/payments/{id}/capture"

  req, _ := http.NewRequest("POST", url, nil)

  req.Header.Add("accept", "application/json")
  req.Header.Add("content-type", "application/json")
  req.Header.Add("authorization", "Basic ******")

  res, _ := http.DefaultClient.Do(req)

  defer res.Body.Close()
  body, _ := ioutil.ReadAll(res.Body)

  fmt.Println(res)
  fmt.Println(string(body))
}
require 'uri'
require 'net/http'

url = URI("https://stagconnect.acehubpaymentservices.com/gateway/v3/payments/{id}/capture")

http = Net::HTTP.new(url.host, url.port)

request = Net::HTTP::Post.new(url)
request["accept"] = 'application/json'
request["content-type"] = 'application/json'
request["authorization"] = 'Basic ******'

response = http.request(request)
puts response.read_body
import http.client

conn = http.client.HTTPSConnection("stagconnect.acehubpaymentservices.com")

payload = "" # Fill with request body

headers = {
  'accept': "application/json",
  'content-type': "application/json",
  'authorization': "Basic ******"
}

conn.request("POST", "/gateway/v3/payments/{id}/capture", payload, headers)

res = conn.getresponse()
data = res.read()

print(data.decode("utf-8"))
<?php

$curl = curl_init();

curl_setopt_array($curl, array(
  CURLOPT_URL => "https://stagconnect.acehubpaymentservices.com/gateway/v3/payments/{id}/capture",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => "",
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 30,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => "POST",
  CURLOPT_POSTFIELDS => "",
  CURLOPT_HTTPHEADER => array(
    "accept: application/json",
    "authorization: Basic ******",
    "content-type: application/json"
  ),
));

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
  echo "cURL Error #:" . $err;
} else {
  echo $response;
}
public static String excutePost(String targetURL, String urlParameters) 
{
  try (CloseableHttpClient client = HttpClients.createDefault()) {
    int contentLength = urlParameters.getBytes().length;

    HttpPost post = new HttpPost(targetURL);
    post.setHeader(new BasicHeader("Content-Type", "application/json"));

    post.setEntity(new StringEntity(urlParameters));

    HttpResponse response = client.execute(post);

    if (response.getStatusLine().getStatusCode() == HttpStatus.SC_OK) {
      return EntityUtils.toString(response.getEntity());
    }

    // Or whatever clever strategy to handle the error.
    throw new RuntimeException(response.getStatusLine().getReasonPhrase());
  } catch (Exception ex) {
    Logger.getLogger(Main.class.getName()).log(Level.SEVERE, null, ex);
    throw new RuntimeException(ex.getMessage(), ex);
  }
}
A binary file was returned

You couldn't be authenticated

{
  "result" : 0,
  "description" : "Ok",
  "header" : {
    "requestTimestamp" : "2017-06-19T10:25:32Z",
    "requestCode" : "96CE520E-878B-49E9-BBEE-549455992B04"
  },
  "body" : {
    "card" : {
      "expiryMonth" : "05",
      "expiryYear" : "2020",
      "firstSixDigits" : "411111",
      "holderName" : "John Doe",
      "lastFourDigits" : "1111"
    },
    "transaction" : {
      "amount" : 1,
      "currencyCode" : "EUR",
      "action" : "capture",
      "id" : "D0A3AFB0-4570-4268-A04A-8D665AA7C484",
      "trackingCode" : "1C6B38AC-64B6-4BB8-8356-B438D46004FE",
      "parentId": "8D1E10A1-9E9C-495B-8AF7-184259CE25DD"
    }
  }
}
{
  "result" : -1,
  "description" : "Input error",
  "header" : {
    "requestTimestamp" : "2017-06-19T10:25:32Z",
    "requestCode" : "3900972B-EA59-4D69-AE69-9240F165CC2E"
  },
  "body" : {
    "error": {
      "code" : 201000021,
      "message" : "Transaction operation not allowed"
    },
    "transaction" : {
      "amount" : 1,
      "currencyCode" : "EUR",
      "action" : "capture",
      "id" : "3900972B-EA59-4D69-AE69-9240F165CC2E",
      "trackingCode" : "1C6B38AC-64B6-4BB8-8356-B438D46004FE",
      "parentId": "8D1E10A1-9E9C-495B-8AF7-184259CE25DD"
    }
  }
}
 
Suggest Edits

/payments/:id/cancel

 
post/payments/id/cancel

Path Params

id
string
required

Unique transaction ID of the initial authorize transaction.

Use this call to cancel a successful authorize transaction. The transaction id returned in the response of the authorize transaction should be used as the path parameter. A cancel applies to the total amount of the authorize transaction and is not possible for all brands.

Request Body Params

header
Object
required

Header block.

businessId
String(50)
required

The ID provided to identify your company.

body
Object
required

Body block.

transaction
Object
required

Transaction-block.

trackingCode
String(100)
required

Unique Transaction Reference for the cancellation. The minimal length is 8 characters.

Response Body Params

result
Number
required

The result of the payment. See result codes.

description
String(150)
required

A short description of the result.

header
Object
required

Header block.

requestTimestamp
Date-time
required

The combined date and time in UTC (ISO8601).

requestCode
String(64)

An internally-generated tracking code.

body
Object
required

Body block.

transaction
Object
conditional

Transaction data.

action
String(50)
required

Actual action performed.

id
String(100)
required

Unique transaction ID given to each transaction.

trackingCode
String(100)
required

Merchant tracking code.

parentId
String(100)
required

Parent transaction identifier.

brandId
Number

Identified brand of the payment.

descriptor
String(127)

Descriptor used where possible on statement of customer.

error
Object

Contains the error(s) when the transaction resulted in an error.

code
Number
required

Multiple errors are possible. Not mandatory for a number of results.

message
String
required

Error code (internally raised EVENT/ERROR CODE) on detailed level.

https://stagconnect.acehubpaymentservices.com/gateway/v3/payments/{id}/cancel

{
  "header" : {
    "businessId" : "{businessId}"
  },
  "body" : {
    "transaction" : {
      "trackingCode" : "DFD8CBB9-5833-48AC-8703-55725393401A"
    }
  }
}
var http = require('https')

var options = {
  'method': 'POST',
  'hostname': 'stagconnect.acehubpaymentservices.com',
  'port': null,
  'path': 'gateway/v3/payments/{id}/cancel',
  'headers': {
    'accept': 'application/json',
    'content-type': 'application/json',
    'authorization': 'Basic ******'
  }
}

var req = http.request(options, function (res) {
  var chunks = []

  res.on('data', function (chunk) {
    chunks.push(chunk)
  })

  res.on('end', function () {
    var body = Buffer.concat(chunks)
    console.log(body.toString())
  })
})

req.end()
package main

import (
  "fmt"
  "net/http"
  "io/ioutil"
)

func main() {
  url := "https://stagconnect.acehubpaymentservices.com/gateway/v3/payments/{id}/cancel"

  req, _ := http.NewRequest("POST", url, nil)

  req.Header.Add("accept", "application/json")
  req.Header.Add("content-type", "application/json")
  req.Header.Add("authorization", "Basic ******")

  res, _ := http.DefaultClient.Do(req)

  defer res.Body.Close()
  body, _ := ioutil.ReadAll(res.Body)

  fmt.Println(res)
  fmt.Println(string(body))
}
require 'uri'
require 'net/http'

url = URI("https://stagconnect.acehubpaymentservices.com/gateway/v3/payments/{id}/cancel")

http = Net::HTTP.new(url.host, url.port)

request = Net::HTTP::Post.new(url)
request["accept"] = 'application/json'
request["content-type"] = 'application/json'
request["authorization"] = 'Basic ******'

response = http.request(request)
puts response.read_body
import http.client

conn = http.client.HTTPSConnection("stagconnect.acehubpaymentservices.com")

payload = "" # Fill with request body

headers = {
  'accept': "application/json",
  'content-type': "application/json",
  'authorization': "Basic ******"
}

conn.request("POST", "/gateway/v3/payments/{id}/cancel", payload, headers)

res = conn.getresponse()
data = res.read()

print(data.decode("utf-8"))
<?php

$curl = curl_init();

curl_setopt_array($curl, array(
  CURLOPT_URL => "https://stagconnect.acehubpaymentservices.com/gateway/v3/payments/{id}/cancel",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => "",
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 30,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => "POST",
  CURLOPT_POSTFIELDS => "",
  CURLOPT_HTTPHEADER => array(
    "accept: application/json",
    "authorization: Basic ******",
    "content-type: application/json"
  ),
));

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
  echo "cURL Error #:" . $err;
} else {
  echo $response;
}
public static String excutePost(String targetURL, String urlParameters) 
{
  try (CloseableHttpClient client = HttpClients.createDefault()) {
    int contentLength = urlParameters.getBytes().length;

    HttpPost post = new HttpPost(targetURL);
    post.setHeader(new BasicHeader("Content-Type", "application/json"));

    post.setEntity(new StringEntity(urlParameters));

    HttpResponse response = client.execute(post);

    if (response.getStatusLine().getStatusCode() == HttpStatus.SC_OK) {
      return EntityUtils.toString(response.getEntity());
    }

    // Or whatever clever strategy to handle the error.
    throw new RuntimeException(response.getStatusLine().getReasonPhrase());
  } catch (Exception ex) {
    Logger.getLogger(Main.class.getName()).log(Level.SEVERE, null, ex);
    throw new RuntimeException(ex.getMessage(), ex);
  }
}
A binary file was returned

You couldn't be authenticated

{
  "result" : "0",
  "description" : "Ok",
  "header" : {
    "requestTimestamp" : "2017-06-20T12:30:24Z",
    "requestCode" : "85218C2E-D235-47E8-B6F0-9040753F01BF"
  },
  "body" : {
    "transaction" : {
      "id" : "5D5F27BE-6997-448F-9E9D-77CAA8907D53",
      "trackingCode" : "DFD8CBB9-5833-48AC-8703-55725393401A",
      "parentId": "8D1E10A1-9E9C-495B-8AF7-184259CE25DD",
      "action" : "cancel"
    }
  }
}
{
  "result" : -1,
  "description" : "Input error",
  "header" : {
    "requestTimestamp" : "2017-06-20T12:30:24Z",
    "requestCode" : "FF1D6D6D-B026-4DCF-BB0D-E73E0D4E4F71"
  },
  "body" : {
    "error" : {
      "code" : 100004020,
      "message" : "Not found"
    }
  }
}
 
Suggest Edits

/payments/:id/refund

 
post/payments/id/refund

Path Params

id
string
required

Unique transaction ID of the initial transaction.

Use this call to refund a successfully captured transaction (i.e. a payment transaction or an authorize transaction with a subsequent capture). The transaction id returned in the initial transaction should be used as the path parameter. The amount to be refunded must be included. Partial refunds, in which only a part of the captured amount is refunded, are possible for most brands. Also, refunding an amount larger than the captured amount is possible for some brands.

*Note: The use of the last capture transaction id as the path parameter is also allowed for backward compatibility.

Request Body Params

header
Object
required

Header block.

businessId
String(50)
required

The ID provided to identify your company.

body
Object
required

Body block.

transaction
Object
required

Transaction-block.

trackingCode
String(100)
required

Unique Transaction Reference. Minimal length: 8 characters.

amount
Amount
required

Amount to be refunded.

currencyCode
String(3)
required

Currency code of the amount to be refunded (ISO 4217 – Alpha 3). Must be the same as the currency code of the original transaction.

order
Object
conditional

Order information, including the products of the transaction.

orderlines
array[object]
conditional

Zero, one or multiple order lines.

purchaseType
String(255)
conditional

Identifier assigned by the payment acceptor that categorizes the item being purchased.

quantity
Number(5)
conditional

Number of items.

totalAmount
Amount(10,2)
conditional

Total amount of line.

productCode
String(255)
conditional

Code of the product or service.

description
String(2048)
conditional

Line description.

Response Body Params

result
Number
required

The result of the payment. See result codes.

description
String(150)
required

A short description of the result.

header
Object
required

Header block.

requestTimestamp
Date-time
required

The combined date and time in UTC (ISO 8601).

requestCode
String(64)

An internally-generated tracking code.

body
Object
required

Body block.

transaction
Object
conditional

Transaction data.

action
String(50)
required

Actual action performed.

Id
String(100)
required

Unique transaction ID given to each transaction.

trackingCode
String(100)
required

Unique transaction reference.

parentId
String(100)
required

Parent transaction identifier.

amount
Amount
required

Amount of the transaction.

currencyCode
String(3)
required

Currency code of the amount of the transaction.

brandId
Number

Identified brand of the payment.

descriptor
String(127)

Descriptor determined by Gateway.

card
Object
conditional

Card data.

firstSixDigits
String(6)

First six digits of the used credit or debit card number.

lastFourDigits
String(4)

Last four digits of the used credit or debit card number.

expiryMonth
String(2)

Month of the expiry date of the card used.

expiryYear
String(4)

Year of the expiry date of the card used.

holderName
String(255)

Name on the card used.

approvalCode
String(10)

Approval code of issuer / supplier.

error
Object

Contains the error(s) when the transaction resulted in an error.

code
Number
required

Multiple errors are possible. Not mandatory for a number of results.

message
String
required

Error code (internally raised EVENT/ERROR CODE) on detailed level.

https://stagconnect.acehubpaymentservices.com/gateway/v3/payments/{id}/refund

{
  "header" : {
    "businessId" : "{businessId}"
  },
  "body" : {
    "transaction" : {
      "amount" : "0.01",
      "currencyCode" : "EUR",
      "trackingCode" : "CA715B6D-00EA-46B9-93D7-979B3959DF5D"
    }
  }
}
var http = require('https')

var options = {
  'method': 'POST',
  'hostname': 'stagconnect.acehubpaymentservices.com',
  'port': null,
  'path': 'gateway/v3/payments/{id}/refund',
  'headers': {
    'accept': 'application/json',
    'content-type': 'application/json',
    'authorization': 'Basic ******'
  }
}

var req = http.request(options, function (res) {
  var chunks = []

  res.on('data', function (chunk) {
    chunks.push(chunk)
  })

  res.on('end', function () {
    var body = Buffer.concat(chunks)
    console.log(body.toString())
  })
})

req.end()
package main

import (
  "fmt"
  "net/http"
  "io/ioutil"
)

func main() {
  url := "https://stagconnect.acehubpaymentservices.com/gateway/v3/payments/{id}/refund"

  req, _ := http.NewRequest("POST", url, nil)

  req.Header.Add("accept", "application/json")
  req.Header.Add("content-type", "application/json")
  req.Header.Add("authorization", "Basic ******")

  res, _ := http.DefaultClient.Do(req)

  defer res.Body.Close()
  body, _ := ioutil.ReadAll(res.Body)

  fmt.Println(res)
  fmt.Println(string(body))
}
require 'uri'
require 'net/http'

url = URI("https://stagconnect.acehubpaymentservices.com/gateway/v3/payments/{id}/refund")

http = Net::HTTP.new(url.host, url.port)

request = Net::HTTP::Post.new(url)
request["accept"] = 'application/json'
request["content-type"] = 'application/json'
request["authorization"] = 'Basic ******'

response = http.request(request)
puts response.read_body
import http.client

conn = http.client.HTTPSConnection("stagconnect.acehubpaymentservices.com")

payload = "" # Fill with request body

headers = {
  'accept': "application/json",
  'content-type': "application/json",
  'authorization': "Basic ******"
}

conn.request("POST", "/gateway/v3/payments/{id}/refund", payload, headers)

res = conn.getresponse()
data = res.read()

print(data.decode("utf-8"))
<?php

$curl = curl_init();

curl_setopt_array($curl, array(
  CURLOPT_URL => "https://stagconnect.acehubpaymentservices.com/gateway/v3/payments/{id}/refund",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => "",
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 30,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => "POST",
  CURLOPT_POSTFIELDS => "",
  CURLOPT_HTTPHEADER => array(
    "accept: application/json",
    "authorization: Basic ******",
    "content-type: application/json"
  ),
));

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
  echo "cURL Error #:" . $err;
} else {
  echo $response;
}
public static String excutePost(String targetURL, String urlParameters) 
{
  try (CloseableHttpClient client = HttpClients.createDefault()) {
    int contentLength = urlParameters.getBytes().length;

    HttpPost post = new HttpPost(targetURL);
    post.setHeader(new BasicHeader("Content-Type", "application/json"));

    post.setEntity(new StringEntity(urlParameters));

    HttpResponse response = client.execute(post);

    if (response.getStatusLine().getStatusCode() == HttpStatus.SC_OK) {
      return EntityUtils.toString(response.getEntity());
    }

    // Or whatever clever strategy to handle the error.
    throw new RuntimeException(response.getStatusLine().getReasonPhrase());
  } catch (Exception ex) {
    Logger.getLogger(Main.class.getName()).log(Level.SEVERE, null, ex);
    throw new RuntimeException(ex.getMessage(), ex);
  }
}
A binary file was returned

You couldn't be authenticated

{
  "result" : "0",
  "description" : "Ok",
  "header" : {
    "requestTimestamp" : "2017-06-19T10:25:32Z",
    "requestCode" : "42F14D67-3F2A-4213-A365-AA8A27BB5A13"
  },
  "body" : {
    "transaction" : {
      "id" : "D224CADD-058A-4FC1-A274-47C139DAD5B2",
      "trackingCode" : "CA715B6D-00EA-46B9-93D7-979B3959DF5D",
      "parentId": "2B5321EE-0E7C-43EF-A289-EAC7F61E2EB4",
      "amount" : "0.01",
      "currencyCode" : "EUR",
      "action" : "refund"
    }
  }
}
{
  "result" : -1,
  "description" : "Input error",
  "header" : {
    "requestTimestamp" : "2017-06-19T10:25:32Z",
    "requestCode" : "42F14D67-3F2A-4213-A365-AA8A27BB5A13"
  },
  "body" : {
    "error" : {
      "code" : 201000021,
      "message" : "Transaction operation not allowed"
    },
    "transaction" : {
      "amount" : 1,
      "currencyCode" : "EUR",
      "action" : "refund",
      "id" : "1F10FD4F-3495-4890-A810-95B6414D8772",
      "trackingCode" : "CA715B6D-00EA-46B9-93D7-979B3959DF5D",
      "parentId": "2B5321EE-0E7C-43EF-A289-EAC7F61E2EB4"
    }
  }
}
 
Suggest Edits

/payments/:id

 
get/payments/id?businessId=businessId

Path Params

id
string
required

Unique transaction ID of the transaction.

Query Params

businessId
string
required

The ID provided to identify your company.

Use this call to get the status of a transaction at any time.

Response Body Params

result
Number
required

The result of the payment. See result codes.

description
String(150)
required

A short description of the result.

header
Object
required

Header object.

requestTimestamp
Date-time
required

The combined date and time in UTC (ISO 8601).

requestCode
String(64)

An internally-generated tracking code.

body
Object
required

Body Block.

transaction
Object
required

Transaction-object.

action
String(50)
required

Actual action performed.

id
String(100)
required

Unique transaction ID given to each transaction.

trackingCode
String(100)
required

Merchant tracking code.

parentId
String(100)
conditional

Parent transaction identifier, mandatory for dependent transactions.

amount
Amount
required

Amount of the transaction.

currencyCode
String(3)
required

Currency code of the amount of the transaction.

brandId
Number(10)

Identified brand of the payment.

descriptor
String(127)

Descriptor determined by Gateway.

redirect
Object

Returned in case of payments for which the customer needs to be redirected to a bank.

method
String(4)
conditional

POST or GET. (depends on brand used)

url
String
conditional

URL including the query string to which your customer is redirected. (depends on brand used)

fields
Object
conditional

Hidden fields (parameters) to post in the body of the message (can be present for redirect method POST only).

{key}*
String(4000)
conditional

Keys to be POST in hidden parameters when redirecting the customer. All keys need to be posted.

card
Object
conditional

Card data.

approvalCode
String(10)

Approval code of issuer/supplier.

avsResult
String(1)

Result of the AVS check. See AVS Result.

cvvResult
String(1)

Result of the CVV check. See CVV Result.

firstSixDigits
String(6)

First Six digits of the used credit or debit card.

lastFourDigits
String(4)

Last four digits of the used credit or debit card number.

expiryMonth
String(2)

Month of the expiry date of the card used.

expiryYear
String(4)

Year of the expiry date of the card used.

holderName
String(255)

Name on the card used.

avsAuthorizationEntity
String(1)

The code for the entity checking the AVS.

recurringAdvice
String(2)
conditional

For recurring transactions a recurring advice code may be returned by card schemes. See recurring advice code.

threeDResult
String(1)
conditional

Result of the AVV (CAVV or UCAF) check. See 3D Secure Result.

threeDSecure
Object

3D Secure results. For more information see 3D Secure.

enrollmentResult
String(1)

Enrollment result:
Y - Yes, consumer enrolled in 3D Secure program and eligible for authentication.
N - No, consumer not enrolled in 3D Secure program.
U - Unavailable, Directory Server (DS) or Access Control Server (ACS) not available at the time of the request.
B - Bypass, 3D Secure program not applied.

authenticationResult
String(1)

Authentication result:
Y - Authenticated (Issuer liability).
A - Attempted.
N - Failed (Merchant liability).
U - Unavailable (Merchant liability).

bank
Object

Contains the bank responses.

name
String(256)

Name of bank used in transaction.

countryCode
String(2)

ISO country code used for bank in transaction.

accountNumber
String(255)

Bank account number or IBAN used in transaction.

accountHolderName
String(256)

Name of account Holder used in transaction.

iban
String(256)

IBAN (International Bank Account Number) used in transaction.

bic
String(11)

Bank Identifier Code. This value must be either 8 or 11 characters long, following ISO 9362.

token
Object
conditional

Block containing token information. It will be returned when in the transaction request the tokenize field is set to true or when a token has been used. See the tokenization section for further information.

token
String(50)
required

Token identifier.

displayHint
String(19)
required

Shows the card number information masked with the following format: ************1234 (i.e. with only the last four digits visible).

error
Object

Contains the error(s) when the transaction resulted in an error.

code
Number
required

Multiple errors are possible. Not mandatory for a number of results.

message
String
required

Error code (internally raised EVENT/ERROR CODE) on detailed level.

https://stagconnect.acehubpaymentservices.com/gateway/v3/payments/{id}?businessId={businessId}
var http = require('https')

var options = {
  'method': 'GET',
  'hostname': 'stagconnect.acehubpaymentservices.com',
  'port': null,
  'path': 'gateway/v3/payments/{id}?businessId={businessId}',
  'headers': {
    'accept': 'application/json',
    'authorization': 'Basic ******'
  }
}

var req = http.request(options, function (res) {
  var chunks = []

  res.on('data', function (chunk) {
    chunks.push(chunk)
  })

  res.on('end', function () {
    var body = Buffer.concat(chunks)
    console.log(body.toString())
  })
})

req.end()
package main

import (
  "fmt"
  "net/http"
  "io/ioutil"
)

func main() {
  url := "https://stagconnect.acehubpaymentservices.com/gateway/v3/payments/{id}?businessId={businessId}"

  req, _ := http.NewRequest("GET", url, nil)

  req.Header.Add("accept", "application/json")
  req.Header.Add("authorization", "Basic ******")

  res, _ := http.DefaultClient.Do(req)

  defer res.Body.Close()
  body, _ := ioutil.ReadAll(res.Body)

  fmt.Println(res)
  fmt.Println(string(body))
}
require 'uri'
require 'net/http'

url = URI("https://stagconnect.acehubpaymentservices.com/gateway/v3/payments/{id}?businessId={businessId}")

http = Net::HTTP.new(url.host, url.port)

request = Net::HTTP::Get.new(url)
request["accept"] = 'application/json'
request["authorization"] = 'Basic ******'

response = http.request(request)
puts response.read_body
import http.client

conn = http.client.HTTPConnection("stagconnect.acehubpaymentservices.com")

headers = {
  'accept': "application/json",
  'authorization': "Basic ******"
}

conn.request("GET", "/gateway/v3/payments/{id}?businessId={businessId}", headers=headers)

res = conn.getresponse()
data = res.read()

print(data.decode("utf-8"))
<?php

$curl = curl_init();

curl_setopt_array($curl, array(
  CURLOPT_URL => "https://stagconnect.acehubpaymentservices.com/gateway/v3/payments/{id}?businessId={businessId}",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => "",
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 30,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => "GET",
  CURLOPT_HTTPHEADER => array(
    "accept: application/json",
    "authorization: Basic ******"
  ),
));

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
  echo "cURL Error #:" . $err;
} else {
  echo $response;
}
public static String executeGet(String targetURL) {
  try (CloseableHttpClient client = HttpClients.createDefault()) {
    HttpGet get = new HttpGet(targetURL);
    get.setHeader(new BasicHeader("Content-Type", "application/json"));
    
    HttpResponse response = client.execute(get);
    if (response.getStatusLine().getStatusCode() == HttpStatus.SC_OK) {
        return EntityUtils.toString(response.getEntity());
    }

    // Or whatever clever strategy to handle the error.
    throw new RuntimeException(response.getStatusLine().getReasonPhrase());
} catch (Exception ex) {
    Logger.getLogger(Main.class.getName()).log(Level.SEVERE, null, ex);
    throw new RuntimeException(ex.getMessage(), ex);
    }       
}
A binary file was returned

You couldn't be authenticated

{
  "result" : 0,
  "description" : "Ok",
  "header" : {
    "requestTimestamp" : "2017-06-19T10:25:32Z",
    "requestCode" : "DDD72F99-5BC7-4887-9999-CCC4C68C8B0B"
  },
  "body" : {
    "card" : {
      "approvalCode" : "258753",
      "expiryMonth" : "05",
      "expiryYear" : "2020",
      "firstSixDigits" : "411111",
      "holderName" : "John Doe",
      "lastFourDigits" : "1111"
    },
    "transaction" : {
      "amount" : 1,
      "brandId" : 1010,
      "currencyCode" : "EUR",
      "action" : "payment",
      "id" : "B3D5BA50-6191-4E64-BE9A-9561414CD6B0",
      "trackingCode" : "E5A12ACF-9735-4438-A463-16E574FFFBF6"
    }
  }
}
 
Suggest Edits

/payments

 
get/payments?businessId=businessId&trackingCode=trackingCode

Query Params

businessId
string
required

The ID provided to identify your company.

trackingCode
string
required

Tracking code of the original transaction.

Use this call to get the status of the transactions related to a specific tracking code. The response contains an array of payments.

Response Body Params

[]
Array
required

Payments array.

result
Number
required

The result of the authorization. 0 is successfully paid, 2 is pending and a redirect is expected. See results.

description
String(150)
required

A short description of the result.

header
Object
required

Header object.

body
Object
required

transaction
Object
required

Transaction-object.

action
String(50)
required

Actual action performed.

id
String(100)
required

Unique transaction ID given to each transaction.

trackingCode
String(100)
required

Merchant tracking code.

parentId
String(100)
conditional

Parent transaction identifier, mandatory for dependent transactions.

amount
Amount
required

Amount of the transaction.

currencyCode
String(3)
required

Currency code of the amount of the transaction.

brandId
Number(10)

Identified brand of the payment.

descriptor
String(127)

Descriptor determined by Gateway.

redirect
Object

Returned in case of payments for which the customer needs to be redirected to a bank.

method
String(4)
conditional

POST or GET. (depends on brand used)

url
String
conditional

URL including the query string to which your customer is redirected. (depends on brand used)

fields
Object
conditional

Hidden fields (parameters) to post in the body of the message (can be present for redirect method POST only).

{key}*
String(4000)
conditional

Keys to be POST in hidden parameters when redirecting the customer. All keys need to be posted.

card
Object
conditional

Card data

approvalCode
String(10)

Approval code of issuer/supplier.

avsResult
String(1)

Result of the AVS check. See AVS Result.

cvvResult
String(1)

Result of the CVV check. See CVV Result.

firstSixDigits
String(6)

First Six digits of the used credit or debit card.

lastFourDigits
String(4)

Last four digits of the used credit or debit card number.

expiryMonth
String(2)

Month of the expiry date of the card used.

expiryYear
String(4)

Year of the expiry date of the card used.

holderName
String(255)

Name on the card used.

avsAuthorizationEntity
String(1)

The code for the entity checking the AVS.

recurringAdvice
String(2)
conditional

For recurring transactions a recurring advice code may be returned by card schemes. See recurring advice code.

threeDResult
String(1)
conditional

Result of the AVV (CAVV or UCAF) check. See 3D Secure Result.

threeDSecure
Object

3D Secure results. For more information see 3D Secure.

enrollmentResult
String(1)

Enrollment result:
Y - Yes, consumer enrolled in 3D Secure program and eligible for authentication.
N - No, consumer not enrolled in 3D Secure program.
U - Unavailable, Directory Server (DS) or Access Control Server (ACS) not available at the time of the request.
B - Bypass, 3D Secure program not applied.

authenticationResult
String (1)

Authentication result:
Y - Authenticated (Issuer liability).
A - Attempted.
N - Failed (Merchant liability).
U - Unavailable (Merchant liability).

bank
Object

Contains the bank responses.

name
String(256)

Name of bank used in transaction.

countryCode
String(2)

ISO country code used for bank in transaction.

accountNumber
String(255)

Bank account number or IBAN used in transaction.

accountHolderName
String(256)

Name of account Holder used in transaction.

iban
String(256)

IBAN (International Bank Account Number) used in transaction.

bic
String(11)

Bank Identifier Code. This value must be either 8 or 11 characters long, following ISO 9362.

token
Object
conditional

Block containing token information. It will be returned when in the transaction request the tokenize field is set to true or when a token has been used. See the tokenization section for further information.

token
String(50)
required

Token identifier.

displayHint
String(19)
required

Shows the card number information masked with the following format: ************1234 (i.e. with only the last four digits visible).

error
Object

Contains the error(s) when the transaction resulted in an error.

code
Number
required

Multiple errors are possible. Not mandatory for a number of results.

message
String
required

Error code (internally raised EVENT/ERROR CODE) on detailed level.

https://stagconnect.acehubpaymentservices.com/gateway/v3/payments?businessId={businessId}&trackingCode={trackingCode}
var http = require('https')

var options = {
  'method': 'GET',
  'hostname': 'stagconnect.acehubpaymentservices.com',
  'port': null,
  'path': 'gateway/v3/payments?businessId={businessId}&trackingCode={trackingCode}',
  'headers': {
    'accept': 'application/json',
    'authorization': 'Basic ******'
  }
}

var req = http.request(options, function (res) {
  var chunks = []

  res.on('data', function (chunk) {
    chunks.push(chunk)
  })

  res.on('end', function () {
    var body = Buffer.concat(chunks)
    console.log(body.toString())
  })
})

req.end()
package main

import (
  "fmt"
  "net/http"
  "io/ioutil"
)

func main() {
  url := "https://stagconnect.acehubpaymentservices.com/gateway/v3/payments?businessId={businessId}&trackingCode={trackingCode}"

  req, _ := http.NewRequest("GET", url, nil)

  req.Header.Add("accept", "application/json")
  req.Header.Add("authorization", "Basic ******")

  res, _ := http.DefaultClient.Do(req)

  defer res.Body.Close()
  body, _ := ioutil.ReadAll(res.Body)

  fmt.Println(res)
  fmt.Println(string(body))
}
require 'uri'
require 'net/http'

url = URI("https://stagconnect.acehubpaymentservices.com/gateway/v3/payments?businessId={businessId}&trackingCode={trackingCode}")

http = Net::HTTP.new(url.host, url.port)

request = Net::HTTP::Get.new(url)
request["accept"] = 'application/json'
request["authorization"] = 'Basic ******'

response = http.request(request)
puts response.read_body
import http.client

conn = http.client.HTTPConnection("stagconnect.acehubpaymentservices.com")

headers = {
  'accept': "application/json",
  'authorization': "Basic ******"
}

conn.request("GET", "/gateway/v3/payments?businessId={businessId}&trackingCode={trackingCode}", headers=headers)

res = conn.getresponse()
data = res.read()

print(data.decode("utf-8"))
<?php

$curl = curl_init();

curl_setopt_array($curl, array(
  CURLOPT_URL => "https://stagconnect.acehubpaymentservices.com/gateway/v3/payments?businessId={businessId}&trackingCode={trackingCode}",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => "",
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 30,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => "GET",
  CURLOPT_HTTPHEADER => array(
    "accept: application/json",
    "authorization: Basic ******"
  ),
));

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
  echo "cURL Error #:" . $err;
} else {
  echo $response;
}
public static String executeGet(String targetURL) {
  try (CloseableHttpClient client = HttpClients.createDefault()) {
    HttpGet get = new HttpGet(targetURL);
    get.setHeader(new BasicHeader("Content-Type", "application/json"));
    
    HttpResponse response = client.execute(get);
    if (response.getStatusLine().getStatusCode() == HttpStatus.SC_OK) {
        return EntityUtils.toString(response.getEntity());
    }

    // Or whatever clever strategy to handle the error.
    throw new RuntimeException(response.getStatusLine().getReasonPhrase());
} catch (Exception ex) {
    Logger.getLogger(Main.class.getName()).log(Level.SEVERE, null, ex);
    throw new RuntimeException(ex.getMessage(), ex);
    }       
}
A binary file was returned

You couldn't be authenticated

[{
  "result" : 0,
  "description" : "Ok",
  "header" : {
    "requestTimestamp" : "2017-06-19T10:25:32Z",
    "requestCode" : "DDD72F99-5BC7-4887-9999-CCC4C68C8B0B"
  },
  "body" : {
    "card" : {
      "approvalCode" : "258753",
      "expiryMonth" : "05",
      "expiryYear" : "2020",
      "firstSixDigits" : "411111",
      "holderName" : "John Doe",
      "lastFourDigits" : "1111"
    },
    "transaction" : {
      "amount" : 1,
      "brandId" : 1010,
      "currencyCode" : "EUR",
      "action" : "payment",
      "id" : "B3D5BA50-6191-4E64-BE9A-9561414CD6B0",
      "trackingCode" : "E5A12ACF-9735-4438-A463-16E574FFFBF6"
    }
  }
}]
 
Suggest Edits

AVS Result

 

AVS Result

AVS stands for Address Verification System.

AVS Result
Description
A
Address matches, ZIP does not.
B
Street addresses match for international transactions; postal code not verified.
C
Street & postal code not verified for international transactions.
D
Street addresses and postal codes match for international transactions.
E
Error: Transaction ineligible for address verification or edit error found in the message that prevents AVS from being performed.
F
Street addresses & postal codes match for international transactions (UK only).
G
Address information not verified for international transactions. Issuer is not an AVS participant, or AVS data was present in the request but issuer did not return an AVS result, or Visa performs AVS on behalf of the issuer and there was no address record on file for this account.
I
Address information not verified for international transactions.
K
Card member name matches.
L
Card member name and billing postal code match.
M
Street addresses and postal codes match for international transactions.
N
Address and ZIP do not match.
O
Card member name and billing address match.
P
Postal codes match for international transactions, street address not verified.
R
Retry, system unable to process.
S
Issuer does not support Address Verification.
U
Address information is unavailable.
W
9-digit Zip matches, address does not.
X
All digits match (9-digit Zip Code).
Y
For U.S. addresses, five-digit postal code and address match.
Z
Postal/ZIP matches; street address does not match or street address not included in the request.
 
Suggest Edits

CVV Result

 

CVV Result

CVV stands for Card Verification Value.

CVV Result
Description
M
Match.
N
No match.
P
Not processed.
U
Not verified.
S
CVV should be on the card.
X
Server provider did not respond.
 
Suggest Edits

3D Secure Result

 

3D Secure Result

Result of the AVV (CAVV or UCAF) check.

3DResult
Description
0
CAVV failed validation – authentication.
1
CAVV failed validation – authentication.
2
CAVV passed validation – authentication.
3
CAVV passed validation – attempt (A 3-D Secure authentication value of 7 from the issuer’s ACS indicates that an authentication was attempted).
4
CAVV failed validation – attempt (A 3-D Secure authentication value of 7 from the issuer’s ACS indicates that an authentication was attempted).
5
Reserved for future use – not used.
6
CAVV not validated, issuer not participating in CAVV Validation.
7
CAVV failed validation - attempt (A 3-D Secure authentication value of 7 from Visa’s ACS indicates that an authentication attempt was performed).
8
CAVV passed validation – attempt (A 3-D Secure authentication value of 7 from Visa’s ACS indicates that an authentication attempt was performed. (Determined that Visa generated this value from the use of Visa CAVV key[s])).
9
CAVV failed validation - attempt (A 3-D Secure authentication value of 8 from Visa ACS indicates that an authentication attempt was performed when the issuer’s ACS was not available. (Determined that Visa generated this value from the use of Visa CAVV key[s])).
A
CAVV passed validation – attempt (A 3-D Secure authentication value of 8 from Visa’s ACS indicates that an authentication attempt was performed when the issuer’s ACS was not available. (Determined that Visa generated this value from the use of Visa’s CAVV key[s])).
B
CAVV passed validation - information only, no liability shift. (When the ECI equals 7 and CAVV is present, the CAVV will be validated but no liability shift will occur. Visa will generate this value for card or transaction types that are not eligible for the 3D Secure service).
C
CAVV was not validated – attempt (Issuer did not return a CAVV result code in the authorization response).
D
CAVV was not validated - authentication (Issuer did not return a CAVV result code in the authorization response).
 
Suggest Edits

Recurring Advice Code

 

Recurring Advice Code

MasterCard and Visa support the use of merchant advice codes for issuers to clearly communicate to merchants the following:
• The reason for declining a recurring payment transaction.
• The actions merchants can take to continue to serve their recurring payment customers.

Code
Description
00
No advice provided.
01
New account information available. Advice: Obtain new account information before next billing cycle.
02
Try again later. Advice: Retry the transaction after some days.
03
Do not try again. Advice: Obtain another type of payment from customer if possible.
21
Do not honor. Advice: Stop recurring transaction requests.
 
Suggest Edits

Result codes

 

Result codes

The Payments API uses the “result” field in the response body as the primary and most important indication of success or failure. The “result” field should be used as the basis for further processing rather than evaluating any other field first.

In addition, as REST defines, conventional HTTP status codes are used. The next table shows the “result”, the relevant HTTP status codes used, and whether or not the failed transaction can be retried.

There are situations when the response doesn't contain a body, as you can see in the tables below:

Payment results:

HTTP Status code
Result
Description
Explanation
200
4
Timeout
The payment timeout expired before the customer completed the payment.
200
3
Pending merchant
The transaction is pending and waiting for an action to be performed by the merchant.
200
2
Pending
Pending transaction, the payment was initiated and waiting for the customer to complete the payment at the bank or payment processor.
200
1
Waiting
The transaction was initiated successfully, but a payment was not yet made by the customer or not yet confirmed by the bank. Occurs for brands for which customers have to make a payment separately (like Boletos) or where the bank does not immediately confirm a payment (like SEPA).
200
0
Ok
The transaction was processed successfully.
400, 404
-1
Input error
Error in the input parameters.
400
-2
Failed
The transaction failed because of a processing error at Payvision.
400
-3
Failed, retry
The transaction failed but can be retried.
400
-4
Declined
Declines, etc. In these cases the processing was performed correctly, but the end-result for the customer is not.
400
-5
Declined, retry
The transaction is declined, but can be retried.
401
-6
Security error
Error in authentication data. Generally, no further details are available for security reasons.
500,501
-7
Internal server error
Unexpected server error.
400
-8
Business rule error
Error due to a business rule or a configuration error.
400
-9
Fraud
Errors that suggest fraudulent behavior.
400
-10
Customer processing error
Error or cancellation of customer at supplier. For example, the customer abandoned their transaction at the supplier.
400
-11
Referrals
Errors due to a referral by the supplier.
400
-12
Status unavailable
The transaction was initiated successfully, but the bank or payment processor could not confirm the result.

3D Secure payment results:

HTTP Status code
Result
Description
Explanation
200
2
Pending
The check enrollment result is ‘Y’, ‘N’ or ‘B’. Pending transaction, the payment was initiated and waiting for the customer to complete the payment at the bank or payment processor.
400
-1
Input error
Error in the input parameters.
400
-2
Failed
The transaction failed.
400
-3
Failed, retry
The transaction failed but can be retried.
400
-4
Cardholder authentication unavailable
The check enrollment result is ‘U’.
400
-5
Declined, retry
The transaction is declined, but can be retried.
401
-6
Security error
Error in authentication data. Generally, no further details are available for security reasons.
500,501
-7
Internal server error
Unexpected server error.
400
-8
Business rule error
Error due to a business rule or a configuration error.
 
 
post/credits

Use this call to perform a credit.

*Note: This operation is restricted to certain business types and is enabled when the merchant account is configured.

Request Body Params

header
Object
required

Header block.

businessId
String(50)
required

The ID provided to identify your company.

body
Object
required

Body block.

transaction
Object
required

Transaction-block.

trackingCode
String(100)
required

Your Unique Transaction Reference. Minimal length: 8 characters.

amount
Amount
required

Amount to be authorized.

currencyCode
String(3)
required

Currency code for the transaction amount (ISO 4217-Alpha 3).

storeId
Number(5)

An ID provided to the business, which can be used to indicate a specific sub-account, generally to force a specific kind of routing.

countryCode
String(2)
conditional

Country code (ISO 3166-1 Alpha 2). This is a conditional field. It is not needed for card payments but is needed for some alternative payment brands.

brandId
Number
conditional

Identifies the transaction payment brand. Mandatory for all transactions, except for card transactions when your configuration allows the presence of the card block to be enough. See brand list.

descriptor
String(127)

Description of the order as it would appear for the customer on for example (if applicable) the customer’s bank statement. The maximum length is generally bound to rules depending on the processor and brand.

source
String(10)

Source of transaction, EC assumed. Possible values:

EC - Ecommerce transaction.
MO - Mail Order transaction.
TO - Telephone Order transaction.
type
String(10)

Type of transaction. Single assumed. Not needed for credit. Possible values:

SINGLE - Default transaction type, single, non-recurring transaction.
FIRST - First transaction of a recurrent sequence of transactions.
RECURRING - Second and subsequent transactions in a recurrent sequence.
LAST - Last transaction of a recurrent sequence. Used optionally for SEPA direct debit.
token
String(50)

Token identifier to replace the card information. For more information check the tokenization guide.

tokenize
Boolean

Indicates if a token should be created based on the following fields: businessId, card.number, card.expiryMonth and card.expiryYear. For more information check the tokenization guide.

dba
Object
conditional

Block with merchant data.

name
String(255)

Doing business as – name. For applicable suppliers, a.o. Union Pay, used generally as (first part of the) dynamic descriptor.

street
String(255)

Street address of merchant. Used for applicable suppliers.

shortName
String(255)

Short name for “Doing business as”. Can be used for Union Pay as part of the dynamic descriptor.

city
String(255)

City of merchant. Used for applicable suppliers as part of dynamic descriptor.

zip
String(20)

ZIP of merchant. Used for applicable suppliers as part of dynamic descriptor.

stateCode
String(3)

US State code. Used for applicable suppliers as part of dynamic descriptor.

countryCode
String(2)

Country code of merchant. Used for applicable suppliers as part of dynamic descriptor (ISO 3166-1 Alpha 2).

email
String(255)

Email of merchant. Used for applicable suppliers as part of dynamic descriptor.

phoneNumber
String(64)

Phone Number of merchant. Used for applicable suppliers as part of dynamic descriptor. The number can start with '+' prefix, but only numbers, letters, whitespaces and the characters ().#- are allowed.

subMerchantId
String(15)

The ID of the sub-merchant. This value is assigned by the sub-merchant's payment facilitator or acquirer. Cannot be space or zero filled. Used for applicable suppliers.

card
Object
conditional

Block with card data, required for credit card transactions.

holderName
String(255)
conditional

Name of the card holder as printed on the card.

number
Card Number
conditional

Credit card number (PAN). See Data Types.

expiryMonth
String(2)
conditional

Month part of expiry date. Format MM.

expiryYear
String(4)
conditional

Year part of expiry date. Format: YYYY.

issueNumber
String(2)

Issue number, used for some Maestro and Solo cards.

bank
Object
conditional

Block needed for bank account transactions.

name
String(255)

Name of the bank.

countryCode
String(2)
conditional

Country code of bank. (ISO 3166-1 Alpha 2).

accountNumber
String(255)
conditional

Bank account number/IBAN when in one field.

accountHolderName
String(255)
conditional

Bank account holder name.

iban
String(255)
conditional

IBAN, mandatory for e.g. Direct debit transactions.

bic
String(11)
conditional

Bank Identifier Code.

bankCode
String(15)
conditional

Bank Code.

customer
Object

Customer specific data, needed for some alternative payment methods and fraud checks.

customerId
String(255)

The ID you want to use to identify a customer.

givenName
String(255)

Given name of the customer.

familyName
String(255)

Last name of the customer.

sex
String(1)

Sex of customer, M=Male, F=Female.

birthDate
Date

Birth date of the customer, format YYYY-MM-DD. Required for some risk checks.

phoneNumber
String(64)

Phone number of the customer. Recommended format E.164. Required for some risk checks.

mobileNumber
String(64)

Mobile number of the customer. Recommended format E.164. Required for some risk checks.

email
String(255)

Email address of the customer.

companyName
String(255)

Company name of the customer.

identificationTypeId
Number(5)

Type of National Identification Number
1 – Passport
2 – Driver’s license
3 – ID card
4 – Tax statement

identificationNumber
String(255)

National Identification Number. The number used on the document identified by the identificationTypeId. This value is mandatory if identificationTypeId is 4.

ipAddress
String(64)

IPV4 or IPV6 address of customer (as registered by merchant).

type
Number(1)

Customer type:
1 - personal
2 - company

taxNumber
String(255)

Tax number.

httpUserAgent
String(255)

HTTP User agent as detected by the business.

deviceType
Number (1)

Device types supported:
1 - Desktop Web
2 - Desktop App
3 - Mobile Web
4 - Mobile App
5 - Tablet Web
6 - Tablet App

Response Body Params

result
Number
required

The result of the credit. See result codes.

description
String(150)
required

A short description of the result.

header
Object
required

Header block.

requestTimestamp
Date-time
required

The combined date and time in UTC (ISO 8601).

requestCode
String(64)

An internally-generated tracking code.

body
Object
required

Body Block.

transaction
Object
conditional

Transaction data.

action
String(50)
required

Actual action performed.

id
String(100)
required

Unique transaction ID given to each transaction.

amount
Amount
required

Amount of the transaction.

currencyCode
String(3)
required

Currency code of the amount of the transaction.

brandId
Number

Identified payment brand.

descriptor
String(127)

Descriptor determined by Gateway.

trackingCode
String(150)
required

Unique transaction reference.

card
Object
conditional

Card data.

firstSixDigits
String(6)

First six digits of the used credit or debit card.

lastFourDigits
String(4)

Last four digits of the used credit or debit card number.

expiryMonth
String(2)

Month of the expiry date of the card used.

expiryYear
String(4)

Year of the expiry date of the card used.

holderName
String(255)

Name on the card used.

approvalCode
String(10)

Approval code of issuer/supplier.

bank
Object

Contains the bank responses.

name
String(256)

Name of bank used in transaction.

countryCode
String(2)

ISO country code used for bank in transaction.

accountNumber
String(255)

Bank account number or IBAN used in transaction.

accountHolderName
String(256)

Name of account Holder used in transaction.

iban
String(256)

IBAN (International Bank Account Number) used in transaction.

bic
String(11)

Bank Identifier Code. This value must be either 8 or 11 characters long, following ISO 9362.

token
Object
conditional

Block containing token information. It will be returned when in the transaction request the tokenize field is set to true or when a token has been used. See the tokenization section for further information.

token
String(50)
required

Token identifier.

displayHint
String(19)
required

Shows the card number information masked with the following format: ************1234 (i.e. with only the last four digits visible).

error
Object

Contains the error(s) when the transaction resulted in an error.

code
Number
required

Multiple errors are possible. Not mandatory for a number of results.

message
String
required

Error code (internally raised EVENT/ERROR CODE) on detailed level.

https://stagconnect.acehubpaymentservices.com/gateway/v3/credits

{
  "header" : {
    "businessId" : "{businessId}"
  },
  "action" : "credit",
  "body" : {
    "card" : {
      "holderName" : "John Doe",
      "number" : "4111111111111111",
      "expiryMonth" : "05",
      "expiryYear" : "2020"
    },
    "transaction" : {
      "amount" : "1.00",
      "brandId" : "1010",
      "trackingCode" : "EECCF082-D350-40B0-A5E3-940C2EBFD0D1",
      "currencyCode" : "EUR"
    }
  }
}
var http = require('https')

var options = {
  'method': 'POST',
  'hostname': 'stagconnect.acehubpaymentservices.com',
  'port': null,
  'path': 'gateway/v3/credits',
  'headers': {
    'accept': 'application/json',
    'content-type': 'application/json',
    'authorization': 'Basic ******'
  }
}

var req = http.request(options, function (res) {
  var chunks = []

  res.on('data', function (chunk) {
    chunks.push(chunk)
  })

  res.on('end', function () {
    var body = Buffer.concat(chunks)
    console.log(body.toString())
  })
})

req.end()
package main

import (
  "fmt"
  "net/http"
  "io/ioutil"
)

func main() {
  url := "https://stagconnect.acehubpaymentservices.com/gateway/v3/credits"

  req, _ := http.NewRequest("POST", url, nil)

  req.Header.Add("accept", "application/json")
  req.Header.Add("content-type", "application/json")
  req.Header.Add("authorization", "Basic ******")

  res, _ := http.DefaultClient.Do(req)

  defer res.Body.Close()
  body, _ := ioutil.ReadAll(res.Body)

  fmt.Println(res)
  fmt.Println(string(body))
}
require 'uri'
require 'net/http'

url = URI("https://stagconnect.acehubpaymentservices.com/gateway/v3/credits")

http = Net::HTTP.new(url.host, url.port)

request = Net::HTTP::Post.new(url)
request["accept"] = 'application/json'
request["content-type"] = 'application/json'
request["authorization"] = 'Basic ******'

response = http.request(request)
puts response.read_body
import http.client

conn = http.client.HTTPSConnection("stagconnect.acehubpaymentservices.com")

payload = "" # Fill with request body

headers = {
  'accept': "application/json",
  'content-type': "application/json",
  'authorization': "Basic ******"
}

conn.request("POST", "/gateway/v3/credits", payload, headers)

res = conn.getresponse()
data = res.read()

print(data.decode("utf-8"))
<?php

$curl = curl_init();

curl_setopt_array($curl, array(
  CURLOPT_URL => "https://stagconnect.acehubpaymentservices.com/gateway/v3/credits",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => "",
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 30,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => "POST",
  CURLOPT_POSTFIELDS => "",
  CURLOPT_HTTPHEADER => array(
    "accept: application/json",
    "authorization: Basic ******",
    "content-type: application/json"
  ),
));

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
  echo "cURL Error #:" . $err;
} else {
  echo $response;
}
public static String excutePost(String targetURL, String urlParameters) 
{
  try (CloseableHttpClient client = HttpClients.createDefault()) {
    int contentLength = urlParameters.getBytes().length;

    HttpPost post = new HttpPost(targetURL);
    post.setHeader(new BasicHeader("Content-Type", "application/json"));

    post.setEntity(new StringEntity(urlParameters));

    HttpResponse response = client.execute(post);

    if (response.getStatusLine().getStatusCode() == HttpStatus.SC_OK) {
      return EntityUtils.toString(response.getEntity());
    }

    // Or whatever clever strategy to handle the error.
    throw new RuntimeException(response.getStatusLine().getReasonPhrase());
  } catch (Exception ex) {
    Logger.getLogger(Main.class.getName()).log(Level.SEVERE, null, ex);
    throw new RuntimeException(ex.getMessage(), ex);
  }
}
A binary file was returned

You couldn't be authenticated

{
  "result" : 0,
  "description" : "Ok",
  "header" : {
    "requestTimestamp" : "2017-05-19T11:21:31Z",
    "requestCode" : "B29500D3-5F7E-45E4-9034-B45940E9AA76"
  },
  "body" : {
    "card" : {
      "expiryMonth" : "05",
      "expiryYear" : "2020",
      "firstSixDigits" : "411111",
      "holderName" : "John Doe",
      "lastFourDigits" : "1111"
    },
    "transaction" : {
      "amount" : 1,
      "brandId" : 1010,
      "currencyCode" : "EUR",
      "action" : "credit",
      "id" : "91EBAA7F-2435-4EB1-AECA-AE9FD0C1D8C9",
      "trackingCode" : "EECCF082-D350-40B0-A5E3-940C2EBFD0D1"
    }
  }
}
{
  "result" : -1,
  "description" : "Input error",
  "header" : {
    "requestTimestamp" : "2017-05-19T11:21:31Z",
    "requestCode" : "B29500D3-5F7E-45E4-9034-B45940E9AA76"
  },
  "body" : {
    "error" : {
      "code" : 21000220,
      "message" : "Invalid field length for body.transaction.currencyCode, value:'EURO'  (length should be 3)"
    }
  }
}
 
Suggest Edits

/credits/:id

 
get/credits/id?businessId=businessId

Path Params

id
string
required

Unique transaction ID of the credit.

Query Params

businessId
string
required

The ID provided to identify your company.

Use this call to get the status of a credit at any time.

Response Body Params

result
Number
required

The result of the credit. See result codes.

description
String(150)
required

A short description of the result.

header
Object
required

Header block.

requestTimestamp
Date-time
required

The combined date and time in UTC (ISO 8601).

requestCode
String(64)

An internally-generated tracking code.

body
Object
required

Body Block.

transaction
Object
required

Transaction data.

action
String(50)
required

Actual action performed.

id
String(100)
required

Unique transaction ID given to each transaction.

amount
Amount
required

Amount of the transaction.

currencyCode
String(3)
required

Currency code of the amount of the transaction.

brandId
Number

Identified brand of the payment.

descriptor
String(127)

Descriptor determined by Gateway. The actual length of the descriptor maximally being used, is depending on the method and brand. For cards generally 38 characters can be used. Processor specific formats may apply in this case.

trackingCode
String(100)
required

Unique transaction reference.

card
Object
conditional

Card data.

firstSixDigits
string(6)

First six digits of the used credit or debit card.

lastFourDigits
String(4)

Last four digits of the used credit or debit card number.

expiryMonth
String(2)

Month of the expiry date of the card used.

expiryYear
String(4)

Year of the expiry date of the card used.

holderName
String(255)

Name on the card used.

approvalCode
String(10)

Approval code of issuer/supplier.

bank
Object

Contains the bank responses.

name
String(256)

Name of bank used in transaction.

countryCode
String(2)

ISO country code used for bank in transaction.

accountNumber
String(255)

Bank account number or IBAN used in transaction.

accountHolderName
String(256)

Name of account Holder used in transaction.

iban
String(256)

IBAN (International Bank Account Number) used in transaction.

bic
String(11)

Bank Identifier Code. This value must be either 8 or 11 characters long, following ISO 9362.

token
Object
conditional

Block containing token information. It will be returned when in the transaction request the tokenize field is set to true or when a token has been used. See the tokenization section for further information.

token
String(50)
required

Token identifier.

displayHint
String(19)
required

Shows the card number information masked with the following format: ************1234 (i.e. with only the last four digits visible).

error
Object

Contains the error(s) when the transaction resulted in an error.

code
Number
required

Multiple errors are possible. Not mandatory for a number of results.

message
String
required

Error code (internally raised EVENT/ERROR CODE) on detailed level.

The get credit action can be used to retrieve the status of the credit transaction. The trackingCode used in the credit action or the ID returned in the credit action should be used to identify the credit.

https://stagconnect.acehubpaymentservices.com/gateway/v3/credits/{id}?businessid={businessid}
var http = require('https')

var options = {
  'method': 'GET',
  'hostname': 'stagconnect.acehubpaymentservices.com',
  'port': null,
  'path': 'gateway/v3/credits/{id}',
  'headers': {
    'accept': 'application/json',
    'authorization': 'Basic ******'
  }
}

var req = http.request(options, function (res) {
  var chunks = []

  res.on('data', function (chunk) {
    chunks.push(chunk)
  })

  res.on('end', function () {
    var body = Buffer.concat(chunks)
    console.log(body.toString())
  })
})

req.end()
package main

import (
  "fmt"
  "net/http"
  "io/ioutil"
)

func main() {
  url := "https://stagconnect.acehubpaymentservices.com/gateway/v3/credits/{id}"

  req, _ := http.NewRequest("GET", url, nil)

  req.Header.Add("accept", "application/json")
  req.Header.Add("authorization", "Basic ******")

  res, _ := http.DefaultClient.Do(req)

  defer res.Body.Close()
  body, _ := ioutil.ReadAll(res.Body)

  fmt.Println(res)
  fmt.Println(string(body))
}
require 'uri'
require 'net/http'

url = URI("https://stagconnect.acehubpaymentservices.com/gateway/v3/credits/{id}")

http = Net::HTTP.new(url.host, url.port)

request = Net::HTTP::Get.new(url)
request["accept"] = 'application/json'
request["authorization"] = 'Basic ******'

response = http.request(request)
puts response.read_body
import http.client

conn = http.client.HTTPConnection("stagconnect.acehubpaymentservices.com")

headers = {
  'accept': "application/json",
  'authorization': "Basic ******"
}

conn.request("GET", "/gateway/v3/credits/{id}", headers=headers)

res = conn.getresponse()
data = res.read()

print(data.decode("utf-8"))
<?php

$curl = curl_init();

curl_setopt_array($curl, array(
  CURLOPT_URL => "https://stagconnect.acehubpaymentservices.com/gateway/v3/credits/{id}",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => "",
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 30,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => "GET",
  CURLOPT_HTTPHEADER => array(
    "accept: application/json",
    "authorization: Basic ******"
  ),
));

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
  echo "cURL Error #:" . $err;
} else {
  echo $response;
}
public static String executeGet(String targetURL) {
  try (CloseableHttpClient client = HttpClients.createDefault()) {
    HttpGet get = new HttpGet(targetURL);
    get.setHeader(new BasicHeader("Content-Type", "application/json"));
    
    HttpResponse response = client.execute(get);
    if (response.getStatusLine().getStatusCode() == HttpStatus.SC_OK) {
        return EntityUtils.toString(response.getEntity());
    }

    // Or whatever clever strategy to handle the error.
    throw new RuntimeException(response.getStatusLine().getReasonPhrase());
} catch (Exception ex) {
    Logger.getLogger(Main.class.getName()).log(Level.SEVERE, null, ex);
    throw new RuntimeException(ex.getMessage(), ex);
    }       
}
A binary file was returned

You couldn't be authenticated

{
  "result" : 0,
  "description" : "Ok",
  "header" : {
    "requestTimestamp" : "2017-05-19T11:21:31Z",
    "requestCode" : "D17F233B-EB18-443F-B6FF-708772CDD1C8"
  },
  "body" : {
    "card" : {
      "expiryMonth" : "05",
      "expiryYear" : "2020",
      "firstSixDigits" : "411111",
      "holderName" : "John Doe",
      "lastFourDigits" : "1111"
    },
    "transaction" : {
      "amount" : 1,
      "brandId" : 1010,
      "currencyCode" : "EUR",
      "action" : "credit",
      "id" : "41F7ED3D-7B1C-4EBA-8C06-F6B7A4C59A02",
      "trackingCode" : "B3954D09-F8C4-4684-9646-82A96B807A21"
    }
  }
}
 
 
get/credits?businessId=businessId&trackingCode=trackingCode

Query Params

businessId
string
required

The ID provided to identify your company.

trackingCode
string
required

Tracking code of the credit.

Use this call to get the status of the credit related to a specific tracking code.

Response Body Params

result
Number
required

The result of the credit. See result codes.

description
String(150)
required

A short description of the result.

header
Object
required

Header block.

requestTimestamp
Date-time
required

The combined date and time in UTC (ISO 8601).

requestCode
String(64)

An internally-generated tracking code.

body
Object
required

Body block.

transaction
Object
conditional

Transaction data.

action
String(50)
required

Actual action performed.

id
String(100)
required

Unique transaction ID given to each transaction.

amount
Amount
required

Amount of the transaction.

currencyCode
String(3)
required

Currency code of the amount of the transaction.

brandId
Number

Identified brand of the payment.

descriptor
String(127)

Descriptor determined by Gateway. The actual length of the descriptor maximally being used, is depending on the method and brand. For cards generally 38 characters can be used. Processor specific formats may apply in this case.

trackingCode
String(100)
required

Unique transaction reference.

card
Object
conditional

Card data.

firstSixDigits
String(6)

First six digits of the used credit or debit card.

lastFourDigits
String(4)

Last four digits of the used credit or debit card number.

expiryMonth
String(2)

Month of the expiry date of the card used.

expiryYear
String(4)

Year of the expiry date of the card used.

holderName
String(255)

Name on the card used.

approvalCode
String(10)

Approval code of issuer/supplier.

bank
Object

Contains the bank responses.

name
String(256)

Name of bank used in transaction.

countryCode
String(2)

ISO country code used for bank in transaction.

accountNumber
String(255)

Bank account number or IBAN used in transaction.

accountHolderName
String(256)

Name of account Holder used in transaction.

iban
String(256)

IBAN (International Bank Account Number) used in transaction.

bic
String(11)

Bank Identifier Code. This value must be either 8 or 11 characters long, following ISO 9362.

token
Object
conditional

Block containing token information. It will be returned when in the transaction request the tokenize field is set to true or when a token has been used. See the tokenization section for further information.

token
String(50)
required

Token identifier.

displayHint
String(19)
required

Shows the card number information masked with the following format: ************1234 (i.e. with only the last four digits visible).

error
Object

Contains the error(s) when the transaction resulted in an error.

code
Number
required

Multiple errors are possible. Not mandatory for a number of results.

message
String
required

Error code (internally raised EVENT/ERROR CODE) on detailed level.

The get credit action can be used to retrieve the status of the credit transaction. The trackingCode used in the credit action or the ID returned in the credit action should be used to identify the credit.

https://stagconnect.acehubpaymentservices.com/gateway/v3/credits?businessid={businessid}&trackingcode={trackingcode}
var http = require('https')

var options = {
  'method': 'GET',
  'hostname': 'stagconnect.acehubpaymentservices.com',
  'port': null,
  'path': 'gateway/v3/credits?businessid={businessid}&trackingcode={trackingcode}',
  'headers': {
    'accept': 'application/json',
    'authorization': 'Basic ******'
  }
}

var req = http.request(options, function (res) {
  var chunks = []

  res.on('data', function (chunk) {
    chunks.push(chunk)
  })

  res.on('end', function () {
    var body = Buffer.concat(chunks)
    console.log(body.toString())
  })
})

req.end()
package main

import (
  "fmt"
  "net/http"
  "io/ioutil"
)

func main() {
  url := "https://stagconnect.acehubpaymentservices.com/gateway/v3/credits?businessid={businessid}&trackingcode={trackingcode}"

  req, _ := http.NewRequest("GET", url, nil)

  req.Header.Add("accept", "application/json")
  req.Header.Add("authorization", "Basic ******")

  res, _ := http.DefaultClient.Do(req)

  defer res.Body.Close()
  body, _ := ioutil.ReadAll(res.Body)

  fmt.Println(res)
  fmt.Println(string(body))
}
require 'uri'
require 'net/http'

url = URI("https://stagconnect.acehubpaymentservices.com/gateway/v3/credits?businessid={businessid}&trackingcode={trackingcode}")

http = Net::HTTP.new(url.host, url.port)

request = Net::HTTP::Get.new(url)
request["accept"] = 'application/json'
request["authorization"] = 'Basic ******'

response = http.request(request)
puts response.read_body
import http.client

conn = http.client.HTTPConnection("stagconnect.acehubpaymentservices.com")

headers = {
  'accept': "application/json",
  'authorization': "Basic ******"
}

conn.request("GET", "/gateway/v3/credits?businessid={businessid}&trackingcode={trackingcode}", headers=headers)

res = conn.getresponse()
data = res.read()

print(data.decode("utf-8"))
<?php

$curl = curl_init();

curl_setopt_array($curl, array(
  CURLOPT_URL => "https://stagconnect.acehubpaymentservices.com/gateway/v3/credits?businessid={businessid}&trackingcode={trackingcode}",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => "",
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 30,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => "GET",
  CURLOPT_HTTPHEADER => array(
    "accept: application/json",
    "authorization: Basic ******"
  ),
));

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
  echo "cURL Error #:" . $err;
} else {
  echo $response;
}
public static String executeGet(String targetURL) {
  try (CloseableHttpClient client = HttpClients.createDefault()) {
    HttpGet get = new HttpGet(targetURL);
    get.setHeader(new BasicHeader("Content-Type", "application/json"));
    
    HttpResponse response = client.execute(get);
    if (response.getStatusLine().getStatusCode() == HttpStatus.SC_OK) {
        return EntityUtils.toString(response.getEntity());
    }

    // Or whatever clever strategy to handle the error.
    throw new RuntimeException(response.getStatusLine().getReasonPhrase());
} catch (Exception ex) {
    Logger.getLogger(Main.class.getName()).log(Level.SEVERE, null, ex);
    throw new RuntimeException(ex.getMessage(), ex);
    }       
}
A binary file was returned

You couldn't be authenticated

{
  "result" : 0,
  "description" : "Ok",
  "header" : {
    "requestTimestamp" : "2017-05-19T11:21:31Z",
    "requestCode" : "D17F233B-EB18-443F-B6FF-708772CDD1C8"
  },
  "body" : {
    "card" : {
      "expiryMonth" : "05",
      "expiryYear" : "2020",
      "firstSixDigits" : "411111",
      "holderName" : "John Doe",
      "lastFourDigits" : "1111"
    },
    "transaction" : {
      "amount" : 1,
      "brandId" : 1010,
      "currencyCode" : "EUR",
      "action" : "credit",
      "id" : "41F7ED3D-7B1C-4EBA-8C06-F6B7A4C59A02",
      "trackingCode" : "B3954D09-F8C4-4684-9646-82A96B807A21"
    }
  }
}
 
Suggest Edits

Result codes

 

Result codes

The Credits API uses the “result” field in the response body as the primary and most important indication of success or failure. The “result” field should be used as the basis for further processing rather than evaluating any other field first.

In addition, as REST defines, conventional HTTP status codes are used. The next table shows the “result”, the relevant HTTP status codes used and whether or not the failed transaction can be retried.

There are situations when the response doesn't contain a body, as you can see in the table below:

HTTP Status code
Result
Description
Explanation
200
4
Timeout
The payment timeout expired before the customer completed the payment.
200
3
Pending merchant
The transaction is pending and waiting for an action to be performed by the merchant.
200
2
Pending
Pending transaction, the payment was initiated and waiting for the customer to complete the payment at the bank or payment processor.
200
1
Waiting
The transaction was initiated successfully, but a payment was not yet made by the customer or not yet confirmed by the bank. Occurs for brands for which customers have to make a payment separately (like Boletos) or where the bank does not immediately confirm a payment (like SEPA).
200
0
Ok
The transaction was processed successfully.
400, 404
-1
Input error
Error in the input parameters.
400
-2
Failed
The transaction failed because of a processing error at Payvision.
400
-3
Failed, retry
The transaction failed but can be retried.
400
-4
Declined
Declines, etc. In these cases the processing was performed correctly but the end-result for the customer is not.
400
-5
Declined, retry
The transaction is declined, but can be retried.
401
-6
Security error
Error in authentication data. Generally, no further details are available for security reasons.
500,501
-7
Internal server error
Unexpected server error.
400
-8
Business rule error
Error due to a business rule or a configuration error.
400
-9
Fraud
Errors that suggest fraudulent behavior.
400
-10
Customer processing error
Error or cancellation of customer at supplier. For example, the customer abandoned their transaction at the supplier.
400
-11
Referrals
Errors due to a referral by the supplier.
400
-12
Status unavailable
The transaction was initiated successfully, but the bank or payment processor could not confirm the result.
 
 
post/tokens

Create token action can also be used as a standalone action (not through a payment) to store the card information in the system and return the token identifier representing it.

Request Body Params

header
object
required

Header section of the transaction.

businessId
string(50)
required

The ID provided to identify your company.

body
object
required

Body section of the transaction.

brandId
number
conditional

Identifies the desired payment brand. See brand list.

card
object
required

Card section of the body.

holderName
string(255)

Name of the card holder as printed on the card.

number
card number
required

Credit card number (PAN). See Data Types.

expiryMonth
number(2)
required

Month part of expiry date. Format MM.

expiryYear
number(4)
required

Year part of expiry date. Format: YYYY.

issueNumber
string(2)

Issue number, used for some Maestro and Solo cards.

customer
object

Customer section of the body.

customerId
string(255)

ID used to identify the customer.

email
String(255)

Email address of the customer.

Response Body Params

result
number
required

The result of the operation. See result codes.

header
object
required

Header block.

requestTimestamp
date-time
required

The combined date and time in UTC (ISO8601).

body
object
required

Body block.

token
string(50)
required

Token identifier inside the system that will be associated with the card information.

tokenStatus
String
required

Defines the status of the token. Possible values:
INACTIVE - Inactive, the token has been created but is not yet ready to be used.
ACTIVE - Active, the token is active and can be used to process.
SUSPENDED - Suspended, the token has been suspended so it can not be used.
DELETED - Deleted, the token has been deleted.

tokenType
String
required

Defines the type of the token. Possible values:
PAYVISION - Token is created using Payvision's internal tokenization service.

displayHint
string(19)
required

Shows the card number information masked with the following format: ************1234 (i.e. with only the last four digits visible).

https://stagconnect.acehubpaymentservices.com/gateway/v3/tokens

{
  "header" : {
    "businessId" : "{businessId}"
  },
  "body" : {  
    "brandId" : 1010,
    "card" : {  
      "holderName" : "John Doe",
      "number" : "4111111111111111",
      "expiryMonth" : 05,
      "expiryYear" : 2020,
      "issueNumber" : 10
    },
    "customer" : {  
      "customerId" : 123,
      "email" : "customer@email.com"
    }
  }
}
A binary file was returned

You couldn't be authenticated

{
  "result" : 0,
  "header" : {
    "requestTimestamp" : "2017-06-19T10:25:23Z"
  },
  "body" : {
    "token" : "BD689136-F641-49A0-A154-8BDD3302C978",
    "tokenStatus": "ACTIVE",
    "tokenType": "PAYVISION",
    "displayHint" : "************1111"
  }
}
{
  "result": -1,
  "description": "Bad Request",
  "header": {
    "requestTimestamp": "2017-06-19T10:25:23Z"
  },
  "body": {
    "error": {
      "code": -100003,
      "message": "The field ExpiryMonth must be between 1 and 12."
    }
  }
}
 
Suggest Edits

/tokens/:id

 
get/tokens/id?businessId=businessId

Path Params

id
string
required

Unique token ID.

Query Params

businessId
string
required

The ID provided to identify your company.

Retrieves the related information associated to the specified token and the specified businessId.

Response Body Params

businessId
string(50)
required

The ID provided to identify your company.

brandId
number
conditional

Identified brand. Will be displayed if it was provided during the token creation.

token
string(50)
required

Token identifier inside the system associated with the card information.

tokenStatus
String
required

Defines the status of the token. Possible values:
INACTIVE - Inactive, the token has been created but is not yet ready to be used.
ACTIVE - Active, the token is active and can be used to process.
SUSPENDED - Suspended, the token has been suspended so it can not be used.
DELETED - Deleted, the token has been deleted.

tokenType
String
required

Defines the type of the token. Possible values:
PAYVISION - Token is created using Payvision's internal tokenization service.

holderName
string(255)

Name of the card holder as printed on the card.

number
string(19)
required

The card number masked.

expiryMonth
number(2)
required

Month part of expiry date. Format MM.

expiryYear
number(4)
required

Year part of expiry date. Format: YYYY.

issueNumber
string(2)

Issue number, used for some Maestro and Solo cards.

customerId
string(255)

ID used to identify the customer.

email
string(255)

Email address of the customer.

https://stagconnect.acehubpaymentservices.com/gateway/v3/tokens/{id}?businessId={businessId}
A binary file was returned

You couldn't be authenticated

{
  "header" : {
    "businessId" : "{businessId}"
  },
  "body" : {
    "brandId" : "1010",
    "token" : "6590bc6c-7101-4970-af1f-a793d2525f55",
    "tokenStatus": "ACTIVE",
    "tokenType": "PAYVISION",
    "card" : {
      "number" : "************1111",
      "expiryMonth" : 12,
      "expiryYear" : 2020
    },
    "customer" : {
      "customerId" : "123",
      "email" : "test@email.com"
    }
  }
}
 
 
get/tokens?businessId=businessId&customerId=customerId

Query Params

businessId
string
required

The ID provided to identify your company.

customerId
string
required

The customer id which we want the tokens from.

Retrieves the related tokens’ information associated to the specified customerId and the specified businessId.
This method returns an array of body blocks, one for each token associated to the customerId.

Response Body Params

businessId
string(50)
required

The ID provided to identify your company.

brandId
number
conditional

Identified brand. Will be displayed if it was provided during the token creation.

token
string(50)
required

Token identifier inside the system associated with the card information.

tokenStatus
String
required

Defines the status of the token. Possible values:
INACTIVE - Inactive, the token has been created but is not yet ready to be used.
ACTIVE - Active, the token is active and can be used to process.
SUSPENDED - Suspended, the token has been suspended so it can not be used.
DELETED - Deleted, the token has been deleted.

tokenType
String
required

Defines the type of the token. Possible values:
PAYVISION - Token is created using Payvision's internal tokenization service.

holderName
string(255)

Name of the card holder as printed on the card.

number
string(19)
required

The card number masked.

expiryMonth
number(2)
required

Month part of expiry date. Format MM.

expiryYear
number(4)
required

Year part of expiry date. Format: YYYY.

issueNumber
string(2)

Issue number, used for some Maestro and Solo cards.

customerId
string(255)

ID used to identify the customer.

email
string(255)

Email address of the customer.

https://stagconnect.acehubpaymentservices.com/gateway/v3/tokens?businessId={businessId}&customerId={customerId}
A binary file was returned

You couldn't be authenticated

{
  "header" : {
    "businessId" : "{businessId}"
  },
  "body": [
    {
      "brandId" : "1010",
      "token" : "6590bc6c-7101-4970-af1f-a793d2525f55",
      "tokenStatus": "ACTIVE",
      "tokenType": "PAYVISION",
      "card" : {
        "number" : "************1111",
        "expiryMonth" : 5,
        "expiryYear" : 2020
      },
      "customer" : {
        "customerId" : "1234",
        "email" : "test@email.com"
      }
    },
    {
      "brandId" : "1010",
      "token" : "bffddb0f-c75e-478d-b65d-aff8532299f7",
      "tokenStatus": "ACTIVE",
      "tokenType": "PAYVISION",
      "card" : {
        "number" : "************1111",
        "expiryMonth" : 11,
        "expiryYear" : 2021
      },
      "customer" : {
        "customerId" : "1234",
        "email" : "test@email.com"
      }
    }
  ]
}
 
Suggest Edits

Result codes

 

Result codes

HTTP Status Code
Result
Description
Explanation
200
0
Ok
The operation completed successfully.
400
-1
Input Error
Error in the input parameters.
401, 403
Security Error
Error in authentication data.
500
-7
Internal Server Error
Unexpected error on the server side.
501
-7
Unexpected Error
Unexpected error.
 

Webhook events

Message structure

When a transaction status changes, the related information will be notified to the merchant using an HTTP POST request with the following structure:

Webhook event params

Id
GUID
required

Event unique ID.

Type
string(201)
required

Type of the event in the format: [EventType].[EventSubType]. Possible values:

Transaction.Create
Transaction.Update
CreateTime
DateTime
required

UTC date time (ISO-8601) when the event was registered on the webhooks system.

Message
string(100)

Summary message with a description of the event.

Payload
Object
required

Event content sent to the merchant. This value is the same as that returned by the following APIs:

Message signature

A signature will be present as an HTTP header called Event-Signature in a JWS-like format. It will contain the transmission ID, a transmission timestamp, the webhook emitter ID and a checksum of the HTTP content (the full event as described above):

JWS

header
Object

Header block.

Alg
string

Signing algorithm, possible values:

HS256
RS256

At the moment, only HS256 will be used with the symmetric key generated when a webhook is created.

Payload
Object

JWS Payload.

transmissionId
Guid

The transmission identifier generated on every transmission attempt.

timestamp
UTC

UTC date time generated on every transmission attempt (ISO-8601).

hookId
Guid

The identifier of the webhook the message is sent to.

crc32
string

Checksum of the HTTP message content.

The value of the crc32 field can be used by merchants to verify the integrity of the message received as described below.

Steps to calculate CRC32

  1. Convert the JSON message string into a byte array with UTF8 encoding.
  2. Compute CRC32 over the byte array. The result is an unsigned integer.
  3. Convert the resulting unsigned int to a byte array.
  4. Encode the byte array to a Base64 string.
  5. Replace the characters ‘+’, ‘/’ and ’=’ in the Bases64 string with ‘-‘,’_’ and empty respectively. The resulting string is the crc32.

This should match with the value of the crc32 field in the Event-Signature header.

Example

Input JSON data message (UTF8)
{"Id":"3de19f0c-a3e9-4e72-b822-3371a847c04e","Type":"Health","CreateTime":"2019-07-24T13:55:10.188347Z","Message":"Test message","Payload":null}

Step 1 result
Byte array with 144 bytes (hexadecimal view)

7b 22 49 64 22 3a 22 33 64 65 31 39 66 30 63 2d 61 33 65 39 2d 34 65 37 32 2d 62 38 32 32 2d 33 33 37 31 61 38 34 37 63 30 34 65 22 2c 22 54 79 70 65 22 3a 22 48 65 61 6c 74 68 22 2c 22 43 72 65 61 74 65 54 69 6d 65 22 3a 22 32 30 31 39 2d 30 37 2d 32 34 54 31 33 3a 35 35 3a 31 30 2e 31 38 38 33 34 37 5a 22 2c 22 4d 65 73 73 61 67 65 22 3a 22 54 65 73 74 20 6d 65 73 73 61 67 65 22 2c 22 50 61 79 6c 6f 61 64 22 3a 6e 75 6c 6c 7d

Step 2 result
CRC32 value (hex): 0x4661c67d

Step 3 result
[7d, c6, 61, 46]

Step 4 result

fcZhRg==

Step 5 result
fcZhRg

This is the crc32 value.

{
	"Id": "7aabaa70-9878-51da-0654-553b27a6c578",
	"Type": "Transaction.Create",
	"CreateTime": "2017-11-03T16:18:05Z",
	"Message": "event information",
	"Payload": {
		"result": 2,
		"description": "Pending",
		"header": {
			"requestTimestamp": "2018-03-14T15:39:47Z",
			"requestCode": "105.18ab0468-19a2-4d74-a71b-b0c37ee9bbac"
		},
		"body": {
			"redirect": {
				"url": "https://test.ppipe.net/connectors/demo/simulator.link?REMOTEADDRESS=10.2.20.201&ndcid=8a829417572279ad015732d66cb427b6_f612b3e91fee441e98f78e510758372d",
				"fields": {
					"MD": "8a829449620619e80162252adeb66a39",
					"TermUrl": "https://test.ppipe.net/connectors/asyncresponse_simulator;jsessionid=9E75DCD94291F0D3EA3C871ED322B0E8.sbg-vm-con01?asyncsource=THREEDSECURE&ndcid=8a829417572279ad015732d66cb427b6_f612b3e91fee441e98f78e510758372d",
					"connector": "THREEDSECURE",
					"PaReq": "IT8ubu+5z4YupUCOEHKsbiPep8UzIAcPKJEjpwGlzD8#KioqKioqKioqKioqKjAwMTEjMS4wMCBFVVIj"
				}
			},
			"card": {
				"expiryMonth": "1",
				"expiryYear": "2033",
				"firstSixDigits": "670399",
				"holderName": "John Smith",
				"lastFourDigits": "0011"
			},
			"transaction": {
				"amount": 1,
				"brandId": 3200,
				"currencyCode": "EUR",
				"action": "authorize",
				"id": "7d799279-1888-41de-9663-154b67964557",
				"trackingCode": "19720c7f-98bd-453b-959b-250868f4a284"
			}
		}
	}
}
Suggest Edits

Result codes

 

Result codes

The webhooks API will only send information about transactions with the following result codes:

Result
Description
Explanation
4
Timeout
The payment timeout expired before the customer completed the payment.
3
Pending merchant
The transaction is pending and waiting for an action to be performed by the merchant.
2
Pending
Pending transaction, the payment was initiated and waiting for the customer to complete the payment at the bank or payment processor.
1
Waiting
The transaction was initiated successfully, but a payment was not yet made by the customer or not yet confirmed by the bank. Occurs for brands for which customers have to make a payment separately (like Boletos) or where the bank does not immediately confirm a payment (like SEPA).
0
Ok
The transaction was processed successfully.
-2
Failed
The transaction failed because of a processing error at Payvision.
-3
Failed, retry
The transaction failed but can be retried.
-4
Declined
Declines, etc. In these cases the processing was performed correctly, but the end-result for the customer is not.
-5
Declined, retry
The transaction is declined, but can be retried.
-6
Security error
Error in authentication data. Generally, no further details are available for security reasons.
-7
Internal server error
Unexpected server error.
-8
Business rule error
Error due to a business rule or a configuration error.
-9
Fraud
Errors that suggest fraudulent behavior.
-10
Customer processing error
Error or cancellation of customer at supplier. For example, the customer abandoned their transaction at the supplier.
-11
Referrals
Errors due to a referral by the supplier.
-12
Status unavailable
The transaction was initiated successfully, but the bank or payment processor could not confirm the result.
 
Suggest Edits

/recipients

 
post/recipients

A recipient is a party that offers products or services on a merchant’s platform and will receive funds for this. These can, for example, be sellers on your marketplace or service providers such as insurance companies or logistic partners.

Status for new recipients is "Live" so that you can instantly slice to this recipient and the recipient can build up a balance. After onboarding a recipient using this POST action, you can assign a bank account to this recipient.

Request Body Params

header
Object
required

Header block.

businessId
String(50)
required

The ID provided to identify your company.

body
Object
required

Body block.

recipientCode
String(20)
required

Your unique recipient reference.

name
String(60)
required

The name of the recipient.

city
String(60)
required

The city of the recipient.

countryCode
String(2)
required

The country of the recipient (ISO 3166-1 Alpha 2).

Response Body Params

result
Number
required

The result of the operation. See result codes.

description
String(150)
required

A short description of the result.

header
Object
required

Header block.

requestTimestamp
Date-time
required

The combined date and time in UTC (ISO8601).

body
Object
required

Body block.

recipientId
String(100)
required

The recipient unique identifier.

recipientCode
String(20)
required

Your unique recipient reference.

name
String(60)
required

The name of the recipient.

city
String(60)
required

The city of the recipient.

countryCode
String(2)
required

The country of the recipient (ISO 3166-1 Alpha 2).

status
String
required

The satus of the recipient. Possible values:
Live - (Default). The recipient can receive Slices.
Disabled - Not allowed to receive Slices.

created
date-time
required

When the recipient was created. The combined date and time in UTC (ISO8601).

https://stagslicepay.acehubpaymentservices.com/gateway/v1/recipients

{
  "header" : {
    "businessId" : "{businessId}"
  },
  "body" : {
    "recipientCode": "CGZNUFPGEEPQBAZXHFRR",
    "name": "ShoeShop Inc.",
    "city": "Madrid",
    "countryCode": "ES"
  }
}
var http = require('https')

var options = {
  'method': 'POST',
  'hostname': 'stagslicepay.acehubpaymentservices.com',
  'port': null,
  'path': 'gateway/v1/recipients',
  'headers': {
    'accept': 'application/json',
    'content-type': 'application/json',
    'authorization': 'Basic ******'
  }
}

var req = http.request(options, function (res) {
  var chunks = []

  res.on('data', function (chunk) {
    chunks.push(chunk)
  })

  res.on('end', function () {
    var body = Buffer.concat(chunks)
    console.log(body.toString())
  })
})

req.end()
package main

import (
  "fmt"
  "net/http"
  "io/ioutil"
)

func main() {
  url := "https://stagslicepay.acehubpaymentservices.com/gateway/v1/recipients"

  req, _ := http.NewRequest("POST", url, nil)

  req.Header.Add("accept", "application/json")
  req.Header.Add("content-type", "application/json")
  req.Header.Add("authorization", "Basic ******")

  res, _ := http.DefaultClient.Do(req)

  defer res.Body.Close()
  body, _ := ioutil.ReadAll(res.Body)

  fmt.Println(res)
  fmt.Println(string(body))
}
require 'uri'
require 'net/http'

url = URI("https://stagslicepay.acehubpaymentservices.com/gateway/v1/recipients")

http = Net::HTTP.new(url.host, url.port)

request = Net::HTTP::Post.new(url)
request["accept"] = 'application/json'
request["content-type"] = 'application/json'
request["authorization"] = 'Basic ******'

response = http.request(request)
puts response.read_body
import http.client

conn = http.client.HTTPSConnection("stagslicepay.acehubpaymentservices.com")

payload = "" # Fill with request body

headers = {
  'accept': "application/json",
  'content-type': "application/json",
  'authorization': "Basic ******"
}

conn.request("POST", "gateway/v1/recipients", payload, headers)

res = conn.getresponse()
data = res.read()

print(data.decode("utf-8"))
<?php

$curl = curl_init();

curl_setopt_array($curl, array(
  CURLOPT_URL => "https://stagslicepay.acehubpaymentservices.com/gateway/v1/recipients",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => "",
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 30,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => "POST",
  CURLOPT_POSTFIELDS => "",
  CURLOPT_HTTPHEADER => array(
    "accept: application/json",
    "authorization: Basic ******",
    "content-type: application/json"
  ),
));

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
  echo "cURL Error #:" . $err;
} else {
  echo $response;
}
public static String excutePost(String targetURL, String urlParameters) 
{
  try (CloseableHttpClient client = HttpClients.createDefault()) {
    int contentLength = urlParameters.getBytes().length;

    HttpPost post = new HttpPost(targetURL);
    post.setHeader(new BasicHeader("Content-Type", "application/json"));

    post.setEntity(new StringEntity(urlParameters));

    HttpResponse response = client.execute(post);

    if (response.getStatusLine().getStatusCode() == HttpStatus.SC_OK) {
      return EntityUtils.toString(response.getEntity());
    }

    // Or whatever clever strategy to handle the error.
    throw new RuntimeException(response.getStatusLine().getReasonPhrase());
  } catch (Exception ex) {
    Logger.getLogger(Main.class.getName()).log(Level.SEVERE, null, ex);
    throw new RuntimeException(ex.getMessage(), ex);
  }
}
A binary file was returned

You couldn't be authenticated

{
  "result": 0,
  "description": "Ok",
  "header": {
    "requestTimestamp": "2018-01-02T10:34:23Z"
  },
  "body": {
    "recipientId": "803070DD-D00E-497C-9CC9-1F900AD20469",    
    "recipientCode": "CGZNUFPGEEPQBAZXHFRR",
    "name": "ShoeShop Inc.",
    "city": "Madrid",
    "countryCode": "ES",
    "status": "Live",
    "created": "2018-01-02T10:34:23Z"
  }
}
 
Suggest Edits

/recipients

 
get/recipients?businessId=businessId

Query Params

businessId
string
required

The ID of the party connecting.

dateFrom
date

Filter the list of recipients based on the created field. The list will contains only recipients which created field is after or equal to this value.

dateTo
date

Filter the list of recipients based on the created field. The list will contains only recipients which created field is before or equal to this value.

page
int32

Page number. Default 1.

pageSize
int32

Page size. Default 10. Maximum number 100.

The GET action can be used to list all recipients.

Response Body Params

result
Number
required

The result of the operation. See result codes.

description
String(150)
required

A short description of the result.

header
Object
required

Header block.

requestTimestamp
Date-time
required

The combined date and time in UTC (ISO 8601).

body
Object
required

Body block.

page
number
required

The page number.

pageSize
number
required

The size of the page.

total
number
required

The total count of elements that match request parameters.

recipients
Array
required

Array of recipients

https://stagslicepay.acehubpaymentservices.com/gateway/v1/recipients?businessId={businessId}
A binary file was returned

You couldn't be authenticated

{
  "result" : 0,
  "description" : "Ok",
  "header" : {
    "requestTimestamp" : "2018-01-16T09:21:49Z",
  },
  "body" : {
    "page" : 1,
    "pageSize": 10,
    "total" : 2,
    "recipients" : [
      {
        "recipientId": "803070DD-D00E-497C-9CC9-1F900AD20469",
        "recipientCode": "CGZNUFPGEEPQBAZXHFRR",
        "name": "ShoeShop Inc.",
        "city": "Madrid",
        "countryCode": "ES",
        "status": "Live",
        "created": "2018-01-02T10:34:23Z"
      },
      {
        "recipientId": "3BEBAE05-6D9D-4E96-A50A-8D4B57A0ABE9",
        "recipientCode": "BUCXLXTVVBATOIXTJEFV",
        "name": "London Shoes",
        "city": "London",
        "countryCode": "GB",
        "status": "Live",
        "created": "2018-01-04T07:32:21Z"
      }
    ]
  }
}
 
Suggest Edits

/recipients/:id

 
post/recipients/recipientId

The information of the recipient can be modified.

The properties are optional, meaning that they will only overwrite the value if they are specified. For example, to update the city you do not need to specify the name or countryCode.

It is not possible to change the recipientCode.

Request Body Params

header
Object
required

Header block.

businessId
String(50)
required

The ID provided to identify your company.

body
Object
required

Body block.

name
String(60)
conditional

The name of the recipient. If present, it cannot be empty.

city
String(60)
conditional

The city of the recipient. If present, it cannot be empty.

countryCode
String(2)
conditional

The country of the recipient (ISO 3166-1 Alpha 2). If present, it cannot be empty.

Response Body Params

result
Number
required

The result of the operation. See result codes.

description
String(150)
required

A short description of the result.

header
Object
required

Header block.

requestTimestamp
Date-time
required

The combined date and time in UTC (ISO8601).

body
Object
required

Body block.

recipientId
String(100)
required

The recipient unique identifier.

recipientCode
String(20)
required

Your unique recipient reference.

name
String(60)
required

The name of the recipient.

city
String(60)
required

The city of the recipient.

countryCode
String(2)
required

The country of the recipient (ISO 3166-1 Alpha 2).

status
String
required

The satus of the recipient. Possible values:
Live - (Default). The recipient can receive Slices.
Disabled - Not allowed to receive Slices.

created
date-time
required

When the recipient was created. The combined date and time in UTC (ISO8601).

https://stagslicepay.acehubpaymentservices.com/gateway/v1/recipients

{
  "header" : {
    "businessId" : "{businessId}"
  },
  "body" : {
    "name": "ShoeShop Inc.",
    "city": "Madrid",
    "countryCode": "ES"
  }
}
var http = require('https')

var options = {
  'method': 'POST',
  'hostname': 'stagslicepay.acehubpaymentservices.com',
  'port': null,
  'path': 'gateway/v1/recipients',
  'headers': {
    'accept': 'application/json',
    'content-type': 'application/json',
    'authorization': 'Basic ******'
  }
}

var req = http.request(options, function (res) {
  var chunks = []

  res.on('data', function (chunk) {
    chunks.push(chunk)
  })

  res.on('end', function () {
    var body = Buffer.concat(chunks)
    console.log(body.toString())
  })
})

req.end()
package main

import (
  "fmt"
  "net/http"
  "io/ioutil"
)

func main() {
  url := "https://stagslicepay.acehubpaymentservices.com/gateway/v1/recipients"

  req, _ := http.NewRequest("POST", url, nil)

  req.Header.Add("accept", "application/json")
  req.Header.Add("content-type", "application/json")
  req.Header.Add("authorization", "Basic ******")

  res, _ := http.DefaultClient.Do(req)

  defer res.Body.Close()
  body, _ := ioutil.ReadAll(res.Body)

  fmt.Println(res)
  fmt.Println(string(body))
}
require 'uri'
require 'net/http'

url = URI("https://stagslicepay.acehubpaymentservices.com/gateway/v1/recipients")

http = Net::HTTP.new(url.host, url.port)

request = Net::HTTP::Post.new(url)
request["accept"] = 'application/json'
request["content-type"] = 'application/json'
request["authorization"] = 'Basic ******'

response = http.request(request)
puts response.read_body
import http.client

conn = http.client.HTTPSConnection("stagslicepay.acehubpaymentservices.com")

payload = "" # Fill with request body

headers = {
  'accept': "application/json",
  'content-type': "application/json",
  'authorization': "Basic ******"
}

conn.request("POST", "gateway/v1/recipients", payload, headers)

res = conn.getresponse()
data = res.read()

print(data.decode("utf-8"))
<?php

$curl = curl_init();

curl_setopt_array($curl, array(
  CURLOPT_URL => "https://stagslicepay.acehubpaymentservices.com/gateway/v1/recipients",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => "",
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 30,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => "POST",
  CURLOPT_POSTFIELDS => "",
  CURLOPT_HTTPHEADER => array(
    "accept: application/json",
    "authorization: Basic ******",
    "content-type: application/json"
  ),
));

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
  echo "cURL Error #:" . $err;
} else {
  echo $response;
}
public static String excutePost(String targetURL, String urlParameters) 
{
  try (CloseableHttpClient client = HttpClients.createDefault()) {
    int contentLength = urlParameters.getBytes().length;

    HttpPost post = new HttpPost(targetURL);
    post.setHeader(new BasicHeader("Content-Type", "application/json"));

    post.setEntity(new StringEntity(urlParameters));

    HttpResponse response = client.execute(post);

    if (response.getStatusLine().getStatusCode() == HttpStatus.SC_OK) {
      return EntityUtils.toString(response.getEntity());
    }

    // Or whatever clever strategy to handle the error.
    throw new RuntimeException(response.getStatusLine().getReasonPhrase());
  } catch (Exception ex) {
    Logger.getLogger(Main.class.getName()).log(Level.SEVERE, null, ex);
    throw new RuntimeException(ex.getMessage(), ex);
  }
}
A binary file was returned

You couldn't be authenticated

{
  "result": 0,
  "description": "Ok",
  "header": {
    "requestTimestamp": "2018-01-02T10:34:23Z"
  },
  "body": {
    "recipientId": "803070DD-D00E-497C-9CC9-1F900AD20469",    
    "recipientCode": "CGZNUFPGEEPQBAZXHFRR",
    "name": "ShoeShop Inc.",
    "city": "Madrid",
    "countryCode": "ES",
    "status": "Live",
    "created": "2018-01-02T10:34:23Z"
  }
}
 
Suggest Edits

/recipients/:id

 
get/recipients/recipientId?businessId=businessId

Path Params

recipientId
string
required

The unique recipient identifier.

Query Params

businessId
string
required

The ID of the party connecting.

The GET recipient action can be used to retrieve information about a recipient.

Response Body Params

result
Number
required

The result of the operation. See result codes.

description
String(150)
required

A short description of the result.

header
Object
required

Header block.

requestTimestamp
Date-time
required

The combined date and time in UTC (ISO8601).

body
Object
required

Body block.

recipientId
String(100)
required

The recipient unique identifier.

recipientCode
String(20)
required

Your unique recipient reference.

name
String(60)
required

The name of the recipient.

city
String(60)
required

The city of the recipient.

countryCode
String(2)
required

The country of the recipient (ISO 3166-1 Alpha 2).

status
String
required

The satus of the recipient. Possible values:
Live - (Default). The recipient can receive Slices.
Disabled - Not allowed to receive Slices.

created
date-time
required

When the recipient was created. The combined date and time in UTC (ISO8601).

https://stagslicepay.acehubpaymentservices.com/gateway/v1/recipients/{recipientId}?businessId={businessId}
A binary file was returned

You couldn't be authenticated

{
  "result" : 0,
  "description" : "Ok",
  "header" : {
    "requestTimestamp" : "2018-01-15T11:26:51Z",
  },
  "body" : {
    "recipientId": "803070DD-D00E-497C-9CC9-1F900AD20469",
    "recipientCode": "CGZNUFPGEEPQBAZXHFRR",
    "name": "ShoeShop Inc.",
    "city": "Madrid",
    "countryCode": "ES",
    "status": "Live",
    "created": "2018-01-02T10:34:23Z"
  }
}
 
Suggest Edits

/recipients/:id/disable

 
post/recipients/recipientId/disable

Path Params

recipientId
string
required

The unique recipient identifier.

This action disables a recipient. Once a recipient is disabled all its bank accounts will be set to blocked. This action is not reversible.
If the recipient has positive balance for anyone of its currencies the action will fail.

Request Body Params

header
Object
required

Header block.

businessId
String(50)
required

The ID provided to identify your company.

Response Body Params

result
Number
required

The result of the operation. See result codes.

description
String(150)
required

A short description of the result.

header
Object
required

Header block.

requestTimestamp
Date-time
required

The combined date and time in UTC (ISO8601).

body
Object
required

Body block.

recipientId
String(100)
required

The recipient unique identifier.

recipientCode
String(20)
required

Your unique recipient reference.

name
String(60)
required

The name of the recipient.

city
String(60)
required

The city of the recipient.

countryCode
String(2)
required

The country of the recipient (ISO 3166-1 Alpha 2).

status
String
required

The satus of the recipient. Possible values:
Live - (Default). The recipient can receive Slices.
Disabled - Not allowed to receive Slices.

created
date-time
required

When the recipient was created. The combined date and time in UTC (ISO8601).

https://stagslicepay.acehubpaymentservices.com/gateway/v1/recipients/{recipientId}/disable

{
  "header" : {
    "businessId" : "{businessId}"
  }
}
var http = require('https')

var options = {
  'method': 'POST',
  'hostname': 'stagslicepay.acehubpaymentservices.com',
  'port': null,
  'path': 'gateway/v1/recipients/{recipientId}/disable',
  'headers': {
    'accept': 'application/json',
    'content-type': 'application/json',
    'authorization': 'Basic ******'
  }
}

var req = http.request(options, function (res) {
  var chunks = []

  res.on('data', function (chunk) {
    chunks.push(chunk)
  })

  res.on('end', function () {
    var body = Buffer.concat(chunks)
    console.log(body.toString())
  })
})

req.end()
package main

import (
  "fmt"
  "net/http"
  "io/ioutil"
)

func main() {
  url := "https://stagslicepay.acehubpaymentservices.com/gateway/v1/recipients/{recipientId}/disable"

  req, _ := http.NewRequest("POST", url, nil)

  req.Header.Add("accept", "application/json")
  req.Header.Add("content-type", "application/json")
  req.Header.Add("authorization", "Basic ******")

  res, _ := http.DefaultClient.Do(req)

  defer res.Body.Close()
  body, _ := ioutil.ReadAll(res.Body)

  fmt.Println(res)
  fmt.Println(string(body))
}
require 'uri'
require 'net/http'

url = URI("https://stagslicepay.acehubpaymentservices.com/gateway/v1/recipients/{recipientId}/disable")

http = Net::HTTP.new(url.host, url.port)

request = Net::HTTP::Post.new(url)
request["accept"] = 'application/json'
request["content-type"] = 'application/json'
request["authorization"] = 'Basic ******'

response = http.request(request)
puts response.read_body
import http.client

conn = http.client.HTTPSConnection("stagslicepay.acehubpaymentservices.com")

payload = "" # Fill with request body

headers = {
  'accept': "application/json",
  'content-type': "application/json",
  'authorization': "Basic ******"
}

conn.request("POST", "gateway/v1/recipients/{recipientId}/disable", payload, headers)

res = conn.getresponse()
data = res.read()

print(data.decode("utf-8"))
<?php

$curl = curl_init();

curl_setopt_array($curl, array(
  CURLOPT_URL => "https://stagslicepay.acehubpaymentservices.com/gateway/v1/recipients/{recipientId}/disable",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => "",
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 30,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => "POST",
  CURLOPT_POSTFIELDS => "",
  CURLOPT_HTTPHEADER => array(
    "accept: application/json",
    "authorization: Basic ******",
    "content-type: application/json"
  ),
));

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
  echo "cURL Error #:" . $err;
} else {
  echo $response;
}
public static String excutePost(String targetURL, String urlParameters) 
{
  try (CloseableHttpClient client = HttpClients.createDefault()) {
    int contentLength = urlParameters.getBytes().length;

    HttpPost post = new HttpPost(targetURL);
    post.setHeader(new BasicHeader("Content-Type", "application/json"));

    post.setEntity(new StringEntity(urlParameters));

    HttpResponse response = client.execute(post);

    if (response.getStatusLine().getStatusCode() == HttpStatus.SC_OK) {
      return EntityUtils.toString(response.getEntity());
    }

    // Or whatever clever strategy to handle the error.
    throw new RuntimeException(response.getStatusLine().getReasonPhrase());
  } catch (Exception ex) {
    Logger.getLogger(Main.class.getName()).log(Level.SEVERE, null, ex);
    throw new RuntimeException(ex.getMessage(), ex);
  }
}
A binary file was returned

You couldn't be authenticated

{
  "result": 0,
  "description": "Ok",
  "header": {
    "requestTimestamp": "2018-01-02T10:34:23Z"
  },
  "body": {
    "recipientId": "803070DD-D00E-497C-9CC9-1F900AD20469",    
    "recipientCode": "CGZNUFPGEEPQBAZXHFRR",
    "name": "ShoeShop Inc.",
    "city": "Madrid",
    "countryCode": "ES",
    "status": "Disabled",
    "created": "2018-01-02T10:34:23Z"
  }
}
 
Suggest Edits

/recipients/:id/accounts

 
post/recipients/recipientId/accounts

Path Params

recipientId
string
required

The unique recipient identifier.

Bank accounts are the transfer destination on a recipient for payouts. The bank account is created with status pending and, after the KYC process, it is validated or blocked. Because a bank account should undergo this process, it is not possible to update it.

Request Body Params

header
object
required

Header block.

businessId
string(50)
required

The ID provided to identify your company.

body
object
required

Body block.

accountCode
String(20)
required

Your unique account reference.

currencyCode
String(3)
required

The currency of the account (ISO 4217-Alpha 3).

bank
object
required

Block needed for bank accounts.

iban
String(35)
conditional

Mandatory in SEPA.

bic
String(11)
accountNumber
String(35)
conditional

Account number. Mandatory in case of no IBAN.

routingNo
String(12)
conditional

The routing number. Mandatory in case of no IBAN.

name
String(60)
conditional

The name of the bank. Mandatory for non SEPA.

city
String(60)
conditional

The city of the bank. Mandatory for non SEPA.

countryCode
String(2)
required

The country of the bank (ISO 3166-1 Alpha 2).

Response Body Params

result
Number
required

The result of the operation. See result codes.

description
String
required

A short description of the result

header
object
required

Header block.

requestTimestamp
Date-time
required

The combined date and time in UTC (ISO8601).

body
object
required

Body block.

accountId
String(100)
required

The unique account identifier.

recipientId
String(100)
required

The unique recipient identifier.

accountCode
String(20)
required

Your unique account reference.

currencyCode
String(3)
required

The currency of the account (ISO 4217-Alpha 3).

status
String(100)
required

The satus of the account. Possible values:
Pending - (Default). One or more required (KYC) fields are missing for the recipient. Payouts not allowed on this account.
Validated - Account is checked. Payouts allowed up to the tier level.
Blocked - Payouts not allowed on this account.

created
date-time
required

When the account was created. The combined date and time in UTC (ISO8601).

bank
object
required

Block for bank accounts.

iban
String(35)
conditional

Mandatory in SEPA.

bic
String(11)
accountNumber
String(35)
conditional

Account number. Mandatory in case of no IBAN.

routingNo
String(12)
conditional

The routing number. Mandatory in case of no IBAN.

name
String(60)
conditional

The name of the bank. Mandatory for non SEPA.

city
String(60)
conditional

The city of the bank. Mandatory for non SEPA.

countryCode
String(2)
required

The country of the bank (ISO 3166-1 Alpha 2).

https://stagslicepay.acehubpaymentservices.com/gateway/v1/recipients/{recipientId}/accounts

{
  "header" : {
    "businessId" : "{businessId}"
  },
  "body": {
    "currencyCode": "EUR",
    "accountCode": "ZAQ12WSXCDE34RFVBGT5",
    "bank": {
      "iban": "NL91PAY0417164300",
      "bic": "PAYNL2RXXX",
      "name": "Pay Test Bank",
      "city": "Amsterdam",
      "countryCode": "NL"
    }
  }
}
var http = require('https')

var options = {
  'method': 'POST',
  'hostname': 'stagslicepay.acehubpaymentservices.com',
  'port': null,
  'path': 'gateway/v1/recipients/{recipientId}/accounts',
  'headers': {
    'accept': 'application/json',
    'content-type': 'application/json',
    'authorization': 'Basic ******'
  }
}

var req = http.request(options, function (res) {
  var chunks = []

  res.on('data', function (chunk) {
    chunks.push(chunk)
  })

  res.on('end', function () {
    var body = Buffer.concat(chunks)
    console.log(body.toString())
  })
})

req.end()
package main

import (
  "fmt"
  "net/http"
  "io/ioutil"
)

func main() {
  url := "https://stagslicepay.acehubpaymentservices.com/gateway/v1/recipients/{recipientId}/accounts"

  req, _ := http.NewRequest("POST", url, nil)

  req.Header.Add("accept", "application/json")
  req.Header.Add("content-type", "application/json")
  req.Header.Add("authorization", "Basic ******")

  res, _ := http.DefaultClient.Do(req)

  defer res.Body.Close()
  body, _ := ioutil.ReadAll(res.Body)

  fmt.Println(res)
  fmt.Println(string(body))
}
require 'uri'
require 'net/http'

url = URI("https://stagslicepay.acehubpaymentservices.com/gateway/v1/recipients/{recipientId}/accounts")

http = Net::HTTP.new(url.host, url.port)

request = Net::HTTP::Post.new(url)
request["accept"] = 'application/json'
request["content-type"] = 'application/json'
request["authorization"] = 'Basic ******'

response = http.request(request)
puts response.read_body
import http.client

conn = http.client.HTTPSConnection("stagslicepay.acehubpaymentservices.com")

payload = "" # Fill with request body

headers = {
  'accept': "application/json",
  'content-type': "application/json",
  'authorization': "Basic ******"
}

conn.request("POST", "gateway/v1/recipients/{recipientId}/accounts", payload, headers)

res = conn.getresponse()
data = res.read()

print(data.decode("utf-8"))
<?php

$curl = curl_init();

curl_setopt_array($curl, array(
  CURLOPT_URL => "https://stagslicepay.acehubpaymentservices.com/gateway/v1/recipients/{recipientId}/accounts",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => "",
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 30,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => "POST",
  CURLOPT_POSTFIELDS => "",
  CURLOPT_HTTPHEADER => array(
    "accept: application/json",
    "authorization: Basic ******",
    "content-type: application/json"
  ),
));

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
  echo "cURL Error #:" . $err;
} else {
  echo $response;
}
public static String excutePost(String targetURL, String urlParameters) 
{
  try (CloseableHttpClient client = HttpClients.createDefault()) {
    int contentLength = urlParameters.getBytes().length;

    HttpPost post = new HttpPost(targetURL);
    post.setHeader(new BasicHeader("Content-Type", "application/json"));

    post.setEntity(new StringEntity(urlParameters));

    HttpResponse response = client.execute(post);

    if (response.getStatusLine().getStatusCode() == HttpStatus.SC_OK) {
      return EntityUtils.toString(response.getEntity());
    }

    // Or whatever clever strategy to handle the error.
    throw new RuntimeException(response.getStatusLine().getReasonPhrase());
  } catch (Exception ex) {
    Logger.getLogger(Main.class.getName()).log(Level.SEVERE, null, ex);
    throw new RuntimeException(ex.getMessage(), ex);
  }
}
A binary file was returned

You couldn't be authenticated

{
  "result": 0,
  "description": "Ok",
  "header": {
    "requestTimestamp": "2018-01-10T10:34:23Z"
  },
  "body" : {
    "accountId": "6A528745-CA50-4F59-AE85-DCB34CA059D7",
    "recipientId": "3BD8D605-4140-4709-A31B-756EF28BCF7C",
    "accountCode": "ZAQ12WSXCDE34RFVBGT5",
    "currencyCode": "EUR",
    "status" : "Pending",
    "created": "2018-01-02T10:34:23Z",
    "bank": {
      "iban": "NL91PAY0417164300",
      "bic": "PAYNL2RXXX",
      "name": "Pay Test Bank",
      "city": "Amsterdam",
      "countryCode": "NL"
    }
  }
}
 
Suggest Edits

/recipients/:id/accounts

 
get/recipients/recipientId/accounts?businessId=businessId

Path Params

recipientId
string
required

The unique recipient identifier.

Query Params

businessId
string
required

The ID of the party connecting.

The GET accounts action can be used to retrieve information about all the recipient accounts.

currencyCode
String(3)
required

Currency code for the account (ISO 4217-Alpha 3).

accountCode
String(20)
required

Your unique account reference.

bank
object
required

Block needed for bank accounts.

countryCode
String(2)
required

Country code of the bank (ISO 3166-1 Alpha 2).

iban
String(35)
conditional

Mandatory in SEPA.

accountNumber
String()
conditional

Account number. Mandatory in case of no IBAN.

city
String(60)
conditional

City of the bank. Mandatory for non SEPA.

name
String(60)
conditional

Name of the bank. Mandatory for non SEPA.

routingNo
String(12)
conditional

Routing number. Mandatory in case no IBAN.

bic
String(11)
conditional

ISO 9362 alpha 8 or 11.

Response Body Params

result
Number
required

The result of the operation. See result codes.

description
String
required

A short description of the result

header
object
required

Header block.

requestTimestamp
Date-time
required

The combined date and time in UTC (ISO8601).

body
Array
required

Array of accounts.

accountId
String(100)
required

The unique account identifier.

recipientId
String(100)
required

The unique recipient identifier.

accountCode
String(20)
required

Your unique account reference.

currencyCode
String(3)
required

The currency of the account (ISO 4217-Alpha 3).

status
String(100)
required

The satus of the account. Possible values:
Pending - (Default). One or more required (KYC) fields are missing for the recipient. Payouts not allowed on this account.
Validated - Account is checked. Payouts allowed up to the tier level.
Blocked - Payouts not allowed on this account.

created
date-time
required

When the account was created. The combined date and time in UTC (ISO8601).

bank
object
required

Block for bank accounts.

iban
String(35)
conditional

Mandatory in SEPA.

bic
String(11)
accountNumber
String(35)
conditional

Account number. Mandatory in case of no IBAN.

routingNo
String(12)
conditional

The routing number. Mandatory in case of no IBAN.

name
String(60)
conditional

The name of the bank. Mandatory for non SEPA.

city
String(60)
conditional

The city of the bank. Mandatory for non SEPA.

countryCode
String(2)
required

The country of the bank (ISO 3166-1 Alpha 2).

https://stagslicepay.acehubpaymentservices.com/gateway/v1/recipients/{recipientId}/accounts?businessId={businessId}
A binary file was returned

You couldn't be authenticated

{
  "result" : 0,
  "description" : "Ok",
  "header" : {
    "requestTimestamp" : "2018-01-10T10:34:23.040Z",
  },
  "body" : [
    {
      "accountId": "6A528745-CA50-4F59-AE85-DCB34CA059D7",
      "recipientId": "3BD8D605-4140-4709-A31B-756EF28BCF7C",
      "accountCode": "ZAQ12WSXCDE34RFVBGT5",
      "currencyCode": "EUR",
      "status" : "Pending",
      "created": "2018-01-02T10:34:23Z",
      "bank": {
        "iban": "NL91PAY0417164300",
        "bic": "PAYNL2RXXX",
        "name": "Pay Test Bank",
        "city": "Amsterdam",
        "countryCode": "NL"
      }
    },
    {
      "accountId": "8AB9D49C-D59D-4DCF-A4BA-40E07CF1CE3C",
      "recipientId": "3BD8D605-4140-4709-A31B-756EF28BCF7C",
      "accountCode": "QUD5S28O91QE4451OT3G",
      "currencyCode": "GBP",
      "status" : "Validated",
      "created": "2017-12-22T12:35:10Z",
      "bank": {
        "iban": "NL91PAY1234567890",
        "bic": "PAYUK2RXXX",
        "name": "Pay Test London Bank",
        "city": "London",
        "countryCode": "GB"
      }
    }
  ]
}
 
Suggest Edits

/recipients/:id/accounts/:id

 
get/recipients/recipientId/accounts/accountId?businessId=businessId

Path Params

recipientId
string
required

The unique recipient identifier.

accountId
string
required

The unique account identifier.

Query Params

businessId
string
required

The ID of the party connecting.

The GET account action can be used to retrieve information about a recipient account.

currencyCode
String(3)
required

Currency code for the account (ISO 4217-Alpha 3).

accountCode
String(20)
required

Your unique account reference.

bank
object
required

Block needed for bank accounts.

countryCode
String(2)
required

Country code of the bank (ISO 3166-1 Alpha 2).

iban
String(35)
conditional

Mandatory in SEPA.

accountNumber
String()
conditional

Account number. Mandatory in case of no IBAN.

city
String(60)
conditional

City of the bank. Mandatory for non SEPA.

name
String(60)
conditional

Name of the bank. Mandatory for non SEPA.

routingNo
String(12)
conditional

Routing number. Mandatory in case no IBAN.

bic
String(11)
conditional

ISO 9362 alpha 8 or 11.

Response Body Params

result
Number
required

The result of the operation. See result codes.

description
String
required

A short description of the result

header
object
required

Header block.

requestTimestamp
Date-time
required

The combined date and time in UTC (ISO8601).

body
object
required

Body block.

accountId
String(100)
required

The unique account identifier.

recipientId
String(100)
required

The unique recipient identifier.

accountCode
String(20)
required

Your unique account reference.

currencyCode
String(3)
required

The currency of the account (ISO 4217-Alpha 3).

status
String(100)
required

The satus of the account. Possible values:
Pending - (Default). One or more required (KYC) fields are missing for the recipient. Payouts not allowed on this account.
Validated - Account is checked. Payouts allowed up to the tier level.
Blocked - Payouts not allowed on this account.

created
date-time
required

When the account was created. The combined date and time in UTC (ISO8601).

bank
object
required

Block for bank accounts.

iban
String(35)
conditional

Mandatory in SEPA.

bic
String(11)
accountNumber
String(35)
conditional

Account number. Mandatory in case of no IBAN.

routingNo
String(12)
conditional

The routing number. Mandatory in case of no IBAN.

name
String(60)
conditional

The name of the bank. Mandatory for non SEPA.

city
String(60)
conditional

The city of the bank. Mandatory for non SEPA.

countryCode
String(2)
required

The country of the bank (ISO 3166-1 Alpha 2).

https://stagslicepay.acehubpaymentservices.com/gateway/v1/recipients/{recipientId}/accounts/{accountId}?businessId={businessId}
A binary file was returned

You couldn't be authenticated

{
  "result" : 0,
  "description" : "Ok",
  "header" : {
    "requestTimestamp" : "2018-01-10T10:34:23Z",
  },
  "body" : {
    "accountId": "6A528745-CA50-4F59-AE85-DCB34CA059D7",
    "recipientId": "3BD8D605-4140-4709-A31B-756EF28BCF7C",
    "accountCode": "ZAQ12WSXCDE34RFVBGT5",
    "currencyCode": "EUR",
    "status" : "Pending",
    "created": "2018-01-02T10:34:23Z",
    "bank": {
      "iban": "NL91PAY0417164300",
      "bic": "PAYNL2RXXX",
      "name": "Pay Test Bank",
      "city": "Amsterdam",
      "countryCode": "NL"
    }
  }
}
 
Suggest Edits

/recipients/:id/accounts/:id/block

 
post/recipients/recipientId/accounts/accountId/block

Path Params

recipientId
string
required

The unique recipient identifier.

accountId
string
required

The unique account identifier.

Merchants can block accounts not useful anymore.

Request Body Params

header
object
required

Header block.

businessId
string(50)
required

The ID provided to identify your company.

Response Body Params

result
Number
required

The result of the operation. See result codes.

description
String
required

A short description of the result

header
object
required

Header block.

requestTimestamp
Date-time
required

The combined date and time in UTC (ISO8601).

body
object
required

Body block.

accountId
String(100)
required

The unique account identifier.

recipientId
String(100)
required

The unique recipient identifier.

accountCode
String(20)
required

Your unique account reference.

currencyCode
String(3)
required

The currency of the account (ISO 4217-Alpha 3).

status
String(100)
required

The satus of the account. Possible values:
Pending - (Default). One or more required (KYC) fields are missing for the recipient. Payouts not allowed on this account.
Validated - Account is checked. Payouts allowed up to the tier level.
Blocked - Payouts not allowed on this account.

created
date-time
required

When the account was created. The combined date and time in UTC (ISO8601).

bank
object
required

Block for bank accounts.

iban
String(35)
conditional

Mandatory in SEPA.

bic
String(11)
accountNumber
String(35)
conditional

Account number. Mandatory in case of no IBAN.

routingNo
String(12)
conditional

The routing number. Mandatory in case of no IBAN.

name
String(60)
conditional

The name of the bank. Mandatory for non SEPA.

city
String(60)
conditional

The city of the bank. Mandatory for non SEPA.

countryCode
String(2)
required

The country of the bank (ISO 3166-1 Alpha 2).

https://stagslicepay.acehubpaymentservices.com/gateway/v1/recipients/{recipientId}/accounts/{accountId}/block

{
  "header" : {
    "businessId" : "{businessId}"
  }
}
var http = require('https')

var options = {
  'method': 'POST',
  'hostname': 'stagslicepay.acehubpaymentservices.com',
  'port': null,
  'path': 'gateway/v1/recipients/{recipientId}/accounts/{id}/block',
  'headers': {
    'accept': 'application/json',
    'content-type': 'application/json',
    'authorization': 'Basic ******'
  }
}

var req = http.request(options, function (res) {
  var chunks = []

  res.on('data', function (chunk) {
    chunks.push(chunk)
  })

  res.on('end', function () {
    var body = Buffer.concat(chunks)
    console.log(body.toString())
  })
})

req.end()
package main

import (
  "fmt"
  "net/http"
  "io/ioutil"
)

func main() {
  url := "https://stagslicepay.acehubpaymentservices.com/gateway/v1/recipients/{recipientId}/accounts/{id}/block"

  req, _ := http.NewRequest("POST", url, nil)

  req.Header.Add("accept", "application/json")
  req.Header.Add("content-type", "application/json")
  req.Header.Add("authorization", "Basic ******")

  res, _ := http.DefaultClient.Do(req)

  defer res.Body.Close()
  body, _ := ioutil.ReadAll(res.Body)

  fmt.Println(res)
  fmt.Println(string(body))
}
require 'uri'
require 'net/http'

url = URI("https://stagslicepay.acehubpaymentservices.com/gateway/v1/recipients/{recipientId}/accounts/{id}/block")

http = Net::HTTP.new(url.host, url.port)

request = Net::HTTP::Post.new(url)
request["accept"] = 'application/json'
request["content-type"] = 'application/json'
request["authorization"] = 'Basic ******'

response = http.request(request)
puts response.read_body
import http.client

conn = http.client.HTTPSConnection("stagslicepay.acehubpaymentservices.com")

payload = "" # Fill with request body

headers = {
  'accept': "application/json",
  'content-type': "application/json",
  'authorization': "Basic ******"
}

conn.request("POST", "gateway/v1/recipients/{recipientId}/accounts/{id}/block", payload, headers)

res = conn.getresponse()
data = res.read()

print(data.decode("utf-8"))
<?php

$curl = curl_init();

curl_setopt_array($curl, array(
  CURLOPT_URL => "https://stagslicepay.acehubpaymentservices.com/gateway/v1/recipients/{recipientId}/accounts/{id}/block",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => "",
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 30,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => "POST",
  CURLOPT_POSTFIELDS => "",
  CURLOPT_HTTPHEADER => array(
    "accept: application/json",
    "authorization: Basic ******",
    "content-type: application/json"
  ),
));

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
  echo "cURL Error #:" . $err;
} else {
  echo $response;
}
public static String excutePost(String targetURL, String urlParameters) 
{
  try (CloseableHttpClient client = HttpClients.createDefault()) {
    int contentLength = urlParameters.getBytes().length;

    HttpPost post = new HttpPost(targetURL);
    post.setHeader(new BasicHeader("Content-Type", "application/json"));

    post.setEntity(new StringEntity(urlParameters));

    HttpResponse response = client.execute(post);

    if (response.getStatusLine().getStatusCode() == HttpStatus.SC_OK) {
      return EntityUtils.toString(response.getEntity());
    }

    // Or whatever clever strategy to handle the error.
    throw new RuntimeException(response.getStatusLine().getReasonPhrase());
  } catch (Exception ex) {
    Logger.getLogger(Main.class.getName()).log(Level.SEVERE, null, ex);
    throw new RuntimeException(ex.getMessage(), ex);
  }
}
A binary file was returned

You couldn't be authenticated

{
  "result": 0,
  "description": "Ok",
  "header": {
    "requestTimestamp": "2018-01-10T10:34:23Z"
  },
  "body" : {
    "accountId": "6A528745-CA50-4F59-AE85-DCB34CA059D7",
    "recipientId": "3BD8D605-4140-4709-A31B-756EF28BCF7C",
    "accountCode": "ZAQ12WSXCDE34RFVBGT5",
    "currencyCode": "EUR",
    "status" : "Blocked",
    "created": "2018-01-02T10:34:23Z",
    "bank": {
      "iban": "NL91PAY0417164300",
      "bic": "PAYNL2RXXX",
      "name": "Pay Test Bank",
      "city": "Amsterdam",
      "countryCode": "NL"
    }
  }
}
 
Suggest Edits

/recipients/:id/payouts

 
post/recipients/recipientId/payouts

Path Params

recipientId
string
required

The unique recipient identifier

A payout flushes the available balance and remits the funds to the linked (bank) accounts. If an amount and currency is specified only this amount is remitted to the recipient linked account.

Request Body Params

header
object
required

Header block.

businessId
string(50)
required

The ID provided to identify your company.

body
object
required

Body block.

trackingCode
String(100)
required

Your unique payout reference.