# Register PayPal as a payment method **POST /payment-methods/paypal** By registering you allow the user to use PayPal as a payment method. The payment method ID is optional when posting data. If you provide a valid Billing Agreement ID, the payment method is created directly. Alternatively you can provide all three redirect URLs in which case the backend will create the Billing Agreement for you. Creating a Billing Agreement is a 2-step process, thus the payment method will only be created after the user approved it on the PayPal website. The approval URL in the response will point you to the correct page. After the user takes action the user is redirected to one of the three redirect URLs provided by you. ## Servers - Production server (stable release 2022-1): https://api.pace.cloud/pay/2022-1 (Production server (stable release 2022-1)) ## Authentication methods - OAuth2 - Oidc ## Parameters ### Body: application/vnd.api+json (object) - **data** (object) ## Responses ### 201 Created #### Body: application/vnd.api+json (object) - **data** (object) ### 303 Already exists #### Headers - **Location** (string(url)) Location of the already existing payment method ### 400 Bad request #### Body: application/vnd.api+json (object) - **errors** (array[object]) ### 401 OAuth token missing or invalid or a linked identity is missing. Linked identity missing is a special case where you need to make sure that the user has additionally logged in / authorized with a third-party. This is not relevant for most use-cases. The specific error code that identifies a missing linked identity is `missing-linked-identity` Example: ``` { "errors": [ { "id": "cbgmhslmp1o9or9kh1p0", "title": "Missing linked identity for authorized access", "detail": "Linked identity is needed to access this resource, please check why the user does not have a linked identity", "status": "401", "code": "missing-linked-identity" } ] } ``` #### Body: application/vnd.api+json (object) - **errors** (array[object]) ### 406 The specified accept header is invalid #### Body: application/vnd.api+json (object) - **errors** (array[object]) ### 409 Resource conflicts #### Body: application/vnd.api+json (object) - **errors** (array[object]) ### 415 The specified content type header is invalid #### Body: application/vnd.api+json (object) - **errors** (array[object]) ### 422 The request was well-formed but was unable to be followed due to semantic errors. The following codes may be seen: * `provider:card-not-usable`: The card is rejected by the payment provider #### Body: application/vnd.api+json (object) - **errors** (array[object]) ### 500 Internal server error #### Body: application/vnd.api+json (object) - **errors** (array[object]) [Powered by Bump.sh](https://bump.sh)