Информация Извините, эта глава доступна только на английском языке.

Transfer API allows initiating transfers between your Paysera account and either Paysera or another bank account. API allows creating manual Transfers just like in regular Paysera system. It's possible to automate the process of creating a transfer and allow you to manually sign the transfer in the future in the Paysera system, your system would be able to track the status of created transfers.

Payment creation integration diagram

Integration

1. Create transfer

With a library
  1. <?php
  2.  
  3. use PayseraClientTransfersClientClientFactory;
  4. use PayseraClientTransfersClientEntity as Entities;
  5.  
  6. $clientFactory = new ClientFactory([
  7. 'base_url' => 'https://wallet.paysera.com/transfer/rest/v1/',
  8. 'mac' => [
  9. 'mac_id' => 'mac_id',
  10. 'mac_secret' => 'mac_password',
  11. ],
  12. ]);
  13.  
  14. $transfersClient = $clientFactory->getTransfersClient();
  15.  
  16. $transferInput = (new EntitiesTransferInput())
  17. ->setAmount($amount)
  18. ->setBeneficiary($beneficiary)
  19. ->setPayer($payer)
  20. ->setFinalBeneficiary($finalBeneficiary)
  21. ->setPerformAt($performAt)
  22. ->setChargeType($chargeType)
  23. ->setUrgency($urgency)
  24. ->setNotifications($notifications)
  25. ->setPurpose($purpose)
  26. ->setPassword($password)
  27. ->setCancelable($cancelable)
  28. ->setAutoCurrencyConvert($autoCurrencyConvert)
  29. ->setAutoChargeRelatedCard($autoChargeRelatedCard)
  30. ->setAutoProcessToDone($autoProcessToDone)
  31. ->setReserveUntil($reserveUntil)
  32. ->setCallback($callback)
  33. ;
  34.  
  35. $result = $transfersClient->createTransfer($transferInput);
With the specification
POST https://wallet.paysera.com/transfer/rest/v1/transfers

Example request

  1. POST /transfer/rest/v1/transfers HTTP/1.1
  2. Host: wallet.paysera.com
  3. Content-Type: application/json;charset=utf-8
  4. User-Agent: Paysera WalletApi PHP library
  5. Authorization: MAC id="wkVd93h2uS", ts="1343811600", nonce="nQnNaSNyubfPErjRO55yaaEYo9YZfKHN", mac="2VFTILV6mZSTG3mWYle+ApoQ4waD+zkfpBpaDYW9H2A=", ext="body_hash=9ozRxTTJmNuImN2RrqNNWrWAf39A2RmbriKeuDSPy2I%3D"
  1. {
  2. "amount": {
  3. "amount": "100.00",
  4. "currency": "EUR"
  5. },
  6. "beneficiary": {
  7. "type": "bank",
  8. "name": "Name Surname",
  9. "bank_account": {
  10. "iban": "LT873500010002284563"
  11. },
  12. "additional_information": {
  13. "type": "natural",
  14. "city": "New York",
  15. "state": "NY",
  16. "country": "US",
  17. "postal_code": "11235",
  18. "bank_branch_code": "US46516"
  19. },
  20. "client_identifier": {
  21. "date_and_place_of_birth": {
  22. "date_of_birth": "1986-11-08",
  23. "city_of_birth": "Vilnius",
  24. "country_of_birth": "LT"
  25. }
  26. }
  27. },
  28. "payer": {
  29. "account_number": "EVP9210002477825"
  30. },
  31. "urgency": "standard",
  32. "purpose": {
  33. "details": "Transfer details that will be seen in beneficiary statement"
  34. }
  35. }

Example response

  1. HTTP/1.1 200 OK
  2. Content-type: application/json;charset=utf-8
  1. {
  2. "id": "123",
  3. "status": "new",
  4. "amount": {
  5. "amount": "100.00",
  6. "currency": "EUR"
  7. },
  8. "beneficiary": {
  9. "type": "bank",
  10. "name": "Name Surname",
  11. "bank_account": {
  12. "iban": "LT873500010002284563"
  13. },
  14. "additional_information": {
  15. "type": "natural",
  16. "city": "New York",
  17. "state": "NY",
  18. "country": "US",
  19. "postal_code": "11235",
  20. "bank_branch_code": "US46516"
  21. },
  22. "client_identifier": {
  23. "date_and_place_of_birth": {
  24. "date_of_birth": "1986-11-08",
  25. "city_of_birth": "Vilnius",
  26. "country_of_birth": "LT"
  27. }
  28. }
  29. },
  30. "payer": {
  31. "account_number": "EVP9210002477825"
  32. },
  33. "purpose": {
  34. "details": "Transfer details that will be seen in beneficiary statement",
  35. "details_options": {
  36. "preserve": false
  37. }
  38. },
  39. "cancelable": true,
  40. "allowed_to_cancel": true,
  41. "initiator": {
  42. "user_id": 321
  43. },
  44. "created_at": 1489420006,
  45. "perform_at": 1489420006,
  46. "auto_currency_convert": false,
  47. "auto_charge_related_card": false,
  48. "out_commission": {
  49. "amount": "0.29",
  50. "currency": "EUR"
  51. },
  52. "additional_information": {
  53. "estimated_processing_date": 1489420906,
  54. "out_commission_rule": {
  55. "percent": 0,
  56. "fix": {
  57. "amount": "0.29",
  58. "currency": "EUR"
  59. }
  60. },
  61. "original_out_commission": {
  62. "amount": "0.29",
  63. "currency": "EUR"
  64. },
  65. "correspondent_bank_fees_may_apply": false
  66. }
  67. }

2. Register transfer

With a library
  1. <?php
  2.  
  3. use PayseraClientTransfersClientClientFactory;
  4. use PayseraClientTransfersClientEntity as Entities;
  5.  
  6. $clientFactory = new ClientFactory([
  7. 'base_url' => 'https://wallet.paysera.com/transfer/rest/v1/',
  8. 'mac' => [
  9. 'mac_id' => 'mac_id',
  10. 'mac_secret' => 'mac_password',
  11. ],
  12. ]);
  13.  
  14. $transferRegistrationParameters = (new EntitiesTransferRegistrationParameters())
  15. ->setConvertCurrency($convertCurrency)
  16. ->setUserIp($userIp)
  17. ;
  18.  
  19. $result = $transfersClient->registerTransfer($id, $transferRegistrationParameters);
With the specification
PUT https://wallet.paysera.com/transfer/rest/v1/transfers/{id}/register

Example request

  1. PUT /rest/v1/transfers/123/register HTTP/1.1
  2. Host: wallet.paysera.com
  3. User-Agent: Paysera WalletApi PHP library
  4. Authorization: MAC id="wkVd93h2uS", ts="1343811600", nonce="nQnNaSNyubfPErjRO55yaaEYo9YZfKHN", mac="eIo1DjHNsG/ROwzB98/2guqPDalPLY+VhFJ1nJ7E7H0="

Example response

  1. HTTP/1.1 200 OK
  2. Content-type: application/json;charset=utf-8
  1. {
  2. "id": "123",
  3. "status": "new",
  4. "amount": {
  5. "amount": "100.00",
  6. "currency": "EUR"
  7. },
  8. "beneficiary": {
  9. "type": "bank",
  10. "name": "Name Surname",
  11. "bank_account": {
  12. "iban": "LT873500010002284563"
  13. },
  14. "additional_information": {
  15. "type": "natural",
  16. "city": "New York",
  17. "state": "NY",
  18. "country": "US",
  19. "postal_code": "11235",
  20. "bank_branch_code": "US46516"
  21. },
  22. "client_identifier": {
  23. "date_and_place_of_birth": {
  24. "date_of_birth": "1986-11-08",
  25. "city_of_birth": "Vilnius",
  26. "country_of_birth": "LT"
  27. }
  28. }
  29. },
  30. "payer": {
  31. "account_number": "EVP9210002477825"
  32. },
  33. "purpose": {
  34. "details": "Transfer details that will be seen in beneficiary statement",
  35. "details_options": {
  36. "preserve": false
  37. }
  38. },
  39. "cancelable": true,
  40. "allowed_to_cancel": true,
  41. "initiator": {
  42. "user_id": 321
  43. },
  44. "created_at": 1489420006,
  45. "perform_at": 1489420006,
  46. "auto_currency_convert": false,
  47. "auto_charge_related_card": false,
  48. "out_commission": {
  49. "amount": "0.29",
  50. "currency": "EUR"
  51. },
  52. "additional_information": {
  53. "estimated_processing_date": 1489420906,
  54. "out_commission_rule": {
  55. "percent": 0,
  56. "fix": {
  57. "amount": "0.29",
  58. "currency": "EUR"
  59. }
  60. },
  61. "original_out_commission": {
  62. "amount": "0.29",
  63. "currency": "EUR"
  64. },
  65. "correspondent_bank_fees_may_apply": false
  66. }
  67. }