Domestic Payments
1. Version Control
Version | Date | Description of Changes |
Bahrain OBF v1.0.0 | 28th Oct 2020 | Initial Release |
2. Overview
The Domestic Payments resource is used by a PISP to initiate a Domestic Payment.
This resource description should be read in conjunction with Payment Initiation API Profile.
3. Endpoints
S. No. | Resource | HTTP Operation | Endpoint | Mandatory | Scope | Grant Type | Message Signing | Idempotency Key | Request Object | Response Object |
3.1 | domestic-payment | POST | POST /domestic-payments | Mandatory | payments | Authorisation Code | Signed Request Signed Response | Yes | OBWriteDomesticPaymentRequest | OBWriteDomesticPaymentResponse |
3.2 | domestic-payment | GET | GET /domestic-payments/{DomesticPaymentId} | Mandatory | payments | Client Credentials | Signed Response | No | NA | OBWriteDomesticPaymentResponse |
3.3 | payment-details | GET | GET /domestic-payments/{DomesticPaymentId}/payment-details | Optional | payments | Client Credentials | Signed Response | No | NA | OBWritePaymentDetailsResponse |
3.1 POST /domestic-payment
Once the domestic-payment-consents has been authorised by the user/customer, the PISP can proceed to submit the domestic-payment for processing:
This is done by making a POST request to the domestic-payment endpoint
This request is an instruction to the ASPSP to begin the single domestic payment journey. The domestic-payment must be submitted immediately, however, there are some scenarios where the domestic-payment may not be executed immediately (e.g., busy periods at the ASPSP)
The PISP must ensure that the Initiation and Risk sections of the domestic-payment match the corresponding Initiation and Risk sections of the domestic-payment-consents resource. If the two do not match, the ASPSP must not process the request and must respond with a 400 (Bad Request)
3.1.1 Status
A domestic-payment can only be created if its corresponding domestic-payment-consents resource has the status of "Authorised".
The domestic-payment resource that is created successfully must have one of the following PaymentStatusCode code-set enumerations:
S.No. | Status | Status Definition |
1 | Pending | Payment initiation or individual transaction included in the payment initiation is pending. Further checks and status update will be performed |
2 | Rejected | Payment initiation or individual transaction included in the payment initiation has been rejected |
3 | AcceptedSettlementInProcess | All preceding checks such as technical validation and customer profile were successful and therefore the payment initiation has been accepted for execution |
4 | AcceptedSettlementCompleted | Settlement on the debtor's account has been completed |
5 | AcceptedWithoutPosting | Payment instruction included in the credit transfer is accepted without being posted to the creditor customer’s account |
6 | AcceptedCreditSettlementCompleted | Settlement on the creditor's account has been completed |
3.2 GET /domestic-payments/{DomesticPaymentId}
A PISP can retrieve the domestic-payment to check its status.
3.2.1 Status
The domestic-payment resource must have one of the following PaymentStatusCode code-set enumerations:
S.No. | Status | Status Definition |
1 | Pending | Payment initiation or individual transaction included in the payment initiation is pending. Further checks and status update will be performed |
2 | Rejected | Payment initiation or individual transaction included in the payment initiation has been rejected |
3 | AcceptedSettlementInProcess | All preceding checks such as technical validation and customer profile were successful and therefore the payment initiation has been accepted for execution |
4 | AcceptedSettlementCompleted | Settlement on the debtor's account has been completed |
5 | AcceptedWithoutPosting | Payment instruction included in the credit transfer is accepted without being posted to the creditor customer’s account |
6 | AcceptedCreditSettlementCompleted | Settlement on the creditor's account has been completed |
3.3 GET /domestic-payments/{DomesticPaymentId}/payment-details
A PISP can retrieve the Details of the underlying payment transaction via this endpoint. This resource allows ASPSPs to return richer list of Payment Statuses, and if available payment scheme related statuses.
3.3.1 Status
The domestic-payment- payment-details must have one of the following PaymentStatusCode code-set enumerations:
Status |
Accepted |
AcceptedCancellationRequest |
AcceptedTechnicalValidation |
AcceptedCustomerProfile |
AcceptedFundsChecked |
AcceptedWithChange |
Pending |
Rejected |
AcceptedSettlementInProcess |
AcceptedSettlementCompleted |
AcceptedWithoutPosting |
AcceptedCreditSettlementCompleted |
Cancelled |
NoCancellationProcess |
PartiallyAcceptedCancellationRequest |
PartiallyAcceptedTechnicalCorrect |
PaymentCancelled |
PendingCancellationRequest |
Received |
RejectedCancellationRequest |
3.4 State Model
3.4.1 Payment Order
The state model for the domestic-payment resource follows the behaviour and definitions for the ISO 20022 PaymentStatusCode code-set.
4. Data Models
The data dictionary section gives detail on the payload content for the Domestic Payment API flows.
4.1 OBDomesticPaymentInitiation (Reused Classes)
This section describes the OBDomesticPaymentInitiation class which is reused as the Initiation object in the domestic-payment-consents resource.
4.2 Domestic Payment - Request
The OBWriteDomesticPaymentRequest object will be used for a call to:
POST /domestic-payments
4.2.1 UML Diagram
4.2.2 Notes
The domestic-payment request object contains the:
ConsentId
The full Initiation and Risk objects from the domestic-payment-consents request
The Initiation and Risk sections of the domestic-payment request must match the Initiation and Risk sections of the corresponding domestic-payment-consents request.
4.2.3 Data Dictionary
Name | Occurrence | XPath | Enhanced Definition | Class/ Datatype | Codes | Pattern |
OBWriteDomesticPaymentRequest |
| OBWriteDomesticPaymentRequest |
| OBWriteDomesticPaymentRequest |
|
|
Data | 1..1 | OBWriteDomesticPaymentRequest/Data |
| OBWriteDomesticPaymentRequest/Data |
|
|
ConsentId | 1..1 | OBWriteDomesticPaymentRequest/Data/ConsentId | Unique identification as assigned by the ASPSP to uniquely identify the consent resource | String |
|
|
Initiation | 1..1 | OBWriteDomesticPaymentRequest/Data/Initiation | The Initiation payload is sent by the initiating party to the ASPSP. It is used to request movement of funds from the debtor account to a creditor for a single domestic payment | OBDomesticPaymentInitiation |
|
|
Risk | 1..1 | OBWriteDomesticPaymentRequest/Risk | The Risk section is sent by the initiating party to the ASPSP. It is used to specify additional details for risk scoring for Payments | OBRisk |
|
|
PaymentContextCode | 0..1 | OBWriteDomesticPaymentRequest/Risk/PaymentContextCode | This field specifies the payment context
| String | Enum:
|
|
MerchantCategoryCode | 0..1 | OBWriteDomesticPaymentRequest/Risk/MerchantCategoryCode | Category code conform to ISO 18245, related to the type of services or goods the merchant provides for the transaction | String |
|
|
MerchantCustomerIdentification | 0..1 | OBWriteDomesticPaymentRequest/Risk/MerchantCustomerIdentification | The unique customer identifier of the user/customer with the merchant
| String |
|
|
DeliveryAddress | 0..1 | OBWriteDomesticPaymentRequest/Risk/DeliveryAddress | Information that locates and identifies a specific address, as defined by postal services or in free format text It will contain AddressLine, StreetName, BuildingNumber, PostCode, TownName, CountrySubDivision, Country | OBWriteDomesticPaymentRequest/Risk/DeliveryAddress |
|
|
4.3 Domestic Payment - Response
The OBWriteDomesticPaymentResponse object will be used for a response to a call to:
POST /domestic-payments
GET /domestic-payments/{DomesticPaymentId}
4.3.1 UML Diagram
4.3.2 Notes
The domestic-payment response object contains the:
DomesticPaymentId
ConsentId
CreationDateTime the domestic-payment resource was created
Status and StatusUpdateDateTime of the domestic-payment resource
ExpectedExecutionDateTime for the domestic-payment resource
ExpectedSettlementDateTime for the domestic-payment resource
Refund account details, if requested by PISP as part of the domestic-payment-consents resource
Charges array for the breakdown of applicable ASPSP charges
The Initiation object from the domestic-payment-consents
An ASPSP should conditionally provide Debtor/Name in the Payment Order Response, even when the Payer did not provide the Debtor Account via PISP
4.3.3 Data Dictionary
Name | Occurrence | XPath | Enhanced Definition | Class/ Datatype | Codes | Pattern |
OBWriteDomesticPaymentResponse |
| OBWriteDomesticPaymentResponse |
| OBWriteDomesticPaymentResponse |
|
|
Data | 1..1 | OBWriteDomesticPaymentResponse/Data |
| OBWriteDomesticPaymentResponse/Data |
|
|
DomesticPaymentId | 1..1 | OBWriteDomesticPaymentResponse/Data/DomesticPaymentId | Unique identification as assigned by the ASPSP to uniquely identify the domestic payment resource | String |
|
|
ConsentId | 1..1 | OBWriteDomesticPaymentResponse/Data/ConsentId | Unique identification as assigned by the ASPSP to uniquely identify the consent resource | String |
|
|
CreationDateTime | 1..1 | OBWriteDomesticPaymentResponse/Data/CreationDateTime | Date and time at which the message was created | DateTime |
|
|
Status | 1..1 | OBWriteDomesticPaymentResponse/Data/Status | Specifies the status of the payment information group | String | Enum:
|
|
StatusUpdateDateTime | 1..1 | OBWriteDomesticPaymentResponse/Data/StatusUpdateDateTime | Date and time at which the resource status was updated | DateTime |
|
|
ExpectedExecutionDateTime | 0..1 | OBWriteDomesticPaymentResponse/Data/ExpectedExecutionDateTime | Expected execution date and time for the payment resource | DateTime |
|
|
ExpectedSettlementDateTime | 0..1 | OBWriteDomesticPaymentResponse/Data/ExpectedSettlementDateTime | Expected settlement date and time for the payment resource | DateTime |
|
|
Refund | 0..1 | OBWriteDomesticPaymentResponse/Data/Refund | Unambiguous identification of the refund account to which a refund will be made as a result of the transaction | OBWriteDomesticPaymentResponse/Data/Refund |
|
|
Account | 1..1 | OBWriteDomesticPaymentResponse/Data/Refund/Account | Provides the details to identify an account
| OBWriteDomesticPaymentResponse/Data/Refund/Account |
|
|
SchemeName | 1..1 | OBWriteDomesticPaymentResponse/Data/Refund/Account/SchemeName | Name of the identification scheme, in a coded form as published in an external list | String | Enum:
|
|
Identification | 1..1 | OBWriteDomesticPaymentResponse/Data/Refund/Account//Identification | Identification assigned by an institution to identify an account. This identification is known by the account owner | String |
|
|
Name | 0..1 | OBWriteDomesticPaymentResponse/Data/Refund/Account/Name | The account name is the name or names of the account owner(s) represented at an account level
Note: The account name is not the product name or the nickname of the account
| String |
|
|
Charges | 0..n | OBWriteDomesticPaymentResponse/Data/Charges | Set of elements used to provide details of a charge for the payment initiation | OBWriteDomesticPaymentResponse/Data/Charges |
|
|
ChargeBearer | 0..n | OBWriteDomesticPaymentResponse/Data/Charges/ChargeBearer | It specifies which party/parties will bear the charges associated with the processing of the payment transaction | String | Enum:
|
|
Type | 0..n | OBWriteDomesticPaymentResponse/Data/Charges/Type | This denotes the charge type in a coded form | String | Enum:
|
|
Amount | 1..1 | OBWriteDomesticPaymentResponse/Data/Charges/Amount | Amount of money associated with the charge type
| OBActiveOrHistoricCurrencyAndAmount
|
|
|
Amount | 1..1 | OBWriteDomesticPaymentResponse/Data/Charges/Amount/Amount | A number of monetary units specified in an active currency where the unit of currency is explicit and compliant with ISO 4217 | String |
| ^\d{1,13}$\|^\d{1,13}\.\d{1,5}$ |
Currency | 1..1 | OBWriteDomesticPaymentResponse/Data/Charges/Amount/Currency | A code allocated to a currency by a Maintenance Agency under an international identification scheme, as described in the latest edition of the international standard ISO 4217 "Codes for the representation of currencies and funds" | String |
| ^[A-Z]{3,3}$ |
Initiation | 1..1 | OBWriteDomesticPaymentResponse/Data/Initiation | The Initiation payload is sent by the initiating party to the ASPSP. It is used to request movement of funds from the debtor account to a creditor for a single domestic payment | OBDomesticPaymentInitiation |
|
|
Debtor | 0..1 | OBWriteDomesticPaymentResponse/Data/Debtor | Set of elements used to identify a person or an organisation | OBWriteDomesticPaymentResponse/Data/Debtor |
|
|
Name | 1..1 | OBWriteDomesticPaymentResponse/Data/Debtor/Name | The account name is the name or names of the account owner(s) represented at an account level, as displayed by the ASPSP's online channels | String |
|
|
4.4 Domestic Payment Order - Payment Details - Response
The OBWritePaymentDetailsResponse object will be used for a response to a call to:
GET /domestic-payments/{DomesticPaymentId}/payment-details
4.4.1 UML Diagram
4.4.2 Notes
The domestic payment detail response object contains the:
PaymentStatus
4.4.3 Data Dictionary
Name | Occurrence | XPath | Enhanced Definition | Class/ Datatype | Codes | Pattern |
OBWritePaymentDetailsResponse |
| OBWritePaymentDetailsResponse |
| OBWritePaymentDetailsResponse |
|
|
Data | 1..1 | OBWritePaymentDetailsResponse/Data |
| OBWritePaymentDetailsResponse/Data |
|
|
PaymentStatus | 0..n | OBWritePaymentDetailsResponse/Data/PaymentStatus | Payment status details | OBWritePaymentDetailsResponse/Data/PaymentStatus |
|
|
PaymentTransactionId | 1..1 | OBWritePaymentDetailsResponse/Data/PaymentStatus/PaymentTransactionId | Unique identifier for the transaction within a servicing institution. This identifier is both unique and immutable
| String |
|
|
Status | 1..1 | OBWritePaymentDetailsResponse/Data/PaymentStatus/Status | Status of a transfer, as assigned by the transaction administrator
| String | Enum:
|
|
StatusUpdateDateTime | 1..1 | OBWritePaymentDetailsResponse/Data/PaymentStatus/StatusUpdateDateTime | Date and time at which the status was assigned to the transfer. All dates in the JSON payloads are represented in ISO 8601 date-time format | DateTime |
|
|
StatusDetail | 0..1 | OBWritePaymentDetailsResponse/Data/PaymentStatus/StatusDetail | Payment status details as per underlying Payment Rail
| OBWritePaymentDetailsResponse/Data/PaymentStatus/StatusDetail |
|
|
LocalInstrument | 1..1 | OBWritePaymentDetailsResponse/Data/PaymentStatus/StatusDetail/LocalInstrument | This element is used to specify a local instrument, local clearing option and/or further qualify the service or service level
| String | Enum:
|
|
Status | 1..1 | OBWritePaymentDetailsResponse/Data/PaymentStatus/StatusDetail/Status | Status of a transfer, as assigned by the transaction administrator
| String |
|
|
StatusReason
| 0..1 | OBWritePaymentDetailsResponse/Data/PaymentStatus/StatusDetail/StatusReason
| Reason Code provided for the status of a transfer | String | Enum:
|
|
StatusReasonDescription | 0..1 | OBWritePaymentDetailsResponse/Data/PaymentStatus/StatusDetail/ StatusReasonDescription | Reason provided for the status of a transfer
| String |
|
|
5. Usage Example
5.1 POST /domestic-payments
5.1.1 Request
|
|
5.1.2 Response
|
|
5.2 GET /domestic-payments/{DomesticPaymentId}
5.2.1 Request
|
5.2.2 Response
|
|
CENTRAL BANK OF BAHRAIN © 2020