Skip to content

Payments ​

GET Mobile supports three ways to pay:

  1. Campus accounts — meal plans, charge accounts, declining balance. These are internal to CBORD and use the normal commerce methods.
  2. Stored credit cards (USAePay) — added through a hosted web form, then stored as accounts.
  3. Apple Pay — for iOS only, using a hosted web flow or the native bridge.

Bill-me tenders (charge accounts that are paid later) are a variation of (1) plus a mapping between funding and destination tenders.

Payment systems ​

EnumValueClassNotes
OPCS1Campus cardInternal CBORD cashless
CSGOLD2Campus cardLegacy CS Gold
MONETRA3Credit cardNative/embedded card entry
USAEPAY4Credit cardHosted card entry (GET Mobile default)

The app treats MONETRA and USAEPAY as credit systems and OPCS / CSGOLD as campus systems:

js
const isCredit = ({ paymentSystemType }) =>
    paymentSystemType === 3 || paymentSystemType === 4;

const isCampus = ({ paymentSystemType }) =>
    paymentSystemType === 1 || paymentSystemType === 2;

Which one is active is the institution setting get.credit.payment_system_type.

NOTE

GET Mobile filters credit accounts down to USAePay only for deposits and orders (filterAccountsByPaymentSystem keeps paymentSystemType == 4). MONETRA accounts are created through the native add-card screen instead.

Adding a credit card (USAePay) ​

Card data never touches the JSON API. The app opens a hosted page in an in-app browser:

plaintext
GET {sites_url}/{institution_shortName}/full/add_card_mobile.php?session_token={token}
PieceSource
sites_urlEnvironment site URL, e.g. https://get.cbord.com
institution_shortNameinstitution.shortName
session_tokenresponse of getAuthenticationToken

The in-app browser is configured with:

json
{
    "usewkwebview": "yes",
    "toolbarposition": "top",
    "closebuttoncaption": "Back",
    "location": "no",
    "hidenavigationbuttons": "yes",
    "toolbarcolor": "#ffffff"
}

Success / failure detection ​

The app watches loadstart events and inspects the URL:

URL containsMeaning
action_complete=1 and card_noSuccess; card_no is the new card's last four digits
error=Failure; the error query value is shown as a toast
action_complete but neitherTreated as no result

After success the app calls retrieveAccounts and selects the account whose lastFour matches card_no.

MONETRA cards ​

If get.credit.payment_system_type == 3 (MONETRA) the app instead navigates to its own native add-card screen. That flow posts createAccount with the full card object — card data is sent directly to CBORD rather than through a hosted page.

Sandbox helper ​

In non-production environments the app can auto-fill the USAePay form. The injected script uses the test card 4000100211112222 with name John Doe, street 1234 Main St, zip Anyzip, CVV 999, and an expiration month of 09 plus the current two-digit year. This never runs in production.

Apple Pay ​

Apple Pay is gated by get.feature.enable_apple_pay. The app models it as an account with accountType = 4 (APPLEPAY) and accountDisplayName = "Apple Pay".

There are two implementations in the 5.1.20 bundle.

A. Hosted web flow (used by the Angular web bundle) ​

The app opens a hosted Apple Pay page in an in-app browser and waits for an ApplePayEvent:

plaintext
GET {sites_url}/{institution_shortName}/full/applepay.php?{params}

Query parameters differ by purpose.

Deposits ​

ParameterValue
amountDeposit amount
select_accountDestination account id
session_tokengetAuthenticationToken response
plaintext
.../full/applepay.php?amount=25&select_account={ACCOUNT_ID}&session_token={TOKEN}

Orders ​

ParameterValue
order_totalorder.total
sub_totalorder.subTotal
feeorder.useFee
taxorder.tax (default 0.00)
discountorder.discount (default 0.00)
pickup_feeorder.pickupFee
delivery_feeorder.deliveryFee
tiporder.tip
merchantIdMerchant id
session_tokengetAuthenticationToken response
plaintext
.../full/applepay.php?order_total=13.13&session_token={TOKEN}&sub_total=12.50&fee=0&tax=0.63&discount=0.00&pickup_fee=0&delivery_fee=0&tip=0&merchantId={MERCHANT_ID}

Apple Pay result ​

The native shell emits an ApplePayEvent whose url is parsed:

URL conditionResult
contains applepay and status=success{ success: true, amount, accountId, accountName, sourceAcc: { accountTender: "Apple Pay" } }
anything else{ success: false, errorMessage: "The request failed." }

The accountId returned for an order is used as the accountId in submitOrder. For deposits the app shows the success modal and then refreshes accounts.

B. Native bridge (iOS shell) ​

The native shell exposes these methods through window.NativeInterface:

MethodPayloadResult
ordersApplePayThe order object{ success, accountId, amount, ... }
depositsApplePay{ accountId, depositAmount }{ success, accountId, amount, ... }

The web wrapper payWithApplePay(method, payload) resolves to:

json
{
    "success": true,
    "accountId": "{ACCOUNT_ID}",
    "amount": "25",
    "selectedAccount": { "accountDisplayName": "Apple Pay" },
    "sourceAcc": { "accountTender": "Apple Pay" }
}

On non-iOS platforms it resolves immediately with:

json
{ "success": false, "errorMessage": "Apple Pay does not work on Android.", "accountId": null }

NOTE

The iOS binary only implements ApplePayEvent / notifyApplePayResponse: and PKAddPaymentPassViewController glue; the actual payment sheet is driven by the hosted page or the native GETPartnerServices layer. Do not assume ordersApplePay exists on Android — it does not.

Deposits ​

Standard deposit ​

  1. Get accounts with retrieveAccounts.
  2. Pick a funding account (USAEPAY credit card or Apple Pay) and a destination account.
  3. Optionally call calculateDepositFee.
  4. Show a confirmation with the fee.
  5. Call deposit with fromAccountId, toAccountId, fromAccountCvv, amount, cashlessTerminalLocation: null.

TIP

Apple Pay deposits skip calculateDepositFee and deposit. The Apple Pay sheet itself performs the transaction and the app then refreshes accounts. The destination account is passed as select_account.

Bill-me deposits ​

A "bill me" account is a charge tender that is paid later. The mapping between funding and destination tenders is the JSON setting get.deposit.billme_mapping:

json
[
    { "source": "Meal Plan", "destination": "Charge Account" }
]

The app derives:

  • destination accounts — accounts with depositAccepted whose accountTender appears as a destination in the mapping, and whose source tender also exists.
  • source accounts — the accounts whose accountTender matches a mapping source.

get.deposit.billme_amounts, billme_minimum, and billme_maximum control the amounts. get.deposit.billme_mapping is required for bill-me to appear at all.

Deposit for another user (guest deposits) ​

The guest deposit flow:

  1. retrieveUserIdByCashlessFields resolves the recipient from the lookup fields returned by retrieveAnonymousDepositFields.
  2. retrieveDepositAccountsByUser lists the recipient's deposit-eligible accounts.
  3. depositForUserFromAnyAccount moves the money from the caller's funding account.
json
{
    "method": "depositForUserFromAnyAccount",
    "params": {
        "userId": "{RECIPIENT_USER_ID}",
        "fromAccountId": "{CALLER_CARD_ID}",
        "fromAccountCvv": null,
        "toAccountId": "{RECIPIENT_ACCOUNT_ID}",
        "amount": 25,
        "cashlessTerminalLocation": null,
        "sessionId": "{SESSION_ID}"
    }
}

IMPORTANT

This call sets useInstitutionId = false; do not send institutionId.

Deposits limits ​

SettingMeaning
get.deposit.onetime_minimum / onetime_maximumCredit-card deposit bounds
get.deposit.onetime_amountsPreset amounts
get.deposit.allow_freeform_onetime_amountsFree-form amounts allowed
get.deposit.guest_minimum / guest_maximumGuest deposit bounds
get.deposit.guest_amountsPreset guest amounts
get.deposit.allow_freeform_guest_amountsFree-form guest amounts
get.deposit.billme_minimum / billme_maximumBill-me bounds
get.deposit.billme_amountsPreset bill-me amounts

Orders ​

  1. Call getMerchantPaymentAccountsWithFilter to list accounts accepted by the merchant.
  2. Guests only see USAEPAY accounts (client-side filter).
  3. If the account is Apple Pay (accountType == 4), obtain an accountId from the Apple Pay flow first, then submit with it.
  4. Call submitOrder with accountId and, for credit cards, cvv.

NOTE

A merchant reports accepted processors in merchant.payment.supported_types, a JSON string such as [{"payment_system_type":4}]. The app checks it before offering Apple Pay.

Rollup accounts ​

A rollup account means "no specific account" — typically a meal-swipe rollup. The app rewrites orderPayment to [] and accountId to null before every ordering call. Never send the literal string rollup.

Card validation ​

The app validates card-entry input client-side with these rules before handing it to the payment system:

FieldRule
Card number13–19 digits; Visa/Mastercard prefix regex; Luhn
ExpirationMM/YY or MMYYYY, month 1–12
CVV3–4 digits
Postal code5 digits (US)
NameNon-empty

Card brand enum: AmericanExpress = 0, Discover = 1, MasterCard = 2, Visa = 3, Diners = 4, Dindes = 5 (typo in the app).

Payment errors ​

ExceptionMessage
InsufficientFundsExceptionThere are insufficient funds in the selected account
PaymentSystemGatewayExceptionAn error occurred while communicating with the card office or credit card processor.
PaymentSystemBusinessLogicExceptionTransaction rejected. Details: ${raw_error_message}
InvalidCardTypeException[card_name] is not accepted. Try adding a different card.
MediaAddressExceptionInvalid address specified for this card.
MediaDeniedExceptionTransaction denied for specified card.
MediaExpiredExceptionThe specified card has expired.
MediaLostExceptionThe specified card has been reported lost.
MediaValidationExceptionInvalid card number.
MediaVerificationCodeExceptionYour information could not be verified.
TransactionCountExceededExceptionYou have exceeded the system configured maximum transaction count for the day.
card_verification_exceptionYour card failed verification, please ensure your card information was entered correctly.

For ordering-specific codes (6112, 6113, 6001, 9009, …) see Ordering error codes.