POST account-upgrade-paypal

POST Prepares the PayPal payment, depending on the selected pricing plan.

Also, a cookie named paypal is set, which must be sent when completing the payment using the PUT endpoint. The user must be sent to the URL found in the response, to confirm the payment at PayPal. The user will automatically be sent back to Drillster.

Resource URL

https://www.drillster.com/api/2/account-upgrade-paypal

Parameters

Field Type Description
plan
required
String constant

The payment plan.

Accepted values: ANNUALLY and MONTHLY.

Response

A 2.0 PayPalRedirect object.

Example request

POST https://www.drillster.com/api/2/account-upgrade-paypal
plan=MONTHLY

Response

{
  "url" : "https://www.paypal.com/webscr?cmd=_ap-payment&paykey=AP-89220257ZG748361H"
}

Error responses

The following error situations are possible:

ID Response code Description
unknown_plan 400 (Bad request) Given plan is not known
missing_plan 400 (Bad request) No payment plan specified
paypal_error 500 (Internal error) The communication with PayPal failed