---
# System prepended metadata

title: 'Reference : Form of Payment (FPTP)'

---

# Reference : Form of Payment (FPTP)

FPTP is a table for form of payment reference.

## :memo: Table of Contents
[ToC]

<!--## Reference : Form of Payment Screen -->


## REST APIs for form of payment resource

- GET  /references/form-of-payment
```java
    @GetMapping()
    public List<PaymentsFormOfPayment> retrieveFormsOfPayments(){
        return service.retrieveFormsOfPaymentForSales();
    }
```
     
- POST /references/form-of-payment
```java
    @PostMapping()
    public void createFormOfPayment(@Valid @RequestBody PaymentsFormOfPayment formOfPayment){
        service.createFormOfPayment(formOfPayment);
    }
```
- PUT  /references/form-of-payment
```java
    @PutMapping()
    public void modifyFormOfPayment(@Valid @RequestBody PaymentsFormOfPayment formOfPayment){
        service.modify(formOfPayment);
    }
```
    
- DELETE /references/form-of-payment/{formOfPaymentIdentifier}
```java
    @DeleteMapping(path = "/{formOfPaymentIdentifier}")
    public void deleteFormOfPayment(@PathVariable @NotNull Integer formOfPaymentIdentifier) throws EdgarException {
        service.deleteFormOfPayment(formOfPaymentIdentifier);
    }
```



## Form of Payment (FPTP) 

- FPTP Table and its corresponding Java Object

| FPTP      | Data Type | PaymentsFormOfPayment| Data Type | Constraints 
| ----------|:----------------------- |-----------|--|--|
| FPTP        | char(10)    |formPaymentType|String|NotNull,max size 10
| LIBE        | varchar2(50)|formPaymentName|String | max size 50
| BPOS        | number      |buttonPosition |Integer|
| LABL        | char(4)     |buttonLabel    |String | max size 4
| CORT_APPL   | varchar2(1) |cortApplicable |Boolean | NotNull,values in (Y,N) where Y is true and N is false. 
| LCKD_PAYT   | varchar2(1) |lockPayment    |Boolean | values in (Y,N) where Y is true and N is false. 
| TYPE        | varchar2(1) |paymentType  |String | values in (P(penalty), C(credit card) ,E (In account))
| INCL_PSR    | varchar2(1) |includeInPsr |Boolean |values in (Y,N) where Y is true and N is false. 
| COMM_NOT_APP| varchar2(1) |commissionNotApplicable |CommissionNotApplicableEnum | see acceptable values in enum below.
| SQNU        | number      |id |Integer| |
| CTDT        | date        |creationDate| Date | 
| USID        | varchar2(30)|creationUser| String|
| UPDT        | date        |updateDate|Date|
| USID_UPDT   | varchar2(30)|updateUser|String |

- CommissionNotApplicableEnum

        BOTH("B"),
        NONE("N"),
        SUPPLEMENTARY("S"),
        STANDARD("C");

- PaymentsFormOfPayment JSON

        {
            "id": 6,
            "active": true,
            "creationUser": null,
            "updateUser": "EDGAR",
            "creationDate": null,
            "updateDate": "25/09/2017 12:26:05",
            "formPaymentType": "CC",
            "formPaymentName": "CARTE DE CREDIT",
            "buttonPosition": 4,
            "buttonLabel": "CC",
            "cortApplicable": true,
            "lockPayment": false,
            "paymentType": "C",
            "includeInPsr": true,
            "commissionNotApplicable": "NONE"
        }
        

- Exception Translation to be added on front.

        CHILD_RECORD_EXISTS_FOR_FPTP("error.exception.child_record_exist_for_fptp")
        
        REFERENCE_FPTP_EXISTS("error.exception.reference_fptp_exists")
   