Singleton APS resource to manage payment methods.
In this document:
The considered APS type (download
)
extends the Resource APS type(s) and looks as follows:
{
"name": "PaymentMethodManagement",
"id": "http://www.odin.com/billing/payment-method-management/1.2",
"apsVersion": "2.0",
"implements": [
"http://aps-standard.org/types/core/resource/1.0"
],
"access": {
"global": true
},
"operations": {
"paymentMethods": {
"path": "/paymentMethods",
"verb": "GET",
"response": {
"type": "array",
"items": {
"type": "APSPaymentMethod"
}
},
"errorResponse": {
"type": "object"
},
"parameters": {
"accountId": {
"kind": "query",
"type": "string"
},
"paymentSystemId": {
"kind": "query",
"type": "string"
},
"externalId": {
"kind": "query",
"type": "string"
}
}
},
"updatePaymentMethod": {
"path": "/paymentMethods/{paymentMethodId}",
"verb": "PUT",
"errorResponse": {
"type": "object"
},
"parameters": {
"paymentMethodId": {
"kind": "path",
"type": "integer"
},
"paymentMethod": {
"kind": "body",
"type": "APSPaymentMethod"
}
}
}
},
"structures": {
"APSPaymentMethod": {
"type": "object",
"properties": {
"id": {
"type": "integer"
},
"paymentSystemId": {
"type": "string"
},
"paymentSystem": {
"type": "string"
},
"ownerAccountId": {
"type": "string"
},
"number": {
"type": "string"
},
"name": {
"type": "string",
"readonly": true
},
"type": {
"type": "string",
"enum": [
"CREDIT_CARD",
"BANK_ACCOUNT",
"EXTERNAL",
"MANUAL",
"ALBANY_BACS",
"CUSTOM",
"MODAL"
]
},
"perCustomer": {
"type": "boolean",
"required": true
},
"status": {
"type": "string",
"required": true,
"enum": [
"ACTIVE",
"NOT_INSTANTIATED",
"EXPIRED",
"SUSPENDED",
"PENDING",
"FAILED",
"CANCELLED",
"DISABLED"
]
},
"ratified": {
"type": "string",
"required": true,
"enum": [
"YES",
"NO",
"NOT_REQUIRED"
]
},
"defaultMethod": {
"type": "boolean",
"required": true
}
}
}
}
}
NAME | VALUES | DESCRIPTION |
---|---|---|
RatificationStatus |
|
Ratification status of a payment method.
YES - Payment method is ratified.NO - Payment
method is not ratified.NOT_REQUIRED - Ratifications is not required. |
Status |
|
Status of a payment method.
ACTIVE - Payment method is active.NOT_INSTANTIATED -
Payment method is not instantiated.EXPIRED - Payment method has expired.SUSPENDED -
Payment method is suspended.PENDING - Payment method creation in 3rd-party system is in
progress.FAILED - Payment method creation in 3rd-party system is failed.CANCELLED -
Payment method is cancelled by 3rd-party system.DISABLED - Payment method is disabled by
vendor. |
Type |
|
Type of a payment method.
CREDIT_CARD - Locally processed and stored credit card.BANK_ACCOUNT - Bank account.EXTERNAL - External payment site.MANUAL - Manual
payment.ALBANY_BACS - See <a
href=”http://www.albany.co.uk/knowledge-centre/bacs-getting-started/”>Albany Bacs</a>.CUSTOM
- Custom payment method.MODAL - Modal form. |
OPERATION | VERB | PATH | RETURNS | Description |
---|---|---|---|---|
paymentMethods | GET | /paymentMethods | List of payment methods | The operation gets available payment methods for the specified account. |
updatePaymentMethod | PUT | /paymentMethods/{paymentMethodId} | Response | The operation updates status for the specified Payment Method. |
HTTP Request
GET /aps/2/resources/{aps-id}/paymentMethods
Description
The operation gets available payment methods for the specified account.
Parameters
PARAMETER | TYPE | DESCRIPTION |
---|---|---|
accountUuid | String | Optional APS identifier of the account. If it is {@code null}, payments methods of the current account will be retrieved |
externalId | String | Optional payment system external ID attribute value. |
paymentSystemId | String | Optional payment system ID. |
Returns
List of payment methods
HTTP Request
PUT /aps/2/resources/{aps-id}/paymentMethods/{paymentMethodId}
Description
The operation updates status for the specified Payment Method.
Parameters
PARAMETER | TYPE | DESCRIPTION |
---|---|---|
paymentMethod | APSPaymentMethod | Input parameters |
paymentMethodId | Integer | Payment method identifier |
Returns
APS structure for payment methods.
NAME | TYPE | ATTRIBUTES | DEFAULT | DESCRIPTION |
---|---|---|---|---|
defaultMethod | Boolean | Required | Flag that indicates if the payment method is default. | |
id | Integer | Not Required | Optional payment method identifier. | |
name | String | Not Required Read Only | Name of the payment method that combines the name of its payment system and its number. | |
number | String | Not Required | Optional payment method number. | |
ownerAccountId | String | Not Required | ||
paymentSystem | String | Not Required | Localized name of the payment system. | |
paymentSystemId | String | Not Required | Payment system identifier. | |
perCustomer | Boolean | Required | Flag that indicates if a separate payment method should be created for every customer. | |
ratified | enum RatificationStatus | Required | Ratification status of the payment method. | |
status | enum Status | Required | Status of the payment method. | |
type | enum Type | Not Required | Payment method type. |
Since the considered APS type contains custom operations, refer to Custom Operations for the general explanation of their structure and examples of operation calls.