Payment Resource
Create payment
This method creates payment in Paysera system. After creating payment, user should be redirected to payment confirmation page or payment should be confirmed in other ways.new
are deleted automatically 1 month after creation time.
Request
POST https://wallet.paysera.com/rest/v1/payment
Request body structure
description
items
is not provided
price
items
and price_decimal
is not provided or
if commission
is used without price_decimal
unavailable if
price_decimal
is provided
When using
commission
of type out_commission
(or decimal), price
should
be set to the amount that needs to be paid + out_commission
(or decimal) amount.
currency
items
is not provided
price_decimal
items
and price
is not provided or
if commission
is used without price
unavailable if
price_decimal
is provided
unavailable if
price
is provided
When using
commission
of type out_commission
(or decimal), price_decimal
should be set to the amount that needs to be paid + out_commission
(or decimal) amount.
commission
items
description
, price
and currency
are not provided
beneficiary
price_rules
currency
must be
also provided with this element. See data stucture of price rules below
password
freeze
It's used with one of parameter inside:
for
or until
unavailable if
freeze_for
or freeze_until
is provided
for
- freeze time in seconds. If provided, beneficiary will be unable to use received money
until the freeze time comes to end. Freeze time starts from the moment payment is confirmed, not created
until
- freeze time in UNIX timestamp. If provided, beneficiary will be unable to use
received money until the moment specified by timestamp
freeze_for
unavailable if
freeze_until
or freeze
is provided
freeze
with subparameter for
instead.
Freeze period in hours. If provided, beneficiary will be unable to use received money until the freeze period comes to end. Freeze period starts from the moment payment is confirmed, not created
freeze_until
unavailable if
freeze_for
or freeze
is provided
freeze
with subparameter until
instead.
Freeze period in UNIX timestamp. If provided, beneficiary will be unable to use received money until the moment specified by timestamp
parameters
cashback
currency
must be set if cashback
is provided.
purpose
cash
, tips
.
Item data structure
title
description
image_uri
price
price_decimal
is not provided,
unavailable if
price_decimal
is provided
currency
price_decimal
price
is not provided,
unavailable if
price
is provided
quantity
1
is used
quantity
and
price
total_price
unavailable if
total_price_decimal
is provided
quantity
and price
and price is rounded up to the next highest integer.
total_price_decimal
unavailable if
total_price
is provided
quantity
and price_decimal
and price is rounded up to the next highest integer.
parameters
Beneficiary data structure
id
unavailable if at least one other field is provided
email
unavailable if at least one other field is provided
phone
unavailable if at least one other field is provided
barcode
unavailable if at least one other field is provided
If there is a user with a specified email address or phone number (it must be confirmed and related to the wallet), the payment will be made to this user. In other case, the user will receive a registration request to the specified email address or phone number, and only after relating the address or phone number with the wallet the payment will reach it's final state.
Transfer will fail if user is not registered and won't register until reserve
,
specified when creating the transaction (defaults to 86400
seconds
from accepting the transaction).
Price rules data structure
min
choices
or min_decimal
is provided
1
if max
is provided
min_decimal
choices
or min
is provided
max
choices
or max_decimal
is provided
max_decimal
choices
or max
is provided
choices
min
or max
is provided
At least one element must be provided in price rules structure.
Default price for payment is provided in price
element. This price must be valid in provided price
rules context.
If min
is 0
, or choices
contains 0
, this payment is optional
for the user, as she can select zero as the price. Transaction must always have at least one non-optional payment.
price
element will contain user's selected price after reservation - as price can change after
transaction creation, API client should always check price
value if price_rules
was passed.
Password data structure
type
provided
, generated
value
type
is provided
,unavailable otherwise
status
pending
, unlocked
If type of the password is generated
, email or SMS message will be sent to the payer with generated
payment's password. If type is provided
, user will not be notified about the password. In any case,
passwords can be always seen in clear text when logged into Paysera account. They can be also get by API using
special OAuth scope.
Commission data structure
out_commission
out_commission_decimal
is not provided,
unavailable if
out_commission_decimal
is provided
When using
out_commission
, the price
(or decimal) parameter
should be set to the total of price
(or decimal) + out_commission
out_commission_decimal
out_commission
is not provided,
unavailable if
out_commission
is provided
When using
out_commission_decimal
, the price
(or decimal) parameter
should be set to the total of price
(or decimal) + out_commission_decimal
in_commission
in_commission_decimal
is not provided,
unavailable if
in_commission_decimal
is provided
in_commission_decimal
in_commission
is not provided,
unavailable if
in_commission
is provided
Available payment purposes
One of these purposes can be specified for the payment:
cash
- This value must be passed if this payment is as part of cash-related transaction, such as in cash-in or cash-out scenarios.
tips
- This purpose is used when this particular payment is as tips for waiter etc. This allows to provide information for the user in predefined way for such scenarios. Payment with this purpose cannot have items
element, as they will not be displayed.
Response data structure
On success API returns payment object that was created. See get payment information for more info.Errors
beneficiary_not_found
(status code 404
, only if id
was used),
limit_violation
(status code 400
),
invalid_parameters
(status code 400
, if email or phone is invalid).
Example request for payment with no items
POST /rest/v1/payment HTTP/1.1 Host: wallet.paysera.com Content-Type: application/json;charset=utf-8 User-Agent: Paysera WalletApi PHP library Authorization: MAC id="wkVd93h2uS", ts="1343811600", nonce="nQnNaSNyubfPErjRO55yaaEYo9YZfKHN", mac="Xk/+C/KOEapGtvaLjV6mKvk/0BfWydb/zlHFyoBx/Us=", ext="body_hash=esRCxyYPpkKwaNzTaj0wtFwLG6gNw%2FCHw%2FIz2j5vp7Q%3D"
{ "description": "Payment for order No. 1234", "price": 1299, "currency": "EUR", "parameters": { "orderid": 1234 } }
parameters
to relate the
payment to your services.
Example response
HTTP/1.1 200 OK Content-type: application/json;charset=utf-8
{ "id": 2987, "transaction_key": "pDAlAZ3z", "created_at": 1355314332, "status": "new", "price": 1299, "currency": "EUR", "price_decimal": "12.99", "description": "Payment for order No. 1234", "parameters": { "orderid": 1234 } }
Example request for payment with items
POST /rest/v1/payment HTTP/1.1 Host: wallet.paysera.com Content-Type: application/json;charset=utf-8 User-Agent: Paysera WalletApi PHP library Authorization: MAC id="wkVd93h2uS", ts="1343811600", nonce="nQnNaSNyubfPErjRO55yaaEYo9YZfKHN", mac="ml1uu/M6mqlXnHYdFykYxZNhVWh4XXE3sTpCZnMGbUg=", ext="body_hash=ymFtrzhE7e5e1iei0gswRnXD0iStTaHrxMH7GyyxEf8%3D"
{ "items": [ { "title": "Cape", "description": "Nice new cape for your character", "image_uri": "http://www.sxc.hu/pic/m/m/mr/mr_basmt/935633_hero.jpg", "price": 199, "currency": "EUR", "parameters": { "itemid": 12, "color": "red" } }, { "title": "Hat", "price": 49, "currency": "EUR", "quantity": 2, "parameters": { "itemid": 13, "some_other_params": [ 1, 2 ] } } ], "price": 297, "currency": "EUR", "parameters": { "userid": 222 } }
parameters
to each item and the payment itselfprice
and currency
are provided only for checking that the final price is
as you expect it to be. They are optional when items are provideditems
parameter is always an array, even when you provide just one itemExample response
HTTP/1.1 200 OK Content-type: application/json;charset=utf-8
{ "id": 2987, "transaction_key": "pDAlAZ3z", "created_at": 1355314332, "status": "new", "price": 297, "currency": "EUR", "price_decimal": "2.97", "items": [ { "title": "Cape", "description": "Nice new cape for your character", "image_uri": "http://www.sxc.hu/pic/m/m/mr/mr_basmt/935633_hero.jpg", "price": 199, "currency": "EUR", "price_decimal": "1.99", "parameters": { "itemid": 12, "color": "red" } }, { "title": "Hat", "price": 49, "currency": "EUR", "price_decimal": "0.49", "quantity": 2, "parameters": { "itemid": 13, "some_other_params": [ 1, 2 ] } } ], "parameters": { "userid": 222 } }
Example request for payment with custom beneficiary
POST /rest/v1/payment HTTP/1.1 Host: wallet.paysera.com Content-Type: application/json;charset=utf-8 User-Agent: Paysera WalletApi PHP library Authorization: MAC id="wkVd93h2uS", ts="1343811600", nonce="nQnNaSNyubfPErjRO55yaaEYo9YZfKHN", mac="ocZOi7ePtfUQIJsi9F3okN8PopUm8PpmdRwpJJHLytw=", ext="body_hash=zk4d9ErjdUudTktKi1JUukMT22WkM%2FKmSwyuzWRpHK0%3D"
{ "items": [ { "title": "Some item sold between users", "price": 2000, "currency": "EUR", "quantity": 1, "parameters": { "itemid": 102 } } ], "beneficiary": { "email": "email@example.com" }, "freeze": { "for": 604800 }, "parameters": { "from_user": 1028, "to_user": 2154 } }
Example response
HTTP/1.1 200 OK Content-type: application/json;charset=utf-8
{ "id": 2987, "transaction_key": "pDAlAZ3z", "created_at": 1355314332, "status": "new", "price": 2000, "currency": "EUR", "price_decimal": "20.00", "items": [ { "title": "Some item sold between users", "price": 2000, "currency": "EUR", "price_decimal": "20.00", "quantity": 1, "parameters": { "itemid": 102 } } ], "beneficiary": { "id": 20, "email": "email@example.com" }, "freeze": { "for": 604800 }, "parameters": { "from_user": 1028, "to_user": 2154 } }
freeze
with parameter until
field is
provided only when payment is confirmed (when status
of payment is confirmed
)id
elementExample request for payment with variable price
POST /rest/v1/payment HTTP/1.1 Host: wallet.paysera.com Content-Type: application/json;charset=utf-8 User-Agent: Paysera WalletApi PHP library Authorization: MAC id="wkVd93h2uS", ts="1343811600", nonce="nQnNaSNyubfPErjRO55yaaEYo9YZfKHN", mac="Goa6x4IWMJkN3qnL9HFdyQUKPDeKCVghxGBTCG5NAsQ=", ext="body_hash=2FQL4HY1R3Br0LfqEDimQCL5vlzrR70cSwmd7KFh5wY%3D"
{ "description": "Payment for order No. 1234", "price": 1299, "currency": "EUR", "price_rules": { "min": 100 } }
POST /rest/v1/payment HTTP/1.1 Host: wallet.paysera.com Content-Type: application/json;charset=utf-8 User-Agent: Paysera WalletApi PHP library Authorization: MAC id="wkVd93h2uS", ts="1343811600", nonce="nQnNaSNyubfPErjRO55yaaEYo9YZfKHN", mac="ZWLEQixADQOTZgDa7QrzWs6wmh/8EvIeA01qtH9cYRA=", ext="body_hash=1ktVxvRq45EWbb5owOc0gnpib%2BoHDTtkL65%2FqcqJKq8%3D"
{ "description": "Payment for order No. 1234", "price": 500, "currency": "EUR", "price_rules": { "choices": [ 100, 200, 500, 1000 ] } }
Example request for payment with commission
POST /rest/v1/payment HTTP/1.1 Host: wallet.paysera.com Content-Type: application/json;charset=utf-8 User-Agent: Paysera WalletApi PHP library Authorization: MAC id="wkVd93h2uS", ts="1343811600", nonce="nQnNaSNyubfPErjRO55yaaEYo9YZfKHN", mac="MGE1UrY1nukCx98HOxuH0M0QMggrLNVEiqt2Upnfd0U=", ext="body_hash=4gWgSZ14DrAc5qIpaN7NWjd46YnlsTMHsBMa1shJ1Ao%3D"
{ "description": "Payment for order No. 1234", "price": 1099, "currency": "EUR", "parameters": { "orderid": 1234 }, "commission": { "out_commission": 100 } }
commission
are available to use: out_commission
and in_commission
out_commission
- When using
out_commission
, theprice
parameter should be set to the total amount that needs to be paid, i.e.price
+out_commission
. - The price of this payment is 9 EUR and 99 cents + 1 EUR
out_commission
= 10 EUR and 99 cents in total. - The payer will pay 10.99 EUR and the receiver will receive 9.99 EUR.
- For
in_commission
, theprice
does not change. - The
in_commission
will be taken from the receiver's account - If the
price
is 9.99 EUR andin_commission
is 1 EUR, the payer will pay 9.99 EUR, but the receiver will receive 8.99 EUR
commission
to use?
-
out_commission
if the commission has to be paid by the payer. -
in_commission
if the commission has to be paid by the receiver.
Example response
HTTP/1.1 200 OK Content-type: application/json;charset=utf-8
{ "id": 2987, "transaction_key": "pDAlAZ3z", "created_at": 1355314332, "status": "new", "price": 1099, "currency": "EUR", "price_decimal": "10.99", "description": "Payment for order No. 1234", "parameters": { "orderid": 1234 }, "commission": { "out_commission_decimal": "1.00", "out_commission": 100 } }
Get payment information
This method returns payment information that was created earlier. Payment information can change in time, because it contains status field.Request
GET https://wallet.paysera.com/rest/v1/payment/:id
Parameters
id - id of payment. Can be requested by other API methods or get from payment creation response
Response data structure
id
created_at
status
new
, waiting
, waiting_funds
,
waiting_registration
, waiting_password
, revoked
, rejected
,
failed
, reserved
,confirmed
, done
, canceled
,
deleted
price
price
that was
provided when creating the payment or the sum of all amounts in items of this payment.
If payment is not yet done and price_rules
was provided, this is user's selected price for this
payment. If final price was provided when finalizing the payment, this is the final price of this payment
currency
price_decimal
price_decimal
that was provided when creating the payment or the sum of all amounts in items of this payment.
If payment is not yet done and price_rules
was provided, this is user's selected price for this
payment. If final price was provided when finalizing the payment, this is the final price of this payment
wallet
always if
status
is reserved
,
confirmed
, done
or canceled
beneficiary
email
or phone
identificator
was used, can also contain id
field if beneficiary is already resolved
price_rules
password
confirmed_at
status
is confirmed
, done
or canceled
freeze
It's used with one of parameter inside:
for
or until
for
- freeze time in seconds. If provided, beneficiary will be unable to use received money
until the freeze time comes to end. Freeze time starts from the moment payment is confirmed, not created
until
- freeze time in UNIX timestamp. If provided, beneficiary will be unable to use
received money until the moment specified by timestamp
freeze_until
status
is confirmed
or it was provided when creating the payment
freeze
with subparameter until
instead.
Date in UNIX timestamp until when the payment is frozen. After that time beneficiary (provided by
beneficiary
parameter or yourself in other case) can use the money
freeze_for
freeze
with subparameter for
instead.
Same as provided when creating the payment
description
items
parameters
cashback
transfer_id
status
is one of reserved
, confirmed
,
done
, canceled
purpose
purpose
values, specifying purpose of this payment
Meaning of payment status codes
Status of payment is always the same as of it's transaction with one exception: if transaction is confirmed
,
payment can be confirmed
, done
or canceled
.
done
.
confirmed
- Payment is accepted by the user and confirmed by you. Both buyer and seller sees this payment, but the incoming funds of this payment is frozen for the seller
done
- Payment is successfully made, money is no longer frozen
canceled
- Payment was confirmed and canceled after that. Money has been returned to payer
new
can change their current transaction
Example request
GET /rest/v1/payment/10145 HTTP/1.1 Host: wallet.paysera.com User-Agent: Paysera WalletApi PHP library Authorization: MAC id="wkVd93h2uS", ts="1343811600", nonce="nQnNaSNyubfPErjRO55yaaEYo9YZfKHN", mac="/qxTA8FOgT0Dd0MHh9k/sUQ3Q38ckx8+S0PBxpIuttY="
Example response
HTTP/1.1 200 OK Content-type: application/json;charset=utf-8
{ "id": 10145, "transaction_key": "pDAlAZ3z", "created_at": 1355314332, "status": "confirmed", "price": 1299, "currency": "EUR", "price_decimal": "12.99", "wallet": 14471, "confirmed_at": 1355314392, "freeze": { "until": 1357992732 }, "items": [ { "title": "Item", "price": 1499, "price_decimal": "14.99", "currency": "EUR" }, { "title": "Other item", "price": 299, "price_decimal": "2.99", "quantity": 2, "currency": "EUR" } ], "transfer_id": 87745, "purpose": "cash" }
freeze
with subparameter until
is the date until when the money is frozen.
The money is frozen if payment is made to custom beneficiary
or if your service agreement
with Paysera system is set to freeze money for some amount of time
Cancel payment
This method cancels already confirmed payment.status
of the payment must be confirmed
,
that is, it must not be already done
. After canceling payment, it's status
is changed
to canceled
and money is returned to payer.
Request
DELETE https://wallet.paysera.com/rest/v1/payment/:id
Parameters
id - id of payment. Can be requested by other API methods or get from payment creation response
Response data structure
On success API returns payment object that was created. See get payment information for more info.Errors
invalid_state
if status
of payment does not allow canceling it.
Example request
DELETE /rest/v1/payment/10145 HTTP/1.1 Host: wallet.paysera.com User-Agent: Paysera WalletApi PHP library Authorization: MAC id="wkVd93h2uS", ts="1343811600", nonce="nQnNaSNyubfPErjRO55yaaEYo9YZfKHN", mac="0EQCX0q4AbBlSlT6QHTjqEX27O73Tm1ewvTIRWj5RLw="
Example response
HTTP/1.1 200 OK Content-type: application/json;charset=utf-8
{ "id": 10145, "transaction_key": "pDAlAZ3z", "created_at": 1355314332, "status": "canceled", "price": 1499, "currency": "EUR", "price_decimal": "14.99", "wallet": 1012, "confirmed_at": 1355314392, "description": "payment B", "transfer_id": 578842 }
Change freeze time
Freeze time can be changed only if the paymentstatus
is confirmed
and
freeze
was provided when creating the payment.
That is, if freeze time has been set and hasn't yet ended.
Request
PUT https://wallet.paysera.com/rest/v1/payment/:id/freeze
Parameters
id - id of payment. Can be requested by other API methods or get from payment creation response
Request body structure
freeze
freeze_for
or freeze_until
is not provided
It's used with one of parameter inside:
for
or until
unavailable if
freeze_for
or freeze
is provided
for
- freeze time in seconds. If provided, beneficiary will be unable to use received money
until the freeze time comes to end. Freeze time starts from the moment payment is confirmed, not created
until
- freeze time in UNIX timestamp. If provided, beneficiary will be unable to use
received money until the moment specified by timestamp
freeze_until
freeze_for
or freeze
is not provided
unavailable if
freeze_for
or freeze
is provided
freeze
with subparameter until
instead.
Date in UNIX timestamp until when the freeze time should be set. Only dates in the future are accepted or value
0
freeze_for
freeze_until
or freeze
is not provided is not provided
unavailable if
freeze_until
or freeze
is provided
freeze
with subparameter for
instead.
Period in hours for which freeze time should be extended
freeze
parameter until
to 0
if you want to unfreeze the money.
You can also finalize payment to get the same result.
Response data structure
On success API returns corresponding payment object. See get payment information for more info.confirmed
state if the money is still frozenfreeze
with subparameter until
can be different than provided one. If your service
agreement in Paysera system sets default freeze time, the maximum of calculated default freeze time and provided
freeze
with subparameter until
is taken into account
Example request
PUT /rest/v1/payment/10145/freeze HTTP/1.1 Host: wallet.paysera.com Content-Type: application/json;charset=utf-8 User-Agent: Paysera WalletApi PHP library Authorization: MAC id="wkVd93h2uS", ts="1343811600", nonce="nQnNaSNyubfPErjRO55yaaEYo9YZfKHN", mac="ntzA+iY4wHWtKbITubjVY2p8/qy8uZMFooq4Ewda4QM=", ext="body_hash=8kaZahF2OEJXFX070ZE0q6BpDF3TzHfWHIWyyZoNZLc%3D"
{ "freeze": { "until": 1357992732 } }
Example request to extend freeze time
PUT /rest/v1/payment/10145/freeze HTTP/1.1 Host: wallet.paysera.com Content-Type: application/json;charset=utf-8 User-Agent: Paysera WalletApi PHP library Authorization: MAC id="wkVd93h2uS", ts="1343811600", nonce="nQnNaSNyubfPErjRO55yaaEYo9YZfKHN", mac="Dcl8faZlyEvM2w3WPUBtXj7H2Fq4DZk/yY13dPVZMcQ=", ext="body_hash=1eDY9X1raQho8Klxshppa%2BiDX2ql2%2FVqZLMHOwdvYlA%3D"
{ "freeze": { "for": 604800 } }
Example response
HTTP/1.1 200 OK Content-type: application/json;charset=utf-8
{ "id": 10145, "transaction_key": "pDAlAZ3z", "created_at": 1355314332, "status": "confirmed", "price": 1299, "currency": "EUR", "price_decimal": "12.99", "wallet": 14471, "confirmed_at": 1355314392, "freeze": { "until": 1357992732 }, "description": "Payment for order No. 1234" }
Example request to unfreeze money
PUT /rest/v1/payment/10145/freeze HTTP/1.1 Host: wallet.paysera.com Content-Type: application/json;charset=utf-8 User-Agent: Paysera WalletApi PHP library Authorization: MAC id="wkVd93h2uS", ts="1343811600", nonce="nQnNaSNyubfPErjRO55yaaEYo9YZfKHN", mac="0zGnMC77c3lRRDgSTqr8My4GQKGPIr/b2D1teR6VqiU=", ext="body_hash=aGFASfppuNJZ3Hn9aON62J4MnmIJiHVQ%2BlPjnqAcGqI%3D"
{ "freeze": { "until": 0 } }
Example response
HTTP/1.1 200 OK Content-type: application/json;charset=utf-8
{ "id": 10145, "transaction_key": "pDAlAZ3z", "created_at": 1355314332, "status": "done", "price": 1299, "currency": "EUR", "price_decimal": "12.99", "wallet": 14471, "confirmed_at": 1355314392, "description": "Payment for order No. 1234", "transfer_id": 578842 }
Finalize payment
Payment can be finalized only when it's status
is confirmed
and
freeze
was provided when creating the payment.
That is, if freeze time has been set and hasn't yet ended.
When finalizing the payment, you can specify a final payment price, which is smaller than the original. In this case, difference between final and original prices is returned back to the payer.
Request
PUT https://wallet.paysera.com/rest/v1/payment/:id/finalize
Parameters
id - id of payment. Can be requested by other API methods or get from payment creation response
Request body structure
Request body is optional in this request.price
price_decimal
is not provided,
unavailable if
price_decimal
is provided
currency
price_decimal
price
is not provided,
unavailable if
price
is provided
0
.
Response data structure
On success API returns corresponding payment object. See get payment information for more info.Example request
PUT /rest/v1/payment/10145/finalize HTTP/1.1 Host: wallet.paysera.com Content-Type: application/json;charset=utf-8 User-Agent: Paysera WalletApi PHP library Authorization: MAC id="wkVd93h2uS", ts="1343811600", nonce="nQnNaSNyubfPErjRO55yaaEYo9YZfKHN", mac="uxvhqCv99gwrnPUX0O70Qhoog1QMN5mm9qAs+JOCRQ0=", ext="body_hash=hHVrOkPtrvtmFKNWKEsktgv6Dx%2F7WbDEtg93yHvcRtw%3D"
{ "price": 299, "currency": "EUR" }
Example response
HTTP/1.1 200 OK Content-type: application/json;charset=utf-8
{ "id": 10145, "transaction_key": "pDAlAZ3z", "created_at": 1355314332, "status": "done", "price": 299, "currency": "EUR", "price_decimal": "2.99", "wallet": 14471, "confirmed_at": 1355314392, "description": "Payment for order No. 1234", "transfer_id": 578842 }
Provide password for a payment
When payment's status
is waiting_password
, password can be provided for this payment
by API. Password can be also provided by using OAuth-related API call or in Paysera system, so payment can
be unlocked not only using this method.
Request
PUT https://wallet.paysera.com/rest/v1/payment/:id/password
Parameters
id - id of payment. Can be requested by other API methods or get from payment creation response
Request body structure
password
Response data structure
On success API returns corresponding payment object. See get payment information for more info.Example request
PUT /rest/v1/payment/10145/payment HTTP/1.1 Host: wallet.paysera.com Content-Type: application/json;charset=utf-8 User-Agent: Paysera WalletApi PHP library Authorization: MAC id="wkVd93h2uS", ts="1343811600", nonce="nQnNaSNyubfPErjRO55yaaEYo9YZfKHN", mac="42yf4XxAHFNvbNqmFJuIHlt/l2U3iljodEhVG+dxwds=", ext="body_hash=AGR2TJUZ%2BQBepUliLhilu7TBof4cYOrF7mFQdqwZO4o%3D"
{ "password": "some secret" }
Example response
HTTP/1.1 200 OK Content-type: application/json;charset=utf-8
{ "id": 10145, "transaction_key": "pDAlAZ3z", "created_at": 1355314332, "status": "reserved", "price": 299, "currency": "EUR", "price_decimal": "2.99", "wallet": 14471, "description": "Payment for order No. 1234", "password": { "type": "provided", "status": "unlocked" }, "transfer_id": 578842 }
Search payments
This method returns payment ID list by provided filters.Request
GET https://wallet.paysera.com/rest/v1/payments/id?status=:status&wallet=:wallet&beneficiary=:beneficiary
Parameters
status
- optional; status of payment to search for. Can be any of default payment statuses (see get payment information response data structure), except deleted
wallet - optional; ID of the wallet in Paysera system which confirmed the payment.
beneficiary
- optional; same as provided when creating payments. Use value none
to search for those payments that have no beneficiary
Response data structure
Response is array of integers - list of found payments' IDsExample request when searching for new payments
GET /rest/v1/payments/id?status=new HTTP/1.1 Host: wallet.paysera.com User-Agent: Paysera WalletApi PHP library Authorization: MAC id="wkVd93h2uS", ts="1343811600", nonce="nQnNaSNyubfPErjRO55yaaEYo9YZfKHN", mac="1au9XvlfPKgYcFy7BXqGRIhsGnXXhGFFJFK8hQhq4Kc="
Example request when searching for payments that were successfuly made to yourself
GET /rest/v1/payments/id?beneficiary=none&status=done HTTP/1.1 Host: wallet.paysera.com User-Agent: Paysera WalletApi PHP library Authorization: MAC id="wkVd93h2uS", ts="1343811600", nonce="nQnNaSNyubfPErjRO55yaaEYo9YZfKHN", mac="By1q0FSjW1UlhGH9mRykpteA50Rr+WWm8spKmxH1znM="
Example response
HTTP/1.1 200 OK Content-type: application/json;charset=utf-8
[ 1278, 1992, 2012, 3012 ]