Get Payment Methods for an Account
/accounts/{accountId}/paymentMethods
Request
-
accountId(required): string
The ID or account number of the account to get payment methods for.
-
bankAccount.BIC: string
The Business Identifier Code of a bank (for retrieving bankAccountDebit payment methods).Examples
-
bankAccount.accountNumber: string
The account number (for retrieving bankAccountDebit payment methods).
-
bankAccount.bank: string
The name of a bank (for retrieving bankAccountDebit payment methods).Examples
-
bankCard.cardNumber: string
The card number (for retrieving bankCard payment methods).
-
bankCard.nameOnCard: string
The name on the card (for retrieving bankCard payment methods). You can use bankCard.nameOnCard.like= to get partial matches.Examples
-
bankCard.type: string
The type of bank card (for retrieving bankCard payment methods). The only valid value for BRM is CREDIT.
-
fields: string
The list of comma-separated fields to return in the response.Examples
-
invoice.name: string
The name on the invoice (for retrieving invoice payment methods). You can use invoice.name.like= to get partial matches.Examples
-
limit: integer
The maximum number of results to return.Examples
-
name: string
The name of the payment method instance.Examples
-
offset: integer
The number of results to offset the response by.Examples
-
type: string
The type of payment methods to get: tokenizedCard, bankAccountDebit, bankCard, or invoice.Allowed Values:
[ "tokenizedCard", "bankAccountDebit", "bankCard", "invoice" ]
There's no request body for this operation.
Back to TopResponse
- application/json
200 Response
-
X-Total-Count:
Total results
object-
@type(required): string
Allowed Values:
[ "tokenizedCard", "bankAccountDebit", "bankCard", "invoice" ]The payment method's type: tokenizedCard, bankAccountDebit, bankCard, or invoice. The value of this property determines the content of the details property. -
account: array
account
An account that owns or can use the payment method.
-
authorizationCode: string
An authorization code provided by a financial institution. Typically, for recurring payments using the payment method.
-
description: string
The payment method's description.
-
details(required): object
details
The payment method's details, which differ based on the @type property.
-
href(required): string
The payment method's href.
-
id(required): string
The payment method's ID.
-
name: string
The payment method's name.
-
preferred: boolean
Whether this is the preferred payment method for the account, bill unit, or billing cycle specification (true) or not (false).
- relatedParty: array relatedParty
-
status: string
The payment method's status.
-
statusDate: string
(date-time)
The date the payment method's status was recorded.
-
validFor:
TimePeriodType
A period of time.
array-
Array of:
object AccountRefType
An account reference.
objectobject-
endDateTime: string
(date-time)
The end of the time period.
-
startDateTime(required): string
(date-time)
The start of the time period.
object-
@referredType: string
The referred account's type. For example: customer account or financial account.
-
description: string
The referred account's description.
-
href(required): string
The referred account's href.
-
id(required): string
The referred account's ID.
-
name: string
The referred account's name.
object-
@referredType: string
The type of related party. For example: account, customer, or user.
-
href(required): string
The related party's href.
-
id(required): string
The related party's ID.
-
name: string
The related party's name.
-
role: string
The related party's role.
400 Response
401 Response
403 Response
405 Response
500 Response
Examples
Example 1: Get Payment Methods by Account ID
The following example shows how to get all payment methods for a specified account ID by submitting a GET request on the REST resource using cURL. For more information about cURL, see Use cURL.
curl -X GET 'http://host:port/brm/paymentMethods/version/accounts/0.0.0.1+-account+244543/paymentMethods'
Example of the Response Body
The following example shows the contents of the response body in JSON format. Note that the account has three different types of payment methods, resulting in different properties under the details property.
[
{
"id": "0.0.0.1+-payinfo-cc+238991",
"href": "http://host:port/brm/paymentMethods/version/paymentMethods/0.0.0.1+-payinfo-cc+238991",
"name": "Mark's Tokenized Card",
"description": null,
"validFor": null,
"account": [
{
"id": "0.0.0.1+-account244543",
"href": null,
"description": "Mark's primary account"
"name": "Mark Evans",
"@baseType": null,
"@schemaLocation": null,
"@type": null,
"@referredType": null
}
],
"preferred": false,
"relatedParty": null,
"@type": "tokenizedCard",
"authorizationCode": null,
"status": null,
"statusDate": null,
"details": {
"brand": "Visa",
"type": "CREDIT",
"lastFourDigits": "1111",
"tokenType": "1",
"token": "4111111111111111",
"issuer": null
}
},
{
"id": "0.0.0.1+-payinfo-cc+286527",
"href": "http://host:port/brm/paymentMethods/version/paymentMethods/0.0.0.1+-payinfo-cc+286527",
"name": "Mark's Bank Card",
"description": null,
"validFor": null,
"account": [
{
"id": "0.0.0.1+-account244543",
"href": null,
"description": "Mark's primary account"
"name": "Mark Evans",
"@baseType": null,
"@schemaLocation": null,
"@type": null,
"@referredType": null
}
],
"preferred": false,
"relatedParty": null,
"@type": "bankCard",
"authorizationCode": null,
"status": null,
"statusDate": null,
"details": {
"brand": "VISA",
"type": "CREDIT",
"cardNumber": "4222222222222"
"expirationDate": "2025-02-28T11:59:59+05:30",
"cvv": null,
"lastFourDigits": "2222",
"nameOnCard": "Mark Evans",
"bank": null
}
},
{
"id": "0.0.0.1+-payinfo-dd+240947",
"href": "http://host:port/brm/paymentMethods/version/paymentMethod/0.0.0.1+-payinfo-dd+240947",
"name": "Mark's Direct Debit Account",
"description": null,
"validFor": null,
"account": [
{
"id": "0.0.0.1+-account244543",
"href": null,
"description": "Mark's primary account"
"name": "Mark Evans",
"@baseType": null,
"@schemaLocation": null,
"@type": null,
"@referredType": null
}
],
"preferred": true,
"relatedParty": null,
"@type": "bankAccountDebit",
"authorizationCode": null,
"status": null,
"statusDate": null,
"details": {
"accountNumber": "12341234",
"accountNumberType": "Savings",
"BIC": "AAAABBCCDD",
"owner": "Mark Evans",
"bank": "My Bank"
}
},
]Example 2: Get Payment Methods by Account Number
The following example shows how to get all payment methods for a specified account number by submitting a GET request on the REST resource using cURL. For more information about cURL, see Use cURL.
curl -X GET 'http://host:port/brm/paymentMethods/version/accounts/account+123456/paymentMethod'
Example of the Response Body
The following example shows the contents of the response body in JSON format.
[
{
"id": "0.0.0.1+-payinfo-cc+987654",
"href": "http://host:port/brm/paymentMethods/version/paymentMethod/0.0.0.1+-payinfo-cc+987654",
"name": "Joe's Tokenized Card",
"description": null,
"validFor": null,
"account": [
{
"id": "account+123456",
"href": null,
"description": "Joe's primary account"
"name": "Joe Davis",
}
],
"preferred": false,
"relatedParty": null,
"@type": "bankCard",
"authorizationCode": null,
"status": null,
"statusDate": null,
"details": {
"brand": "MasterCard",
"type": "Credit",
"cardNumber": "5500000000000004",
"expirationDate": "2025-02-28T11:59:59+05:30",
"cvv": null,
"lastFourDigits": null,
"nameOnCard": Joe Davis,
"bank": null
}
},
]