Link

Payment Method Services

Payment methods list

Return a list of all payment methods for the current vendor.

HTTP Method / URL

GET /core/v2/rest/paymentmethod

Security

Request Header

Accept: application/json | application/xml

Request Parameters

- None -

HTTP Status Code

200 - Successful request
400 - Malformed or illegal request
403 - Access is denied
404 - Resource not found
500 - Internal service error

See also JavaDoc: PaymentMethodService.list

Example

Request
GET https://go.netlicensing.io/core/v2/rest/paymentmethod
Accept: application/xml
Response
<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>
Try it now
$ curl --header "Accept: application/xml" --insecure --user demo:demo --request GET https://go.netlicensing.io/core/v2/rest/paymentmethod

Get payment method

Return a payment method info by paymentMethodNumber.

HTTP Method / URL

GET /core/v2/rest/paymentmethod/{paymentMethodNumber}

Security

Request Header

Accept: application/json | application/xml

Request Parameters

paymentMethodNumber (string) - Payment method number.

HTTP Status Code

200 - Successful request
400 - Malformed or illegal request
403 - Access is denied
404 - Resource not found
500 - Internal service error

See also JavaDoc: PaymentMethodService.get

Example

Request
GET https://go.netlicensing.io/core/v2/rest/paymentmethod/PAYPAL
Accept: application/xml
Response
<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>
Try it now
$ curl --header "Accept: application/xml" --insecure --user demo:demo --request GET https://go.netlicensing.io/core/v2/rest/paymentmethod/PAYPAL

Update payment method

Sets the provided properties to a payment method. Return an updated payment method.

HTTP Method / URL

POST /core/v2/rest/paymentmethod/{paymentMethodNumber}

Security

Request Header

Accept: application/json | application/xml
Content-Type: application/x-www-form-urlencoded

Request Parameters

paymentMethodNumber (string) - Payment method number.

active (boolean) - If set to 'false', the payment method is disabled.

paypal.subject (string) - The e-mail address of the PayPal account for which you are making the API calls.

HTTP Status Code

200 - Successful request
400 - Malformed or illegal request
402 - Not allowed within your pricing plan
403 - Access is denied
404 - Resource not found
500 - Internal service error

See also JavaDoc: PaymentMethodService.update

Example

Request
POST https://go.netlicensing.io/core/v2/rest/paymentmethod/PAYPAL
active=false
Accept: application/xml
Content-Type: application/x-www-form-urlencoded
Response
<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>