Method: generateReferenceNumber

Creates a reference number and registers payment information (description, timestamp) with the integrator.

The combination of the paymentIntegratorAccountId from the request and the referenceNumber from the response form a unique key that identifies the transaction for subsequent operations on this transaction.

The amount field is defined in micro currency units (micros), which means that $2 would be represented with the digit 2 followed by six digits 0, resulting in 2000000.

An example request looks like:


{
  "requestHeader": {
    "protocolVersion": {
      "major": 1,
      "minor": 0,
      "revision": 0
    },
    "requestId": "bWVyY2hhbnQgdHJhbnNhY3Rpb24gaWQ",
    "requestTimestamp": 1502220196077
  },
  "paymentIntegratorAccountId": "InvisiCashUSA_USD",
  "transactionDescription": "Google - Music",
  "currencyCode": "USD",
  "amount": "2000000"
}

An example response looks like:


{
  "responseHeader": {
    "responseTimestamp": 1502220197000
  },
  "referenceNumber": "aW50ZWdyYXRvciB0cmFuc2FjdGlvbiBpZA"
}

HTTP request

POST https://www.integratordomain.com/v1/generateReferenceNumber

Request body

The request body contains data with the following structure:

JSON representation
{
  "requestHeader": {
    object (RequestHeader)
  },
  "paymentIntegratorAccountId": string,
  "transactionDescription": string,
  "currencyCode": string,
  "amount": string
}
Fields
requestHeader

object (RequestHeader)

REQUIRED: Common header for all requests.

paymentIntegratorAccountId

string

REQUIRED: This is the payment integrator account identifier that identifies contractual constraints around this transaction.

transactionDescription

string

REQUIRED: This is the description of the transaction that can be put on the customer's statement. Localized to the userLocale found in the requestHeader. This format can be changed without notice and must never be parsed.

currencyCode

string

REQUIRED: ISO 4217 3-letter currency code.

amount

string (Int64Value format)

REQUIRED: The amount of the purchase, in micros of the currency unit.

Response body

If successful, the response body contains data with the following structure:

Response object for the generate reference number method.

JSON representation
{
  "responseHeader": {
    object (ResponseHeader)
  },
  "referenceNumber": string
}
Fields
responseHeader

object (ResponseHeader)

REQUIRED: Common header for all responses.

referenceNumber

string

REQUIRED: Reference number created by the integrator.