PayPal Accounts

PayPal Accounts are used for paying with PayPal. We can generate a BAID (billing agreement id) which will allow for recurring billing.

Retrieve a list of PayPal accounts

Retrieve a list of PayPal Accounts.

Authorizations:
query Parameters
filter
string

The collection items filter requires a special format. Use "," for multiple allowed values. Use ";" for multiple fields. See the filter guide for more options and examples about this format.

sort
Array of strings

The collection items sort field and order (prefix with "-" for descending sort).

limit
integer [ 0 .. 1000 ]

The collection items limit.

offset
integer >= 0

The collection items offset.

q
string

The partial search of the text fields.

expand
string

Expand a response to get a full related object included inside of the _embedded path in the response. It accepts a comma-separated list of objects to expand. See the expand guide for more info.

header Parameters
Organization-Id
string (ResourceId) <= 50 characters
Example: 4f6cf35x-2c4y-483z-a0a9-158621f77a21

Organization identifier in scope of which need to perform request (if not specified, the default organization will be used).

Responses

Response Schema: application/json
Array ()
id
string <= 50 characters

The payment instrument ID.

method
required
string
Value: "paypal"

The method of payment instrument.

customerId
required
string <= 50 characters

The customer's ID.

required
object

The billing address.

username
string

PayPal username.

status
string
Enum: "inactive" "active" "deactivated"

PayPal account status.

createdTime
string <date-time>

PayPal account created time.

updatedTime
string <date-time>

PayPal account updated time.

customFields
object (ResourceCustomFields)
Default: {}

Custom Fields list as a map {"custom field name": "custom field value", ...}. The format must follow the saved format (see Custom Fields section for the formats).

object (Risk metadata)

Risk metadata used for 3DS and risk scoring.

Array of SelfLink (object) or CustomerLink (object) or AuthTransactionLink (object) or ApprovalUrlLink (object) non-empty

The links related to resource.

Array of AuthTransactionEmbed (object) or CustomerEmbed (object) non-empty

Any embedded objects available that are requested by the expand querystring parameter.

Request samples

$payPalAccounts = $client->payPalAccounts()->search([
    'filter' => 'status:active',
]);

Response samples

Content type
application/json
[
  • {
    }
]

Create a PayPal Account

Create a PayPal Account.

Authorizations:
header Parameters
Organization-Id
string (ResourceId) <= 50 characters
Example: 4f6cf35x-2c4y-483z-a0a9-158621f77a21

Organization identifier in scope of which need to perform request (if not specified, the default organization will be used).

Request Body schema: application/json

PayPalAccount resource.

method
required
string
Value: "paypal"

The method of payment instrument.

customerId
required
string <= 50 characters

The customer's ID.

required
object

The billing address.

customFields
object (ResourceCustomFields)
Default: {}

Custom Fields list as a map {"custom field name": "custom field value", ...}. The format must follow the saved format (see Custom Fields section for the formats).

object (Risk metadata)

Risk metadata used for 3DS and risk scoring.

Responses

Response Schema: application/json
id
string <= 50 characters

The payment instrument ID.

method
required
string
Value: "paypal"

The method of payment instrument.

customerId
required
string <= 50 characters

The customer's ID.

required
object

The billing address.

username
string

PayPal username.

status
string
Enum: "inactive" "active" "deactivated"

PayPal account status.

createdTime
string <date-time>

PayPal account created time.

updatedTime
string <date-time>

PayPal account updated time.

customFields
object (ResourceCustomFields)
Default: {}

Custom Fields list as a map {"custom field name": "custom field value", ...}. The format must follow the saved format (see Custom Fields section for the formats).

object (Risk metadata)

Risk metadata used for 3DS and risk scoring.

Array of SelfLink (object) or CustomerLink (object) or AuthTransactionLink (object) or ApprovalUrlLink (object) non-empty

The links related to resource.

Array of AuthTransactionEmbed (object) or CustomerEmbed (object) non-empty

Any embedded objects available that are requested by the expand querystring parameter.

Request samples

Content type
application/json
{
  • "method": "paypal",
  • "customerId": "4f6cf35x-2c4y-483z-a0a9-158621f77a21",
  • "billingAddress": {
    },
  • "customFields": {
    },
  • "riskMetadata": {
    }
}

Response samples

Content type
application/json
{
  • "id": "4f6cf35x-2c4y-483z-a0a9-158621f77a21",
  • "method": "paypal",
  • "customerId": "4f6cf35x-2c4y-483z-a0a9-158621f77a21",
  • "billingAddress": {
    },
  • "username": "string",
  • "status": "inactive",
  • "createdTime": "2019-08-24T14:15:22Z",
  • "updatedTime": "2019-08-24T14:15:22Z",
  • "customFields": {
    },
  • "riskMetadata": {
    },
  • "_links": [
    ],
  • "_embedded": [
    ]
}

Retrieve a PayPal Account

Retrieve a PayPal Account with specified identifier string.

Authorizations:
path Parameters
id
required
string <= 50 characters ^[@~\-\.\w]+$

The resource identifier string.

header Parameters
Organization-Id
string (ResourceId) <= 50 characters
Example: 4f6cf35x-2c4y-483z-a0a9-158621f77a21

Organization identifier in scope of which need to perform request (if not specified, the default organization will be used).

Responses

Response Headers
Rate-Limit-Limit
integer

The number of allowed requests in the current period.

Rate-Limit-Remaining
integer

The number of remaining requests in the current period.

Rate-Limit-Reset
string

The date in format defined by RFC 822 when the current period will reset.

Response Schema: application/json
id
string <= 50 characters

The payment instrument ID.

method
required
string
Value: "paypal"

The method of payment instrument.

customerId
required
string <= 50 characters

The customer's ID.

required
object

The billing address.

username
string

PayPal username.

status
string
Enum: "inactive" "active" "deactivated"

PayPal account status.

createdTime
string <date-time>

PayPal account created time.

updatedTime
string <date-time>

PayPal account updated time.

customFields
object (ResourceCustomFields)
Default: {}

Custom Fields list as a map {"custom field name": "custom field value", ...}. The format must follow the saved format (see Custom Fields section for the formats).

object (Risk metadata)

Risk metadata used for 3DS and risk scoring.

Array of SelfLink (object) or CustomerLink (object) or AuthTransactionLink (object) or ApprovalUrlLink (object) non-empty

The links related to resource.

Array of AuthTransactionEmbed (object) or CustomerEmbed (object) non-empty

Any embedded objects available that are requested by the expand querystring parameter.

Request samples

$payPalAccount = $client->payPalAccounts()->load('payPalAccountId');

Response samples

Content type
application/json
{
  • "id": "4f6cf35x-2c4y-483z-a0a9-158621f77a21",
  • "method": "paypal",
  • "customerId": "4f6cf35x-2c4y-483z-a0a9-158621f77a21",
  • "billingAddress": {
    },
  • "username": "string",
  • "status": "inactive",
  • "createdTime": "2019-08-24T14:15:22Z",
  • "updatedTime": "2019-08-24T14:15:22Z",
  • "customFields": {
    },
  • "riskMetadata": {
    },
  • "_links": [
    ],
  • "_embedded": [
    ]
}

Create a PayPal account with predefined ID

Authorizations:
path Parameters
id
required
string <= 50 characters ^[@~\-\.\w]+$

The resource identifier string.

header Parameters
Organization-Id
string (ResourceId) <= 50 characters
Example: 4f6cf35x-2c4y-483z-a0a9-158621f77a21

Organization identifier in scope of which need to perform request (if not specified, the default organization will be used).

Request Body schema: application/json

PayPal Account.

method
required
string
Value: "paypal"

The method of payment instrument.

customerId
required
string <= 50 characters

The customer's ID.

required
object

The billing address.

customFields
object (ResourceCustomFields)
Default: {}

Custom Fields list as a map {"custom field name": "custom field value", ...}. The format must follow the saved format (see Custom Fields section for the formats).

object (Risk metadata)

Risk metadata used for 3DS and risk scoring.

Responses

Response Headers
Rate-Limit-Limit
integer

The number of allowed requests in the current period.

Rate-Limit-Remaining
integer

The number of remaining requests in the current period.

Rate-Limit-Reset
string

The date in format defined by RFC 822 when the current period will reset.

Response Schema: application/json
id
string <= 50 characters

The payment instrument ID.

method
required
string
Value: "paypal"

The method of payment instrument.

customerId
required
string <= 50 characters

The customer's ID.

required
object

The billing address.

username
string

PayPal username.

status
string
Enum: "inactive" "active" "deactivated"

PayPal account status.

createdTime
string <date-time>

PayPal account created time.

updatedTime
string <date-time>

PayPal account updated time.

customFields
object (ResourceCustomFields)
Default: {}

Custom Fields list as a map {"custom field name": "custom field value", ...}. The format must follow the saved format (see Custom Fields section for the formats).

object (Risk metadata)

Risk metadata used for 3DS and risk scoring.

Array of SelfLink (object) or CustomerLink (object) or AuthTransactionLink (object) or ApprovalUrlLink (object) non-empty

The links related to resource.

Array of AuthTransactionEmbed (object) or CustomerEmbed (object) non-empty

Any embedded objects available that are requested by the expand querystring parameter.

Request samples

Content type
application/json
{
  • "method": "paypal",
  • "customerId": "4f6cf35x-2c4y-483z-a0a9-158621f77a21",
  • "billingAddress": {
    },
  • "customFields": {
    },
  • "riskMetadata": {
    }
}

Response samples

Content type
application/json
{
  • "id": "4f6cf35x-2c4y-483z-a0a9-158621f77a21",
  • "method": "paypal",
  • "customerId": "4f6cf35x-2c4y-483z-a0a9-158621f77a21",
  • "billingAddress": {
    },
  • "username": "string",
  • "status": "inactive",
  • "createdTime": "2019-08-24T14:15:22Z",
  • "updatedTime": "2019-08-24T14:15:22Z",
  • "customFields": {
    },
  • "riskMetadata": {
    },
  • "_links": [
    ],
  • "_embedded": [
    ]
}

Deactivate a PayPal Account

Deactivate a PayPal Account.

Authorizations:
path Parameters
id
required
string <= 50 characters ^[@~\-\.\w]+$

The resource identifier string.

header Parameters
Organization-Id
string (ResourceId) <= 50 characters
Example: 4f6cf35x-2c4y-483z-a0a9-158621f77a21

Organization identifier in scope of which need to perform request (if not specified, the default organization will be used).

Responses

Response Headers
Rate-Limit-Limit
integer

The number of allowed requests in the current period.

Rate-Limit-Remaining
integer

The number of remaining requests in the current period.

Rate-Limit-Reset
string

The date in format defined by RFC 822 when the current period will reset.

Response Schema: application/json
id
string <= 50 characters

The payment instrument ID.

method
required
string
Value: "paypal"

The method of payment instrument.

customerId
required
string <= 50 characters

The customer's ID.

required
object

The billing address.

username
string

PayPal username.

status
string
Enum: "inactive" "active" "deactivated"

PayPal account status.

createdTime
string <date-time>

PayPal account created time.

updatedTime
string <date-time>

PayPal account updated time.

customFields
object (ResourceCustomFields)
Default: {}

Custom Fields list as a map {"custom field name": "custom field value", ...}. The format must follow the saved format (see Custom Fields section for the formats).

object (Risk metadata)

Risk metadata used for 3DS and risk scoring.

Array of SelfLink (object) or CustomerLink (object) or AuthTransactionLink (object) or ApprovalUrlLink (object) non-empty

The links related to resource.

Array of AuthTransactionEmbed (object) or CustomerEmbed (object) non-empty

Any embedded objects available that are requested by the expand querystring parameter.

Request samples

$client->payPalAccounts()->deactivate('payPalAccountId');

Response samples

Content type
application/json
{
  • "id": "4f6cf35x-2c4y-483z-a0a9-158621f77a21",
  • "method": "paypal",
  • "customerId": "4f6cf35x-2c4y-483z-a0a9-158621f77a21",
  • "billingAddress": {
    },
  • "username": "string",
  • "status": "inactive",
  • "createdTime": "2019-08-24T14:15:22Z",
  • "updatedTime": "2019-08-24T14:15:22Z",
  • "customFields": {
    },
  • "riskMetadata": {
    },
  • "_links": [
    ],
  • "_embedded": [
    ]
}