EMS - API Documentation - POST PaymentDetail
- 1 POST Payment detail
- 1.1 External Membership API
- 1.1.1 Overview
- 1.1.2 Resource Information
- 1.1.3 Request Headers
- 1.1.4 Request Parameters
- 1.1.5 Request Example
- 1.1.6 Response Example
- 1.2 Corporate Sports API
- 1.2.1 Overview
- 1.2.2 Resource Information
- 1.2.3 Request Headers
- 1.2.4 Request Parameters
- 1.2.5 Response Codes
- 1.2.6 Request Example
- 1.2.7 Response Example
- 1.1 External Membership API
POST Payment detail
External Membership API
Overview
Method | API Endpoint | Description |
POST | /api/v{version}/payment/Addpaymentdetail | Add payment details for a club level membership and/or branch level membership. This API will also change membership to paid.
Allidrett: This API will also accept payments for allidrett. Allidrett is on a group level, The allidrett groupID should be passed in this API.
Entities to get affected by this API Tp_MembershipPayment Tp_ActiveMembershipPayment Note: 3.party should not neglect the “Is Paid” Parameter. |
Resource Information
Response Format | JSON |
Requires Authentication | Yes |
Request Headers
| Name | Required | Description |
1 | ClubId | Yes | Club Id for which API is being requested |
2 | Authorization | Yes | This is the token to define access for on-boarded club. |
3 | Ocp-Apim-Subscription-Key | Yes | API management’s subscription key. There will be separate key for each 3.party. |
Request Parameters
| Name | Required | Description | Example |
1 | Amount | Mandatory | Membership charge |
|
2 | Comment | Optional
Max Length 200 |
|
|
3 | ExternalId | Optional
Max Length 25
| Transaction reference number. |
|
4 | IsFamilyMember | Optional | If the payment is being posted for a family member |
|
5 | IsPaid | Mandatory | If payment is already paid. |
|
6 | OrgId | Mandatory | Payment type 1 ClubId, Payment type 2 BranchId |
|
7 | PaidDate | Mandatory | Date of payment
Possible Value
|
|
8 | PaidToOrgId | Mandatory | Organization receiving the payment (club) |
|
9 | PaymentCategory | Mandatory
Max Length 127 | Eg. Online, Invoice |
|
10 | PaymentTypeId | Mandatory | 0 - Paid for Membership, 1 - License, 2 -Training fee, 3 - Registration fee 4 - Other |
|
11 | PeriodFrom | Mandatory | Membership from date
Possible Value
|
|
12 | PeriodTo | Mandatory | Membership to date
Possible Value
|
|
13 | PersonId | Mandatory | Person for which payment is being done. |
|
Request Example
{
"amount": "450",
"comment": "This was paid for club membership",
"externalId": "3248",
"isFamilyMember": "true",
"isPaid": "false",
"orgId": "7896",
"paidDate": "2015-05-08",
"paidToOrgId": "4568",
"paymentCategory": "Club membership",
"paymentTypeId": 0,
"periodFrom": "2015-05-08",
"periodTo": "2015-06-08",
"personId": "8675682"
}
Response Example
{
"message": "string""Payment details added for membership of {personId} with {orgId} for period {periodFrom} to {periodTo}",
"updatedPersonId": {personId},
"paymentTypeId": 0,
"paymentId": 123456,
"paymentCategory": "Medlemskap"
}
Corporate Sports API
Overview
Method | API Endpoint | Description |
POST | /api/v{version}/payment/Addpaymentdetail | Add payment details for a Corporate Sports level membership and/or Group level membership. This API will also change membership to paid.
Entities to get affected by this API Tp_MembershipPayment Tp_ActiveMembershipPayment
Note: 3.party should neglect “Is Paid” Parameter. |
Resource Information
Response Format | JSON |
Requires Authentication | Yes |
Request Headers
| Name | Required | Description | Example |
1 | ClubId | Yes | Club Id for which API is being requested. Pass Corporate Sport club’s ID here to post payment details for the membership of corporate sports club or its group. |
|
2 | Authorization | Yes | This is the token to define access for on-boarded club. |
|
3 | Ocp-Apim-Subscription-Key | Yes | API management’s subscription key. There will be separate key for each 3.party. |
|
Request Parameters
| Name | Required | Description | Example |
1 | Amount | Mandatory | Membership charge |
|
2 | Comment | Optional
Max Length 200 |
|
|
3 | ExternalId | Optional
Max Length 25
| Transaction reference number. |
|
4 | IsFamilyMember | Optional | If the payment is being posted for a family member |
|
5 | IsPaid | Mandatory | If payment is already paid. |
|
6 | OrgId | Mandatory | Payment type 0 ClubId, Payment type 2 GroupId |
|
7 | PaidDate | Mandatory | Date of payment
Possible Value
|
|
8 | PaidToOrgId | Mandatory | Organization receiving the payment (club) |
|
9 | PaymentCategory | Mandatory
Max Length 127 | Eg. Online, Invoice |
|
10 | PaymentTypeId | Mandatory | 0 - Paid for Membership, 2 -Group Membership fee, |
|
11 | PeriodFrom | Mandatory | Membership from date
Possible Value
|
|
12 | PeriodTo | Mandatory | Membership to date
Possible Value
|
|
13 | PersonId | Mandatory | Person for which payment is being done. |
|
Response Codes
| Code | Text | Description |
1 | 200 | Payment details added |
|
2 | 3000 | Period from and period to are not having same year. |
|
3 | 3001 | Membership not found for specific period from date. |
|
4 | 3006 | Invalid period from date and period to date. |
|
5 | 3007 | Invalid paid date. |
|
6 | 3008 | Invalid org id. |
|
7 | 3009 | Invalid payment type. |
|
8 | 3010 | Invalid Period |
|
9 | 1006 | Invalid branchId. |
|
Request Example
{
"amount": 777.0,
"comment": "test payment",
"externalId": "llqgJLRvGNU2uhYrpMQA",
"isFamilyMember": false,
"isPaid": true,
"orgId": 16235,
"paidDate": "2020-12-02",
"paidToOrgId": 16235,
"paymentCategory": "test payment Category",
"paymentTypeId": 0,
"periodFrom": "2020-07-01",
"periodTo": "2020-12-31",
"personId": 9283002
}
Response Example
{
"message": "Payment details added for membership of 9283002 with 16235 for period 2020-07-01 to 2020-12-31.",
"updatedPersonId": 9283002,
"paymentTypeId": 0,
"paymentId": 1206920,
"paymentCategory": "test payment Category"
}