Get a Payment Method by ID
/paymentMethod/{paymentMethodId}
Request
-
paymentMethodId(required): string
The ID or external ID of the payment method to get.
There's no request body for this operation.
Back to TopResponse
- application/json
200 Response
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
404 Response
405 Response
500 Response
Examples
Example 1: Get a Payment Method by POID
The following example shows how to get the payment method with the specified POID 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/paymentMethod/0.0.0.1+-payinfo-dd+240947'
Example of the Response Body
The following example shows the contents of the response body in JSON format.
{
"id": "0.0.0.1+-payinfo-dd+240947",
"href": "http://host:port/brm/paymentMethods/version/paymentMethod/0.0.0.1+-payinfo-dd+240947",
"name": "Mary Robbin's Direct Debit Account",
"description": null,
"validFor": null,
"account": [
{
"id": "0.0.0.1+-account+244543",
"href": null,
"description": "Mary's primary account",
"name": "Mary Robbins",
"@baseType": null,
"@schemaLocation": null,
"@type": null,
"@referredType": null
}
],
"preferred": true,
"relatedParty": null,
"@type": "bankAccountDebit",
"authorizationCode": null,
"status": null,
"statusDate": null,
"details": {
"accountNumber": "12341234123412341",
"accountNumberType": "Savings",
"BIC": "111122334",
"owner": "Mary Robbins",
"bank": "My Bank"
}
}Example 2: Get a Payment Method by External ID
The following example shows how to get the payment method with the specified external 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/paymentMethod/Test123XYZ'
Example of the Response Body
The following example shows the contents of the response body in JSON format.
{
"id": "Test123XYZ",
"href": "http://host:port/brm/paymentMethods/version/paymentMethod/Test123XYZ",
"name": "John Clark's Direct Debit Account",
"description": null,
"validFor": null,
"account": [
{
"id": "0.0.0.1+-account+244543",
"href": null,
"description": "John's primary account",
"name": "John Clark",
"@baseType": null,
"@schemaLocation": null,
"@type": null,
"@referredType": null
}
],
"preferred": true,
"relatedParty": null,
"@type": "TokenizedCardType",
"authorizationCode": null,
"status": null,
"statusDate": null,
"details": {
"brand": "Visa",
"type": "Debit",
"lastFourDigits": "5555",
"tokenType": "1",
"token": "token",
"issuer": null
}
}