Get a Payment Method by ID

get

/paymentMethod/{paymentMethodId}

Gets the specified payment method by payment method ID or external ID.

Request

Path Parameters

There's no request body for this operation.

Back to Top

Response

Supported Media Types

200 Response

The payment method was returned successfully.
Body ()
Root Schema : PaymentMethodType
Type: object
A payment method.
Show Source
Nested Schema : account
Type: array
An account that owns or can use the payment method.
Show Source
Nested Schema : details
Type: object
The payment method's details, which differ based on the @type property.
Nested Schema : relatedParty
Type: array
The related party that owns the payment method.
Show Source
Nested Schema : TimePeriodType
Type: object
A period of time.
Show Source
Nested Schema : AccountRefType
Type: object
An account reference.
Show Source
Nested Schema : RelatedPartyRefType
Type: object
A related party.
Show Source

400 Response

The request isn't valid.

401 Response

The client doesn't have the correct privileges.

403 Response

The request wasn't authorized.

404 Response

The requested resource couldn't be found.

405 Response

This method is not allowed.

500 Response

The system encountered an internal error.
Back to Top

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
   }
}
Back to Top