Payment Method Services
Payment methods available in the NetLicensing shop.
Authentication, formats, error codes, paging and role levels are the same for all endpoints and described on the Conventions page. Paths are relative to https://go.netlicensing.io/core/v2/rest. Every call can be tried in the API Test Center.
| Endpoint | Purpose | Role |
|---|---|---|
GET /paymentmethod | List payment methods | Admin |
GET /paymentmethod/{paymentMethodNumber} | Get payment method | Admin |
POST /paymentmethod/{paymentMethodNumber} | Update payment method | Admin |
A role followed by “+” means that role and every higher one, see Roles.
Payment methods list
GET /paymentmethod
Required role: Admin
Return a list of all payment methods for the current vendor.
Paging attributes (pagenumber and the others) are not set on this list response.
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
filter | query | string | ;-separated key=value pairs, e.g. page=0;items=50;sortorder=number;sortdirection=DESC. |
Example
curl --user demo:demo --header "Accept: application/xml" \
https://go.netlicensing.io/core/v2/rest/paymentmethod
<netlicensing xmlns="http://netlicensing.labs64.com/schema/context">
<infos/>
<items>
<item type="PaymentMethod">
<property name="number">PAYPAL_SANDBOX</property>
<property name="active">false</property>
</item>
<item type="PaymentMethod">
<property name="number">PAYPAL</property>
<property name="active">true</property>
<property name="paypal.subject">sample_paypal_subject</property>
</item>
</items>
</netlicensing>
Get payment method
GET /paymentmethod/{paymentMethodNumber}
Required role: Admin
Return a payment method info by paymentMethodNumber.
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
paymentMethodNumber | path | string | yes | Number of the payment method. |
Example
curl --user demo:demo --header "Accept: application/xml" \
https://go.netlicensing.io/core/v2/rest/paymentmethod/PAYPAL
<netlicensing xmlns="http://netlicensing.labs64.com/schema/context">
<infos/>
<items>
<item type="PaymentMethod">
<property name="number">PAYPAL</property>
<property name="active">true</property>
<property name="paypal.subject">sample_paypal_subject</property>
</item>
</items>
</netlicensing>
Update payment method
POST /paymentmethod/{paymentMethodNumber}
Required role: Admin
Sets the provided properties to a payment method. Return an updated payment method. The body is form encoded (application/x-www-form-urlencoded).
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
paymentMethodNumber | path | string | yes | Number of the payment method. |
active | body | boolean | Parsed with Java Boolean.parseBoolean. Only true (case-insensitive) is true. |
Any other body field is stored as a custom property.
Example
curl --user demo:demo --header "Accept: application/xml" \
--data "active=false" \
https://go.netlicensing.io/core/v2/rest/paymentmethod/PAYPAL
<netlicensing xmlns="http://netlicensing.labs64.com/schema/context">
<infos/>
<items>
<item type="PaymentMethod">
<property name="number">PAYPAL</property>
<property name="active">false</property>
<property name="paypal.subject">sample_paypal_subject</property>
</item>
</items>
</netlicensing>