Skip to content
On this page

/payment

Add a payment method to a user.

HTTP Request

POST https://api.q2open.io/v1/payment

Arguments

ParameterDescription
clientIdID of the client to add a payment method to.
paymentTypeType of payment. Possible values are card, bank.
identifierOptional - custom identifier for external system correlation.
cardNumberCredit card number.
cardCodeCredit card CVV.
expMonthCredit card expiration month formatted as XX.
expYearCredit card expiration year formatted as XXXX.
zipcodeCredit card zipcode.
nameThe name as it appears on the payment account.
routingNumberBank routing number.
accountNumberBank account number.
accountTypeType of bank account. Possible values are checking, savings.
setAsDefaultSet this payment method as the default.
customLabelUsed for letting the user set a custom display name for this account.

Returns

Returns an object with a paymentMethodId property if the payment method was successfully added. Returns an error otherwise.

Example Card Request

shell
curl "https://api.q2open.io/v1/payment" \
  -H "Authorization: Bearer dc220490-e6ee-11e5-8a94-e7385a8d929e" \
  -H "Content-Type: application/json" \
  -d '{
    "clientId": "56e1ddbd1a05319bc198d36f",
    "paymentType": "card",
    "identifier": "optional_custom_identifier",
    "cardNumber": "378282246310005",
    "cardCode": "218",
    "expMonth": "10",
    "expYear": "2017",
    "zipcode": "12345",
    "name": "Demo User",
    "setAsDefault": true,
    "customLabel": "Entertainment Rewards Card"
  }'

Example Bank Request

shell
curl "https://api.q2open.io/v1/payment" \
  -H "Authorization: Bearer dc220490-e6ee-11e5-8a94-e7385a8d929e" \
  -H "Content-Type: application/json" \
  -d '{
    "clientId": "56e1ddbd1a05319bc198d36f",
    "paymentType": "bank",
    "identifier": "optional_custom_identifier",
    "routingNumber": "021000021",
    "accountNumber": "9900000002",
    "accountType": "checking",
    "name": "Demo User",
    "customLabel": "For Utilities"
  }'

Example Response

json
{
  "paymentMethodId": "56e1ddbd1a05319bc198d36f"
}