Menu

## Payment extends Entity
in package

Payment.php : 23

This class provides the methods to access the API that will allow you to create your own payment experience on your website.

From basic to advanced configurations, you control the whole experience.

##### Tags

link

  Click here for more infos

RestMethod

  (resource="/v1/payments", method="create")

RestMethod

  (resource="/v1/payments/:id", method="read")

RestMethod

  (resource="/v1/payments/search", method="search")

RestMethod

  (resource="/v1/payments/:id", method="update")

RestMethod

  (resource="/v1/payments/:id/refunds", method="refund")

### Table of Contents

$_custom_headers : mixed
$_empty : mixed
$_last : mixed
$_manager : mixed
$_pagination_params : mixed
$acquirer : string
  acquirer
$acquirer_reconciliation : string
  acquirer_reconciliation
$additional_info : array<string|int, mixed>
  additional_info
$amount_refunded : float
  amount_refunded
$application_fee : float
  application_fee
$authorization_code : string
  authorization_code
$barcode : string
  barcode
$binary_mode : bool
  binary_mode
$call_for_authorize_id : string
  call_for_authorize_id
$callback_url : string
  callback_url
$campaign_id : string
  campaign_id
$capture : bool
  capture
$captured : bool
  captured
$card : int
  card
$charges_details : object
  charges details
$collector : object
  collector
$collector_id : int
  collector_id
$corporation_id : string
  corporation_id
$counter_currency : string
  counter_currency
$coupon_amount : float
  coupon_amount
$coupon_code : string
  coupon_code
$currency_id : string
  currency_id
$date_approved : DateTime
  date_approved
$date_created : DateTime
  date_created
$date_last_updated : DateTime
  date_last_update
$date_of_expiration : DateTime
  date_of_expiration
$deduction_schema : string
  deduction_schema
$description : string
  description
$differential_pricing_id : int
  differential_pricing_id
$error : mixed
$external_reference : string
  external_reference
$fee_details : object
  fee_details
$finance_charge : float
  finance_charge
$id : int
  id
$installments : int
  installments
$integrator_id : string
  integrator_id
$issuer_id : string
  issuer_id
$last_modified : DateTime
  last_modified
$live_mode : bool
  live_mode
$marketplace : string
  marketplace
$marketplace_fee : float
  marketplace_fee
$marketplace_owner : int
  marketplace_owner
$merchant_account_id : int
  merchant_account_id
$merchant_number : int
  merchant_number
$metadata : object
  metadata
$money_release_date : DateTime
  money_release_date
$money_release_schema : string
  money_release_schema
$net_amount : float
  net_amount
$net_received_amount : float
  net_received_amount
$notification_url : string
  notification_url
$operation_type : string
  operation_type
$order : int
  order
$order_id : int
  order_id
$payer : object
  payer
$payment_method_id : string
  payment_method_id
$payment_type : string
  payment_type
$payment_type_id : string
  payment_type_id
$platform_id : string
  platform_id
$pos_id : string
  pos_id
$processing_mode : string
  processing_mode
$reason : string
  reason
$refunds : object
  refunds
$shipping_amount : float
  Shipping_amount
$shipping_cost : float
  shipping_cost
$site_id : string
  site_id
$sponsor_id : int
  sponsor_id
$statement_descriptor : string
  statement_descriptor
$status : string
  status
$status_detail : string
  status_detail
$store_id : int
  store_id
$taxes : array<string|int, mixed>
  taxes
$taxes_amount : float
  taxes_amount
$token : string
  token
$total_paid_amount : float
  total_paid_amount
$transaction_amount : float
  transaction_amount
$transaction_amount_refunded : float
  transaction_amount_refunded
$transaction_details : object
  transaction_details
__construct() : mixed
  Entity constructor.
__get() : mixed
__isset() : bool
__set() : mixed
all() : mixed
APCIteratorAll() : mixed
capture() : Payment
  capture
custom_action() : mixed
delete() : mixed
destroy() : mixed
Error() : mixed
find_by_id() : mixed
get() : mixed
getAttributes() : array<string|int, mixed>
getCustomHeader() : mixed
getCustomHeaders() : mixed
not_found() : mixed
process_error_body() : mixed
read() : mixed
refund() : bool
  refund
save() : mixed
search() : mixed
setCustomHeader() : mixed
setCustomHeadersFromArray() : mixed
setManager() : mixed
toArray() : array<string|int, mixed>
unSetManager() : mixed
update() : mixed
_camelize() : mixed
_fillFromArray() : mixed
  Fill entity from data with nested object creation
_getDynamicAttributeDenied() : mixed
_getPropertyType() : mixed
_propertyExists() : bool
_propertyTypeAllowed() : bool
_setValue() : mixed
tryFormat() : array<string|int, mixed>|bool|float|int|string

### Properties

#### $_custom_headers

Entity.php : 16
`protected static mixed $_custom_headers = array()`

#### $_empty

Entity.php : 27
`protected mixed $_empty = false`

##### Tags

Attribute

  (serialize = false)

#### $_last

Entity.php : 21
`protected mixed $_last`

##### Tags

Attribute

  (serialize = false)

#### $_manager

Entity.php : 17
`protected static mixed $_manager`

#### $_pagination_params

Entity.php : 23
`protected mixed $_pagination_params`

#### $acquirer

Payment.php : 38

acquirer

`protected string $acquirer`

##### Tags

Attribute

  ()

#### $acquirer_reconciliation

Payment.php : 45

acquirer_reconciliation

`protected string $acquirer_reconciliation`

##### Tags

Attribute

  ()

#### $additional_info

Payment.php : 402

additional_info

`protected array<string|int, mixed> $additional_info`

##### Tags

Attribute

  ()

#### $amount_refunded

Payment.php : 493

amount_refunded

`protected float $amount_refunded`

##### Tags

Attribute

  ()

#### $application_fee

Payment.php : 339

application_fee

`protected float $application_fee`

##### Tags

Attribute

  ()

#### $authorization_code

Payment.php : 346

authorization_code

`protected string $authorization_code`

##### Tags

Attribute

  ()

#### $barcode

Payment.php : 507

barcode

`protected string $barcode`

##### Tags

Attribute

  ()

#### $binary_mode

Payment.php : 87

binary_mode

`protected bool $binary_mode`

##### Tags

Attribute

  ()

#### $call_for_authorize_id

Payment.php : 374

call_for_authorize_id

`protected string $call_for_authorize_id`

##### Tags

Attribute

  ()

#### $callback_url

Payment.php : 486

callback_url

`protected string $callback_url`

##### Tags

Attribute

  ()

#### $campaign_id

Payment.php : 409

campaign_id

`protected string $campaign_id`

##### Tags

Attribute

  ()

#### $capture

Payment.php : 353

capture

`protected bool $capture`

##### Tags

Attribute

  ()

#### $captured

Payment.php : 360

captured

`protected bool $captured`

##### Tags

Attribute

  ()

#### $card

Payment.php : 367

card

`protected int $card`

##### Tags

Attribute

  ()

#### $charges_details

Payment.php : 542

charges details

`protected object $charges_details`

##### Tags

Attribute

  ()

#### $collector

Payment.php : 276

collector

`protected object $collector`

##### Tags

Attribute

  ()

#### $collector_id

Payment.php : 283

collector_id

`protected int $collector_id`

##### Tags

Attribute

  ()

#### $corporation_id

Payment.php : 528

corporation_id

`protected string $corporation_id`

##### Tags

Attribute

  ()

#### $counter_currency

Payment.php : 290

counter_currency

`protected string $counter_currency`

##### Tags

Attribute

  ()

#### $coupon_amount

Payment.php : 416

coupon_amount

`protected float $coupon_amount`

##### Tags

Attribute

  ()

#### $coupon_code

Payment.php : 500

coupon_code

`protected string $coupon_code`

##### Tags

Attribute

  ()

#### $currency_id

Payment.php : 199

currency_id

`protected string $currency_id`

##### Tags

Attribute

  ()

#### $date_approved

Payment.php : 178

date_approved

`protected DateTime $date_approved`

##### Tags

Attribute

  ()

#### $date_created

Payment.php : 136

date_created

`protected DateTime $date_created`

##### Tags

Attribute

  ()

#### $date_last_updated

Payment.php : 157

date_last_update

`protected DateTime $date_last_updated`

##### Tags

Attribute

  ()

#### $date_of_expiration

Payment.php : 164

date_of_expiration

`protected DateTime $date_of_expiration`

##### Tags

Attribute

  ()

#### $deduction_schema

Payment.php : 171

deduction_schema

`protected string $deduction_schema`

##### Tags

Attribute

  ()

#### $description

Payment.php : 437

description

`protected string $description`

##### Tags

Attribute

  ()

#### $differential_pricing_id

Payment.php : 332

differential_pricing_id

`protected int $differential_pricing_id`

##### Tags

Attribute

  ()

#### $error

Entity.php : 22
`protected mixed $error`

#### $external_reference

Payment.php : 94

external_reference

`protected string $external_reference`

##### Tags

Attribute

  ()

#### $fee_details

Payment.php : 325

fee_details

`protected object $fee_details`

##### Tags

Attribute

  ()

#### $finance_charge

Payment.php : 234

finance_charge

`protected float $finance_charge`

##### Tags

Attribute

  (type = "float")

#### $id

Payment.php : 31

id

`protected int $id`

##### Tags

Attribute

  (primaryKey = true)

#### $installments

Payment.php : 423

installments

`protected int $installments`

##### Tags

Attribute

  (type = "int")

#### $integrator_id

Payment.php : 521

integrator_id

`protected string $integrator_id`

##### Tags

Attribute

  ()

#### $issuer_id

Payment.php : 451

issuer_id

`protected string $issuer_id`

##### Tags

Attribute

  ()

#### $last_modified

Payment.php : 143

last_modified

`protected DateTime $last_modified`

##### Tags

Attribute

  ()

#### $live_mode

Payment.php : 150

live_mode

`protected bool $live_mode`

##### Tags

Attribute

  ()

#### $marketplace

Payment.php : 248

marketplace

`protected string $marketplace`

##### Tags

Attribute

  ()

#### $marketplace_fee

Payment.php : 255

marketplace_fee

`protected float $marketplace_fee`

##### Tags

Attribute

  (type = "float")

#### $marketplace_owner

Payment.php : 514

marketplace_owner

`protected int $marketplace_owner`

##### Tags

Attribute

  ()

#### $merchant_account_id

Payment.php : 465

merchant_account_id

`protected int $merchant_account_id`

##### Tags

Attribute

  ()

#### $merchant_number

Payment.php : 472

merchant_number

`protected int $merchant_number`

##### Tags

Attribute

  ()

#### $metadata

Payment.php : 479

metadata

`protected object $metadata`

##### Tags

Attribute

  ()

#### $money_release_date

Payment.php : 185

money_release_date

`protected DateTime $money_release_date`

##### Tags

Attribute

  ()

#### $money_release_schema

Payment.php : 192

money_release_schema

`protected string $money_release_schema`

##### Tags

Attribute

  ()

#### $net_amount

Payment.php : 556

net_amount

`protected float $net_amount`

##### Tags

Attribute

  (type = "float")

#### $net_received_amount

Payment.php : 241

net_received_amount

`protected float $net_received_amount`

##### Tags

Attribute

  ()

#### $notification_url

Payment.php : 444

notification_url

`protected string $notification_url`

##### Tags

Attribute

  ()

#### $operation_type

Payment.php : 66

operation_type

`protected string $operation_type`

##### Tags

Attribute

  ()

#### $order

Payment.php : 80

order

`protected int $order`

##### Tags

Attribute

  ()

#### $order_id

Payment.php : 73

order_id

`protected int $order_id`

##### Tags

Attribute

  (idempotency = true)

#### $payer

Payment.php : 269

payer

`protected object $payer`

##### Tags

Attribute

  ()

#### $payment_method_id

Payment.php : 297

payment_method_id

`protected string $payment_method_id`

##### Tags

Attribute

  ()

#### $payment_type

Payment.php : 129

payment_type

`protected string $payment_type`

##### Tags

Attribute

  (type = "string")

#### $payment_type_id

Payment.php : 304

payment_type_id

`protected string $payment_type_id`

##### Tags

Attribute

  ()

#### $platform_id

Payment.php : 535

platform_id

`protected string $platform_id`

##### Tags

Attribute

  ()

#### $pos_id

Payment.php : 311

pos_id

`protected string $pos_id`

##### Tags

Attribute

  ()

#### $processing_mode

Payment.php : 458

processing_mode

`protected string $processing_mode`

##### Tags

Attribute

  ()

#### $reason

Payment.php : 262

reason

`protected string $reason`

##### Tags

Attribute

  ()

#### $refunds

Payment.php : 388

refunds

`protected object $refunds`

##### Tags

Attribute

  ()

#### $shipping_amount

Payment.php : 395

Shipping_amount

`protected float $shipping_amount`

##### Tags

Attribute

  ()

#### $shipping_cost

Payment.php : 220

shipping_cost

`protected float $shipping_cost`

##### Tags

Attribute

  ()

#### $site_id

Payment.php : 52

site_id

`protected string $site_id`

##### Tags

Attribute

  (idempotency = true)

#### $sponsor_id

Payment.php : 59

sponsor_id

`protected int $sponsor_id`

##### Tags

Attribute

  ()

#### $statement_descriptor

Payment.php : 381

statement_descriptor

`protected string $statement_descriptor`

##### Tags

Attribute

  ()

#### $status

Payment.php : 101

status

`protected string $status`

##### Tags

Attribute

  ()

#### $status_detail

Payment.php : 108

status_detail

`protected string $status_detail`

##### Tags

Attribute

  ()

#### $store_id

Payment.php : 115

store_id

`protected int $store_id`

##### Tags

Attribute

  ()

#### $taxes

Payment.php : 549

taxes

`protected array<string|int, mixed> $taxes`

##### Tags

Attribute

  (type = "array")

#### $taxes_amount

Payment.php : 122

taxes_amount

`protected float $taxes_amount`

##### Tags

Attribute

  ()

#### $token

Payment.php : 430

token

`protected string $token`

##### Tags

Attribute

  ()

#### $total_paid_amount

Payment.php : 227

total_paid_amount

`protected float $total_paid_amount`

##### Tags

Attribute

  (idempotency = true)

#### $transaction_amount

Payment.php : 206

transaction_amount

`protected float $transaction_amount`

##### Tags

Attribute

  (type = "float")

#### $transaction_amount_refunded

Payment.php : 213

transaction_amount_refunded

`protected float $transaction_amount_refunded`

##### Tags

Attribute

  (type = "float")

#### $transaction_details

Payment.php : 318

transaction_details

`protected object $transaction_details`

##### Tags

Attribute

  ()

### Methods

#### __construct()

Entity.php : 35

Entity constructor.

`public __construct([array<string|int, mixed> $params = [] ]) : mixed`

##### Parameters

$params : array<string|int, mixed> = []

##### Tags

throws
  Exception

##### Return values

mixed —

#### __get()

Entity.php : 287
`public __get( $name) : mixed`

##### Parameters

$name :

##### Return values

mixed —

#### __isset()

Entity.php : 299
`public __isset( $name) : bool`

##### Parameters

$name :

##### Return values

bool —

#### __set()

Entity.php : 310
`public __set( $name, $value) : mixed`

##### Parameters

$name :
$value :

##### Tags

throws
  Exception

##### Return values

mixed —

#### all()

Entity.php : 134
`public static all([mixed $options = [] ]) : mixed`

##### Parameters

$options : mixed = []

##### Return values

mixed —

#### APCIteratorAll()

Entity.php : 196
`public APCIteratorAll() : mixed`

##### Tags

codeCoverageIgnore

##### Return values

mixed —

#### capture()

Payment.php : 586

capture

`public capture(int $amount) : Payment`

##### Parameters

$amount : int

##### Tags

throws
  Exception

##### Return values

Payment —

#### custom_action()

Entity.php : 237
`public custom_action(mixed $method, mixed $action) : mixed`

##### Parameters

$method : mixed
$action : mixed

##### Return values

mixed —

#### delete()

Entity.php : 501
`public delete([mixed $options = [] ]) : mixed`

##### Parameters

$options : mixed = []

##### Return values

mixed —

#### destroy()

Entity.php : 229
`public static destroy() : mixed`

##### Tags

codeCoverageIgnore

##### Return values

mixed —

#### Error()

Entity.php : 46
`public Error() : mixed`

##### Return values

mixed —

#### find_by_id()

Entity.php : 73
`public static find_by_id(mixed $id) : mixed`

##### Parameters

$id : mixed

##### Return values

mixed —

#### get()

Entity.php : 66
`public static get(mixed $id) : mixed`

##### Parameters

$id : mixed

##### Return values

mixed —

#### getAttributes()

Entity.php : 320
`public getAttributes() : array<string|int, mixed>`

##### Return values

array<string|int, mixed> —

#### getCustomHeader()

Entity.php : 81
`public static getCustomHeader(mixed $key) : mixed`

##### Parameters

$key : mixed

##### Return values

mixed —

#### getCustomHeaders()

Entity.php : 90
`public static getCustomHeaders() : mixed`

##### Return values

mixed —

#### not_found()

Entity.php : 98
`public not_found() : mixed`

##### Return values

mixed —

#### process_error_body()

Entity.php : 272
`public process_error_body(mixed $message) : mixed`

##### Parameters

$message : mixed

##### Return values

mixed —

#### read()

Entity.php : 106
`public static read([mixed $params = [] ][, mixed $options = [] ]) : mixed`

##### Parameters

$params : mixed = []
$options : mixed = []

##### Return values

mixed —

#### refund()

Payment.php : 564

refund

`public refund(int $amount) : bool`

##### Parameters

$amount : int

##### Tags

throws
  Exception

##### Return values

bool —

#### save()

Entity.php : 251
`public save([mixed $options = [] ]) : mixed`

##### Parameters

$options : mixed = []

##### Return values

mixed —

#### search()

Entity.php : 163
`public static search([mixed $filters = [] ][, mixed $options = [] ]) : mixed`

##### Parameters

$filters : mixed = []
$options : mixed = []

##### Return values

mixed —

#### setCustomHeader()

Entity.php : 77
`public static setCustomHeader(mixed $key, mixed $value) : mixed`

##### Parameters

$key : mixed
$value : mixed

##### Return values

mixed —

#### setCustomHeadersFromArray()

Entity.php : 85
`public static setCustomHeadersFromArray(mixed $array) : mixed`

##### Parameters

$array : mixed

##### Return values

mixed —

#### setManager()

Entity.php : 53
`public static setManager(Manager $manager) : mixed`

##### Parameters

$manager : Manager

##### Return values

mixed —

#### toArray()

Entity.php : 328
`public toArray([null $attributes = null ]) : array<string|int, mixed>`

##### Parameters

$attributes : null = null

##### Return values

array<string|int, mixed> —

#### unSetManager()

Entity.php : 59
`public static unSetManager() : mixed`

##### Return values

mixed —

#### update()

Entity.php : 205
`public update([mixed $options = [] ]) : mixed`

##### Parameters

$options : mixed = []

##### Return values

mixed —

#### _camelize()

Entity.php : 495
`protected _camelize( $input[, string $separator = '_' ]) : mixed`

##### Parameters

$input :
$separator : string = '_'

##### Return values

mixed —

#### _fillFromArray()

Entity.php : 467

Fill entity from data with nested object creation

`protected _fillFromArray( $entity, $data) : mixed`

##### Parameters

$entity :
$data :

##### Return values

mixed —

#### _getDynamicAttributeDenied()

Entity.php : 415
`protected _getDynamicAttributeDenied() : mixed`

##### Return values

mixed —

#### _getPropertyType()

Entity.php : 408
`protected _getPropertyType( $property) : mixed`

##### Parameters

$property :

##### Return values

mixed —

#### _propertyExists()

Entity.php : 382
`protected _propertyExists( $property) : bool`

##### Parameters

$property :

##### Return values

bool —

#### _propertyTypeAllowed()

Entity.php : 392
`protected _propertyTypeAllowed( $property, $type) : bool`

##### Parameters

$property :
$type :

##### Return values

bool —

#### _setValue()

Entity.php : 359
`protected _setValue( $property, $value[, mixed $validate = true ]) : mixed`

##### Parameters

$property :
$value :
$validate : mixed = true

##### Tags

throws
  Exception

##### Return values

mixed —

#### tryFormat()

Entity.php : 427
`protected tryFormat( $value, $type, $property) : array<string|int, mixed>|bool|float|int|string`

##### Parameters

$value :
$type :
$property :

##### Tags

throws
  Exception

##### Return values

array<string|int, mixed>|bool|float|int|string —

## Search results