3.25. /api/v4/transfer
Introduction
Transfer is a type of complex transaction that allows to move funds between bank cards (Primary Account Number – PAN), card tokens (Recurring Payment ID – RPI) and Connecting Party bank account (deposits).
Transfer is initiated through HTTPS POST request to the URL with the required parameters depending on a certain transfer Use-Case (see below). Some integrations might require Additional parameters. Use OAuth RSA-SHA256 for authentication.
Possible transfer Use-Cases:
| PAN to PAN | Transfer from PAN to PAN occurs when transferring funds from one bank card to another, when specifying for each card their card numbers, and not the recurring payment id. |
| PAN to RPI | Transfer from PAN to RPI occurs when funds are transferred from one bank card for which its number is indicated to another bank card for which its recurring payment id is indicated. |
| RPI to PAN | Transfer from RPI to PAN occurs when funds are transferred from one bank card for which its recurring payment id is indicated to another bank card for which its number is indicated. |
| RPI to RPI | Transfer from RPI to RPI occurs when transferring funds from one bank card to another, when specifying for each card their recurring payment id, and not the card number. |
| deposit to PAN | Deposit Transfer to PAN occurs when funds are transferred from Connecting Party account to a bank card by its number. |
| deposit to PRI | Deposit Transfer to RPI occurs when funds are transferred from Connecting Party account to a bank card by recurring payment id. |
API URLs
| Integration | Production |
|---|---|
| https://sandbox.billblend.com/checkout/api/v4/transfer/ENDPOINTID | https://pay.billblend.com/checkout/api/v4/transfer/ENDPOINTID |
| https://sandbox.billblend.com/checkout/api/v4/transfer/group/ENDPOINTGROUPID | https://pay.billblend.com/checkout/api/v4/transfer/group/ENDPOINTGROUPID |
Request Parameters
Note
Request must have content-type=application/x-www-form-urlencoded and Authorization headers.
- PAN to PAN
- PAN to RPI
- RPI to PAN
- RPI to RPI
- Deposit to PAN
- Deposit to RPI
| Parameter Name | Description | Value |
|---|---|---|
| credit_card_number | Sender`s credit card number. For the scenario of payment from a card inside the system, this card will be considered as a source. | Necessity: RequiredType: NumericLength: 19 |
| cvv2 | Sender`s CVV2 code. CVV2 (Card Verification Value) is the three of four-digit number farthest to the right on the flip side of a credit card. | Necessity: RequiredType: StringLength: 3-4 |
| expire_month | Sender credit card’s month of expiration. | Necessity: RequiredType: StringLength: 2 |
| expire_year | Sender credit card’s year of expiration. | Necessity: RequiredType: StringLength: 2-4 |
| card_printed_name | Sender`s card printed name. | Necessity: RequiredType: StringLength: 128 |
| destination-card-no | Receiver`s card PAN. For the scenario of payment to a card inside the system, this card will be considered as a destination, and all processing limits, lists and fraud scoring will be applied to it as a destination card. | Necessity: RequiredType: NumericLength: 19 |
| deposit2card | Marker of deposit to card transfer. If “true”, no sender cardholder data is needed to process the transaction. If “false”, sender cardholder data is needed. | Value: FalseType: Boolean |
| destination_expire_month | Receiver credit card’s month of expiration. | Necessity: OptionalType: StringLength: 2 |
| destination_expire_year | Receiver credit card’s year of expiration. | Necessity: OptionalType: StringLength: 2-4 |
| destination_card_printed_name | Receiver`s card printed name. | Necessity: OptionalType: StringLength: 128 |
| ipaddress | The Sender or Receiver’s IP address, include for fraud screening purposes. NB: 45 is for IPv4 tunneling like 0000:0000:0000:0000:0000:0000:192.168.100.101 | Necessity: RequiredType: StringLength: 7-45 |
| client_orderid | Connecting Party order ID. | Necessity: RequiredType: StringLength: 128 |
| currency | Currency the transaction is charged in (three-letter currency code). Example of valid parameter values are: USD for US Dollar, EUR for European Euro. | Necessity: RequiredType: StringLength: 3 |
| amount | Amount to be transferred. The amount has to be specified in the highest units with . delimiter. For instance, 10.5 for USD means 10 US Dollars and 50 Cents. | Necessity: RequiredType: NumericLength: 10 |
| purpose | Destination to where the payment goes. It is useful for the merchants who let their clients to transfer money from a credit card to some type of client’s account, e.g. game or mobile phone account. Sample values are: +7123456789; gamer0001@ereality.com etc. This value will be used by fraud monitoring system | Necessity: OptionalType: StringLength: 128 |
| redirect_url | URL the cardholder will be redirected to upon completion of the transaction. Please note that the cardholder will be redirected in any case, no matter whether the transaction is approved, declined or in any other final status. Optional for direct integration (non-form) deposit2card. | Necessity: OptionalType: StringLength: 1024 |
| order_desc | Order description. | Necessity: RequiredType: StringLength: 64k |
| server_callback_url | URL, where the transaction status is sent to. Connecting Party may use server callback URL for custom processing of the transaction completion, e.g. to collect payment data in the Connecting Party’s information system. For the list of parameters which come along with server callback to server_callback_urlrefer to Connecting Party callback parameters. | Necessity: OptionalType: StringLength: 1024 |
Additional Parameters
For Connecting Party
Use additional parameters for Connecting Party to specify Sender’s browser information and Connecting Party 3DS results notification URL. The Connecting Party’s site needs to accurately populate the browser information for each transaction. This data can be obtained by Connecting Party’s servers. Ensure that the data is not altered or hard-coded, and that it is unique to each transaction.
Note
These parameters are not applicable for cases deposit to PAN and deposit to RPI.
Note
Browser data for 3DS 2.X is gathered by payment gateway system on 3DS authentication stage. For some processing channels, however, the browser data and/or connecting party URL for 3DS challenge results must be provided in initial transaction request. Please contact Support manager to clarify if these parameters should be included in request parameters.
| Parameter Name | Description | Value |
|---|---|---|
| tds_areq_notification_url, aliastds_cres_notification_url | Fully qualified URL of Connecting Party system that will receive the CRes message or Error Message. This CRes message must be sent to Billblend. See details here Upload CRes Result. | Type: String Length: 256 |
| customer_browser_info | If true, then the fields below must be present. | Type: Boolean |
| ipaddress | IP address of the browser as returned by the HTTP headers to the 3DS Requestor. | Type: String Length: 45 |
| customer_browser_accept_header, aliascustomer_accept | Exact content of the HTTP accept headers as sent to the 3DS Requestor from the Cardholder’s browser. | Type: String Length: 2048 |
| customer_browser_color_depth | Value representing the bit depth of the colour palette for displaying images, in bits per pixel. Required when browser_javaScript_enabled=true. | Type: String Length: 2 |
| customer_browser_java_enabled | Boolean that represents the ability of the cardholder browser to execute Java. Required when browser_javaScript_enabled=true. | Type: Boolean |
| customer_browser_javascript_enabled | Boolean that represents the ability of the cardholder browser to execute JavaScript. | Type: Boolean |
| customer_browser_accept_language, aliascustomer_accept_language | Value representing the browser language as defined in IETF BCP47. | Type: String Length: 8 |
| customer_browser_screen_height | Total height of the Cardholder’s screen in pixels. Required when browser_javaScript_enabled=true. | Type: Numeric Length: 6 |
| customer_browser_screen_width | Total width of the Cardholder’s screen in pixels. Required when browser_javaScript_enabled=true. | Type: Numeric Length: 6 |
| customer_browser_time_zone | Time-zone offset in minutes between UTC and the Cardholder browser local time. Note that the offset is positive if the local time zone is behind UTC and negative if it is ahead. Required when browser_javaScript_enabled=true. | Type: String Length: 5 |
| customer_browser_user_agent | Exact content of the HTTP user-agent header. | Type: String Length: 2048 |
For Payment Institutions
The Payment Institution can fill the 3DS results for each transaction, if 3DS authentication is performed on their side.
Note
These parameters are not applicable for cases deposit to PAN and deposit to RPI.
| Parameter Name | Description | Value |
|---|---|---|
| tds_authentication_result_type | Type of result. Possible value is: SIMPLE | Type: String Length: 6 |
| tds_authentication_result_authentication_type | Authentication Type. Indicates the type of authentication method the Issuer will use to challenge the Cardholder, whether in the ARes message or what was used by the ACS when in the RReq message. Possible values are:01 = Static.02 = Dynamic.03 = OOB.04 = Decoupled.05-79 = Reserved for EMVCo future use (values invalid until defined by EMVCo).80-99 = Reserved for DS use. | Type: String Length: 2 |
| tds_authentication_result_authentication_value | Authentication Value. Payment System-specific value provided by the ACS or the DS using an algorithm defined by Payment System. Authentication Value may be used to provide proof of authentication. A 20-byte value that has been Base64 encoded, giving a 28-byte result. | Type: String Length: 19-28 |
| tds_authentication_result_transaction_id | xid for 1.0.2 or dsTransID for 2.1.0/2.2.0. | Type: String Length: 19-36 |
| tds_authentication_result_transaction_status | Transaction Status. Indicates whether a transaction qualifies as an authenticated transaction or account verification. Possible values are:Y = Authentication Verification Successful.N = Not Authenticated/Account Not Verified, Transaction denied.U = Authentication/Account Verification Could Not Be Performed, Technical or other problem, as indicated in ARes or RReq.A = Attempts Processing Performed, Not Authenticated/Verified, but a proof of attempted authentication/verification is provided.C = Challenge Required, Additional authentication is required using the CReq/CRes.D = Challenge Required, Decoupled Authentication confirmed.R = Authentication/ Account Verification Rejected, Issuer is rejecting. | Type: String Length: 1 |
| tds_authentication_result_message_version | Message Version Number. Protocol version identifier This shall be the Protocol Version Number of the specification utilised by the system creating this message. The Message Version Number is set by the 3DS Server which originates the protocol with the AReq message. The Message Version Number does not change during a 3DS transaction. Possible values are:1.0.22.1.02.2.0 | Type: String Length: 5 |
Sender Customer Data
Parameters below can be required for specific integrations. For more information, please contact Support manager.
| Parameter Name | Description | Value |
|---|---|---|
| sender_first_name | Sender’s first name. | Type: String Length: 128 |
| sender_last_name | Sender’s last name. | Type: String Length: 128 |
| sender_middle_name | Sender’s middle name/patronym. | Type: String Length: 128 |
| sender_ssn | Last four digits of the Sender’s social security number. | Type: String Length: 11 |
| sender_birth_place | Sender`s birth place. | Type: String Length: 128 |
| sender_birthday | Sender’s birthday. | Type: String Length: 30 |
| sender_address1 | Sender’s address. | Type: String Length: 256 |
| sender_city | Sender’s city. | Type: String Length: 128 |
| sender_state | Sender’s US states (two letter abbreviation). Not applicable outside the US. | Type: String Length: 4 |
| sender_zip_code | Sender`s zip code. | Type: String Length: 32 |
| sender_citizenship | Sender`s citizenship. | Type: String Length: 128 |
| sender_country_code | Sender’s country (two letter abbreviation). | Type: String Length: 2 |
| sender_phone | Sender’s full international phone number, including country suffix. | Type: String Length: 128 |
| sender_cell_phone | Sender’s full international cell phone number, including country suffix. | Type: String Length: 128 |
| sender_email | Sender’s email address. | Type: String Length: 128 |
| sender_resident | Is sender a resident? | Type: Boolean |
| sender_identity_document_id | Sender`s identity document name. | Type: String Length: 128 |
| sender_identity_document_series | Sender`s identity document series. | Type: String Length: 12 |
| sender_identity_document_number | Sender`s identity document number. | Type: String Length: 16 |
| sender_identity_document_issuer_name | Sender`s identity document issuer. | Type: String Length: 128 |
| sender_identity_document_issuer_department_code | Sender`s identity document issuer department code. | Type: String Length: 32 |
| sender_identity_document_issue_date | Sender`s identity document issue date. | Type: Date |
Receiver Customer Data
Parameters below can be required for specific integrations. For more information, please contact Support manager.
| Parameter Name | Description | Value |
|---|---|---|
| receiver_first_name | Receiver’s first name. | Type: String Length: 128 |
| receiver_last_name | Receiver’s last name. | Type: String Length: 128 |
| receiver_middle_name | Receiver’s middle name/patronym. | Type: String Length: 128 |
| receiver_birth_place | Receiver`s birth place. | Type: String Length: 128 |
| receiver_birthday | Receiver’s birthday. | Type: String Length: 128 |
| receiver_address1 | Receiver’s address. | Type: String Length: 256 |
| receiver_city | Receiver’s city. | Type: String Length: 128 |
| receiver_zip_code | Receiver`s zip code. | Type: String Length: 32 |
| receiver_region | Receiver`s region. | Type: String Length: 30 |
| receiver_area | Receiver`s area. | Type: String Length: 50 |
| receiver_citizenship | Receiver`s citizenship. | Type: String Length: 128 |
| receiver_country_code | Receiver`s country (two letter abbreviation). | Type: String Length: 2 |
| receiver_phone | Receiver’s full international phone number, including country suffix. | Type: String Length: 128 |
| receiver_email | Receiver’s email address. | Type: String Length: 128 |
| receiver_resident | Is receiver a resident? | Type: Boolean |
| receiver_identity_document_id | Receiver`s identity document name. | Type: String Length: 128 |
| receiver_identity_document_series | Receiver`s identity document series. | Type: String Length: 12 |
| receiver_identity_document_number | Receiver`s identity document number. | Type: String Length: 16 |
| receiver_identity_document_issuer_name | Receiver`s identity document issuer. | Type: String Length: 128 |
| receiver_identity_document_issuer_department_code | Receiver`s identity document issuer department code. | Type: String Length: 32 |
| receiver_identity_document_issue_date | Receiver`s identity document issue date. | Type: Date |
Response Parameters
Note
Response has Content-Type: text/html;charset=utf-8 header. All fields are x-www-form-urlencoded, with (0xA) character at the end of each parameter’s value.
| Parameter | Description |
|---|---|
| type | The type of response. May be async-response, validation-error, error. If type equals validation-error or error, error-message and error-code parameters contain error details. |
| paynet-order-id | Order id assigned to the order by Billblend. |
| merchant-order-id | Connecting Party order ID. |
| serial-number | Unique number assigned by Billblend server to particular request from the Connecting Party. |
| error-message | If status is error this parameter contains the reason for decline or error details. |
| error-code | The error code is case of error status. |
| end-point-id | Endpoint id used for the transaction. |
Request & Response Examples
Transfer from PAN to PAN
Request Example
POST /checkout/api/v4/transfer/39509 HTTP/1.1 Host: sandbox.billblend.com User-Agent: curl/7.83.0 Accept: */* Authorization: OAuth oauth_consumer_key="TestMerchant", oauth_nonce="aGDxlipOs21lzMdyp0TGmCltVbBgnaUh", oauth_signature="R6uBD0TnC75UmYVFqEf70YX9tKK7iRmBR%2FoJGPCUTwzzyjtkAg6jK8fk2I0EbzeadqTLDgckrXShSsD5Ke8%2FP3ZqPwWwh3OMT5XK9MWVcDGavjKQi%2BnXfJdr4JRbhPAk1YL3IJL04TTTmAoJHFWu0EKNdzndAMQ0cWay4Hg5evPcDpJEK0a2ZaKnSMjh9UMmttvzDL4Cb2INDH%2F5VadKPji%2FbDAxxWVT%2FQ9HVJcVSDHlxFniLBgyJr4ZIg4ROwtnO3hbOC%2FC5rf7USgjkbpkBUejqjk4Wgw%2BJHMFJ4PJQM0beYn1ctmVGg27MOp8UWyi2i3PsAy8FbPf%2Ff6sMTDhx8MABfbIojHgrvke%2B3flfS%2BUmtCo5pQ%2F9blWvVmB%2BjJz%2BqznYEAUk%2BHj7ekSVzMvpf5LNDeIwpwSVEZpp5Ig8OyKZcWe9i8bbmfDsWehSGpiVkaraWsLCToras3lZy73Hp5z6SN8Uc98f%2BXUF8ROJvSysAfzDU2BJrDhNo1tKjuhY%2FEQzEinYe0zCSsSHOhkl2yU2KwWxbgWXb%2FoMEHIuuZ5l%2Baa%2FGTLSCb%2Bm5wJ8n9QeDSulHM3VmTP%2F7wFXa5DwCQCDy3Lu7vOWVFhLirXOMH6V%2Fe5SZ1yQHo0uH2N7F72DGKrcNkvkLaZCB4NE8AVqISxB484AB5Mo0pC3iZzAPWNo141iezgrlacarwSNsqSwmGBfvCWAkxszqIHgWWOfsomfG4OJTo%2BRgtO6SkLAgpPcGDYWjziDvT6uQvAQG3R5aSv6OgrjZNn0PQqsWb4qT7nlirHLwXXrSL46HTRyCl9q4QCuufKPZA0LOW3y7OJsk2T%2BuI%2FZHXzDOeHGIhxBWa%2B%2BrpYhwDzmx1736gnNZ6dBbzKz5hH20BWOzvaZ93mKDH32Ri62D4yvAf64ElvSdNSImImLtEstRcws9YBsdcAxJw0TXICclwN8DM39jhU7ekc2XsYhmCeEk5f1OL6a0Ud6IyxZN0HLhOPRHHSiiMh90y1DOyk%2FUSjihshg2NDmFJe4TNZ7TZRzlD5WKR6FxeTH6xYq1RJvoHiC0SUyVKjX7knFp%2FIEx3fdpMRD8ZCT%2FgUw5Cu34q87B7xVLHjEhn9%2FV3lacVDJ48F1aS6urv%2FI2cahSsIz288g1V1ThhrusN7TMdIsoZ%2F7XqKxht3p34N0e7lDUVils42ySmZil78GVvr9wR2GtOpa8FT31F0LnyVxCiA3Fqj5LNM3QunElqSaNXI%2BtwlzKFGq4oklwb7bilOin0uzYlb4ymz7x6o7O8dJmCeUpkfCUxFrQnpmmHGBg0VgcKS5S769otXsXICqMP%2BDU2x5dajQvbIlzzm4aKF4qm2jxSowydOWU1Y28Q%3D%3D", oauth_signature_method="RSA-SHA256", oauth_timestamp="1661493794", oauth_version="1.0" Content-Length: 305 Content-Type: application/x-www-form-urlencoded Connection: close amount=10.42 &card_printed_name=John%20Doe &client_orderid=1 &credit_card_number=4332435659564446 ¤cy=USD &cvv2=123 &deposit2card=false &destination-card-no=4998406231653309 &expire_month=12 &expire_year=2099 &ipaddress=1.1.1.1 &order_desc=Your%20order%20description &redirect_url=http%3A%2F%2Fwww.example.com &server_callback_url=https://httpstat.us/200
Success Response Example
HTTP/1.1 200 OK Server: server Date: Fri, 26 Aug 2022 06:07:43 GMT Content-Type: text/html;charset=utf-8 Connection: close Vary: Accept-Encoding X-XSS-Protection: 1 X-Content-Type-Options: nosniff Strict-Transport-Security: max-age=31536000 Content-Language: en-US Strict-Transport-Security: max-age=31536000 Content-Length: 137 type=async-response &serial-number=00000000-0000-0000-0000-000002ddaf96 &merchant-order-id=1 &paynet-order-id=6863038 &end-point-id=39509
Fail Response Example
HTTP/1.1 500 Internal Server Error Server: server Date: Fri, 14 Oct 2022 09:53:35 GMT Content-Length: 61 Connection: close X-XSS-Protection: 1 X-Content-Type-Options: nosniff Strict-Transport-Security: max-age=31536000 Internal server error [1ee76b38-3764-407e-9dfb-2ffc9ab0775b]
Transfer from PAN to RPI
Request Example
POST /checkout/api/v4/transfer/39509 HTTP/1.1 Host: sandbox.billblend.com User-Agent: curl/7.83.0 Accept: */* Authorization: OAuth oauth_consumer_key="TestMerchant", oauth_nonce="yL2jqiO6NnIVBGhT3ocsWDgsaYxG3P7j", oauth_signature="U5FwR96T0huNFmDQYivbEkLFISfZKF%2FREN%2BwBXLNAD8K0HAAXh0FbmXDSkgvsZXb4i1UPc1xFmqvIX2lYsiZRixMesiRIbAhoHsmHHpGfZ5hS2YMfVAUQWfVbHdqCJQZEJofu7RM1ow8rS0YbGCYvqSHUbI0bDi%2FpXERzDrr5N76AOhl2onBPjqXQqhAdVYBfTUHhezDJChhyg4Lc4gkRsVbw8tIbx220vCT57t9CQhYvNd9bONH6Vkn6XyUVY3bfi%2BNt4CQ25W2F%2FpYVK2%2BtLeCVDHytY7JGaUalWKXg2HIhr2Olmh9GRSZ51tenAL%2FgkHI%2BDsIh5nn6nsBAMFnSCQR7ANy7cUpLw5KZnQLKLFcCeNeBdFqXDwZ2aOX1PDdHvn1KZBtf1SqGp3kkEX3AMin%2F3QTOHobLRFAwGBIExwGxOddRL2mPIOUMvF6CE%2FGgBGHstcjyDCAQ3U2n%2BXlaM1cCgWtLL2A5nBM2%2FMnCUqqYUY4eN2Gidh2ZoLw70v%2BL4jLnK3%2BKefRxyPgOlZQBxH1qfP3tayZlMIdJ8gAdAmx2RlK%2B3krUsy4TSpCzyAX4xloovGgC9yP0u0u4jJT6DTSdTJ3IdiCoUTyAA%2BPdkRrMZ%2BswFRH%2FCU8HETuOGQHUCnbL10DjHCvvis3OtNH6j1aNETfWJqJ29lSngs8%2BU0Q%2FlAGdlRXdAVkqj5Vd5wfLeMvSgjmhPbS6Cfk60hXS%2Bj58DPdlKZ8Itg7gZO%2BW%2BGNfpwkD2baTdAiMjU%2F0ZGx9UW9caT1QrsXL6ub4NXQHnHluCqHH%2Fi6zNOu2pAuHcuJ%2BOLOzcPSDRCFeOk2zy2SAiWKTKWEFypMg2AQuRydrB9ZFPnmVokPnN4Y99ZSdj1PD3VOuXCW1h7AjGub8oMYCaqOvcB8bdSg%2BJYnkWS5CMsQSMjuW5ZhRCtGYlrpq3luQS25h5LLXi3OrqkiQdst0I9lTmmzwQ0OiFmXPcH7nKE8gantsa5hs7BVgPeypY%2BKfVZiqs9w6y2aq%2F9CUtatVj9%2BU56%2FucDhs2b9s6kY3kbvO3p568hlJHvNxgyhv0eGfMSyWjmil3OuZf0VsNlbptGC69nIlXKXgV7sX3B049gN%2Biw08EP8tfpZPE%2BFViY8ecDrs2CquzJpZvOFX4WZ2bbIr9%2BOOcVMhGJ7QrFC96ddnbhfGaDJsc2FCgjBNQJvZJ8Mhxa7kksHujdxFrBa%2BKGSs0qROwTcpxRtb4zBDEcq%2FHklBkB0T6lOWpYvkhUy1coF8KtuhPSfqhkVg6gB5%2B%2BLgGK6DQKIoMI9MvzSLTOR9ElE9vWUUMP1eG2b46jqOiIuAwQvJZfnxqlizF5OcqBbJazBj7t%2FiH0KKPvO6Q%3D%3D", oauth_signature_method="RSA-SHA256", oauth_timestamp="1661494949", oauth_version="1.0" Content-Length: 303 Content-Type: application/x-www-form-urlencoded Connection: close amount=10.42 &card_printed_name=John%20Doe &destination_card_recurring_payment_id=1491828 &client_orderid=1 ¤cy=USD &cvv2=123 &deposit2card=false &credit_card_number=4998406231653309 &expire_month=12 &expire_year=2099 &ipaddress=1.1.1.1 &order_desc=Your%20order%20description &redirect_url=http%3A%2F%2Fwww.example.com &server_callback_url=https://httpstat.us/200
Success Response Example
HTTP/1.1 200 OK Server: server Date: Fri, 26 Aug 2022 06:22:43 GMT Content-Type: text/html;charset=utf-8 Connection: close Vary: Accept-Encoding X-XSS-Protection: 1 X-Content-Type-Options: nosniff Strict-Transport-Security: max-age=31536000 Content-Language: en-US Strict-Transport-Security: max-age=31536000 Content-Length: 137 type=async-response &serial-number=00000000-0000-0000-0000-000002ddafb1 &merchant-order-id=1 &paynet-order-id=6863042 &end-point-id=39509
Fail Response Example
HTTP/1.1 500 Internal Server Error Server: server Date: Fri, 14 Oct 2022 12:30:15 GMT Content-Length: 61 Connection: close X-XSS-Protection: 1 X-Content-Type-Options: nosniff Strict-Transport-Security: max-age=31536000 Internal server error [18819567-ab17-4342-86eb-f8a45966e8c8]
Transfer from RPI to PAN
Request Example
POST /checkout/api/v4/transfer/39509 HTTP/1.1 User-Agent: curl/7.83.0 Accept: */* Authorization: OAuth oauth_consumer_key="TestMerchant", oauth_nonce="J5wfdvnj45sDN2TElY2nIHcpDgIPsEa5", oauth_signature="VhvXrMZNTrRxBCd7AOtRWcqc67KLyD6wQpJoVuJP0I4%2BWseXd5bAfMZtuy1QBhVGMlGiVfl97tmiB1LzSTnWcA%2BlS8bCyEXgoE0XL4rn3U2rXV2JWgPTrv1EHCaAt%2FJhZ1JPd6kjzGG3ZDJXAZg3YMoRdL00iK66Z1AK%2BhuL1M9mziEkcvZZR3elREmz%2F223aVXRr%2BXc6dWFTHQM9BDTsVarsHrYHv9TkBjDbYXp%2F%2BX9ltfdUV7YXGemd6jy25CbJC9zbTj1wHsrpT2bkbBCpycH8xtANFAeQgyTpR4IU4OglzPSunXeZaO9o1%2FwzWEvDmHN4g0WRnyl%2Bmgy7qU3wvMyyDf27UCRXFgEmfybk%2Fa3bwouJUqQbYUMif%2FGULsPmdSmz%2FWhmPnyIq9lvNkExE4xIXB1j7C8aYGoSRavvdhmEcNIbyXEs6hur%2FmXkIJH5RHDJTAcfu7RHkRUd3jBQjEEI1q9HnhTmdHKOEovQs%2BzR3K7Fv6%2FLW71cmbMMpqYbkIaBVN0%2Fdx4jLwZwqbk3B6PxxAyf6f48vJDFoNqVrlpaGXWTwZaeLWlE0sCgk3Cscss64%2B%2Bt8eHaVRS2u09uwvlh9iCSqXeZjikHB782u7xc6f8PWp70xK0DsBsN1QyN1%2FLMH1ozr1HsYvZrucC8C7T2BykksEKmitpZ0cRUsj7Hb59nh39xk%2B8Vk1VenfUyz7O%2FnMsOeuKna0RHLI35DqgnvPp0yjU2SqM32N6%2B7Dtaa135N7oC1z8hG1zCB2C%2F%2Bk9Bmt0y%2Fad6yiEMN%2F%2FslGob7U5x82Sf7ph92EFCPu1ccW%2FMbxb9xu8csaMHDbh7E%2FydQm3WOym0U3%2FPSckea23YOTScrr0mQsGOjBwzgehUsJyCyLiWehFob6aEfuphXfdiyb5vXUKZuTAWPofgusJByrOHErhfPgQoUJ96YXfGGFTZAlLP8G5T14ZM02JrWffGGuvDzZiwkK8s9%2FPfZxTCQxjmM%2FIOOkSY48PTjYVq36V7x2v%2FDzJeux1Txu4TpewUod1ZDhxzu8kUEgKgxtJalPcFuZL8dwTynb4LCoKEK8mM15MRXWpHJzJ4k9yH1Rrn8bfEcQWUI5bdgsEdgWRBNMevwRGb3E%2B2ZMO5XihaKA1eCxBtKtxIvNShKjqS5fYdUfRHf5yVRwE67EZx9zAj1lHvTPSB1q1foWbU5MhN9vNc36hkLLsCjiKZsRctGFZGwTrgb6sPMrPoqpj8h66RosFHvi116G2sWe4jlz7OhC2%2BYD%2BQsMiiEIPmlHLWf2Z1w8g7NK%2BigKPI13hyLeOavPDEzV1ngy1XqkIdQdLS1mxxpD8sw9%2F0h4iN7kDgRC3eSwM97%2BO%2FdaN0d14JQ%3D%3D", oauth_signature_method="RSA-SHA256", oauth_timestamp="1661496079", oauth_version="1.0" Content-Length: 314 Content-Type: application/x-www-form-urlencoded Connection: close amount=10.42 &client_orderid=1 &destination-card-no=4998406231653309 ¤cy=USD &cvv2=123 &deposit2card=false &card_recurring_payment_id=1491828 &ipaddress=1.1.1.1 &order_desc=Your%20order%20description &redirect_url=http%3A%2F%2Fwww.example.com &server_callback_url=https://httpstat.us/200
Success Response Example
HTTP/1.1 200 OK Server: server Date: Fri, 26 Aug 2022 06:41:34 GMT Content-Type: text/html;charset=utf-8 Connection: close Vary: Accept-Encoding X-XSS-Protection: 1 X-Content-Type-Options: nosniff Strict-Transport-Security: max-age=31536000 Content-Language: en-US Strict-Transport-Security: max-age=31536000 Content-Length: 137 type=async-response &serial-number=00000000-0000-0000-0000-000002ddafb6 &merchant-order-id=1 &paynet-order-id=6863043 &end-point-id=39509
Fail Response Example
HTTP/1.1 500 Internal Server Error Server: server Date: Fri, 14 Oct 2022 12:34:35 GMT Content-Length: 61 Connection: close X-XSS-Protection: 1 X-Content-Type-Options: nosniff Strict-Transport-Security: max-age=31536000 Internal server error [ea7cab67-2af5-408a-aa76-79bba38688cf]
Transfer from RPI to RPI
Request Example
POST /checkout/api/v4/transfer/39509 HTTP/1.1 Host: sandbox.billblend.com User-Agent: curl/7.83.0 Accept: */* Authorization: OAuth oauth_consumer_key="TestMerchant", oauth_nonce="AC4qZJfR4OZW8xiNX9SrWj5upjPZ74kU", oauth_signature="mF%2BUTmlP7hbIMlfHCbuxDiq%2F3nx6l04zuWZpkVdnw03OHiyNBGdEg2rIsg1SZAg3Eu8VUXGBePyK0wksnyIgcyTigP5apTLrz%2FgpE4o%2BHtP%2FfJ%2B04qQ4fV5WH0RqPjd9xBEaD2JO%2Foe6xYg3tx4u1QZ1MyrQjcJTrpbn%2BOxnia8%2FFruu4Crs3KHLmiUBSSVc9T9YlDu%2BuZfDBCxSqHs1j3T4JoCskfH8VHJ%2FI8igkh5e9qUYD4MrVunhsbcv8KHS0N%2Fb1f5b%2FcoH0QK9ERX7Smo7Ns9ErvbGjJtu%2BwFMffH8%2B4EExtzJbRKQRMYdnY6PxNiu66wzGuMVKCRdTvwc%2FisUnJ0LssFRwnFLamxrytoPj2I45rPkh08ydA2jYCAErR8FYAmk%2BiLrY9pLkAL21BgKLHw%2BJgxUeQAIqLwwHIaNA8AnzP9nvYGu9gRVYfei%2FZ%2Bue%2BqcXBAlDJIGYB0JTGHTEf8t2lOpiI0AEIM%2Fd%2FKF5%2BbPp52Xdde6aKV1FT2A5i8%2FCJEKxuh%2FMWwcSqa88T7m4swnzH879cnkqbgzmSl2PS49poiccDaUwC78ZCxwGVD73FUSsgBnO68kZVpYwBIat543EH1HCvG1sH1xV8Fp8uSBxnjahDGKmi67viQQPlvl5avULcqj9PylSHp%2B%2BMn3L1PPss2G2qai5ITLunNfyFXzofotvR7KrprM3EuZmB47eanQ0nxmpyvBI2BsvObO8bJ97EPSxjhIyjdYoTq8F2GEumMsqZCj6tHZFO9%2Fd7iSJvjfxHLa%2FIQjew%2BguK%2BTL%2Bw1lPCDq9monQ8EX7OT1kh91DVjlcxglqqxqpWt%2BWCY56ZXuEKZ6kqYjT6N2ab2bjGTiBrcgmToq7gvcbKdMCcqgzPJZR5tK%2Fc%2Fu2hepO2L0%2BU%2FzG9IB55iFoq2c2qG32T%2Bg8K54WGPAyzubkW3mKy9B8VwlzUu%2FWSKNQgtbf2pqVOLUZ%2FTCa1ood9CqfNF%2B2ECo8x1ubyyzbBaUIW86fA1cgXptgmJp6G5xapky877ND9XXBRlXvOS6%2BlcItiqB%2FfQEIs7awflpyRlGQQJttpGrJTqjYXiFbvmlA1Z98l8yZ2aZmDi%2BfxcGkICtnjUYZnlYU%2BO7Eo%2FlV%2BrcbQMQzXp6zYHd7hPTwuNZ0fS%2FGAzd1bfVXkBTszqB8PZuuQEs5ObBfWjGbJGKhY8KuFgcR7B61hamzfhokCMGcxOMJP6YY9ZWqU4ba9WT04ZU53pgEJmUTuRCKtVqVL%2FgT1GlzlKQJN80gZ1Wb9t13yVRva%2FTRn%2FOXzfBhPIrxJv0KfXLUx8qHDweBwo5U2r8CG0N4xW5GJTgs2ncDBNXjWSjLE3dhG9G1louVP3ydryCQ%3D%3D", oauth_signature_method="RSA-SHA256", oauth_timestamp="1661496711", oauth_version="1.0" Content-Length: 312 Content-Type: application/x-www-form-urlencoded Connection: close amount=10.42 &card_recurring_payment_id=1491830 &client_orderid=1 ¤cy=USD &cvv2=123 &deposit2card=false &destination_card_recurring_payment_id=1491829 &ipaddress=1.1.1.1 &order_desc=Your%20order%20description &redirect_url=http%3A%2F%2Fwww.example.com &server_callback_url=https://httpstat.us/200
Success Response Example
HTTP/1.1 200 OK Server: server Date: Fri, 26 Aug 2022 06:52:10 GMT Content-Type: text/html;charset=utf-8 Connection: close Vary: Accept-Encoding X-XSS-Protection: 1 X-Content-Type-Options: nosniff Strict-Transport-Security: max-age=31536000 Content-Language: en-US Strict-Transport-Security: max-age=31536000 Content-Length: 137 type=async-response &serial-number=00000000-0000-0000-0000-000002ddafbb &merchant-order-id=1 &paynet-order-id=6863044 &end-point-id=39509
Fail Response Example
HTTP/1.1 500 Internal Server Error Server: server Date: Fri, 14 Oct 2022 12:38:47 GMT Content-Length: 61 Connection: close X-XSS-Protection: 1 X-Content-Type-Options: nosniff Strict-Transport-Security: max-age=31536000 Internal server error [317a3dcd-a96e-4b3a-801c-c5cfe7d05dad]
Transfer from Deposit to PAN
Request Example
POST /checkout/api/v4/transfer/39509 HTTP/1.1 Host: sandbox.billblend.com User-Agent: curl/7.83.0 Accept: */* Authorization: OAuth oauth_consumer_key="TestMerchant", oauth_nonce="Fw1O8eTrqovCuHhmHJ35utckB11MkfwD", oauth_signature="DRmRSQPQPw%2BkDcpNiOboL98MDQzvH73OfM%2F0ylUFoUbm165GsbkhT0TJhFD%2BjpSLiEXnzinRaiDtTc%2FoEDLVuCf7EjNfIsKT6xLEkp39xf08yrr2QWeqeAu6mpmwzq7%2BVNVobo0UCzQXMCZbkZOh%2B4US2pbJbZ0QrZFwGo%2Fd73weyecFBe4Z3ua4Q94MvMUKioH%2FD%2FvjFvlB6Mf8ua6b3%2Fmo5%2BiRwXykic1mWUBf7TB6MXgpRcu9eET3BbGc8%2FS0Xn9Lv2KE%2FoUYN4SmE%2BWgZXE3WR5DALkVrKYzXO5pOguqsy3IAp%2Blu%2F1XaU%2BxqxclAF%2B4KBGlrQt2RINSe%2FgCHTh9qwTiNJcCURdVZ%2Bid6jqGWo4IswEwRgCAHvOXbsoZTj2qW6YqpCm7U1v58FSbLhMlQy%2Fp6cpArnLGU1KDRjVo4nzFnsgIJaPw1im2PuM13X1ueaPsb7wEPWdJbpzs5cLViI7pkPSXSVWCApRsCRu%2B25%2FzSqrz%2FPwO4%2F3dhbkP9CDw9BMOAtonBJzHJtFDKsM2x0U56qv1xaJgEYGUVaOwyy%2FZnOrde4kPX2tkaBF6fFzZkoaMLI1CqBWbQHvWTXZ1vgWe6NIQmFve9NPjA69%2FEhTO2SREA8R2GkSOhF1UBtc1cRg8z6dY4jXbqr7UfwSsu%2BI3JB7%2BDTlMEOVSpfTEA8pbuqHwQL9YGV2BYPUTkVTMIfuetz2byaNafv9TsdV1QBi5uqbjT%2FTXeZ3214zL7rIU1UpqAHXkAcEraZDQV3h5X0i37yTmCOvMkfBl%2B0DnhZbSHkgCLd5aqDc4Hm0pvTfDFa92PcqAqOrK4TMERKQUkjMJFucoWP3fjRS7dQFsBLpWTbtKoNkycALHtd%2BI0PIzglrpJoO9AoHMbQJGZd4OXouBnkjo0KjjJqP4ZRGdtfMH4ADSj%2FyC1w0OaWcZGNkNEABS%2BRVpGD9VCOrYoe695Xt9XV4UEGygCReJ92WqhbnqafrGVu6eXCeIuV7KaUH7aLps5YzIySpDeJLKQTU5J7TuCZfOniLh5C2to%2Bl0h0BnqHX5FsU6RzQnPF9QkU0i1A2K%2B1nfqYOHUFq8wJNo4BIQwosUo7FzYRVzgSXqMnF5gQ7NYMkwxCaUz96XNTDj1vlzQWSyo3AgS6Jb5oIy5yr%2B%2FJPdzEcHf37Ot7kUAtmE3fLZrH%2BcrUd2jZ7tRHxcndQiTodbT0pjhT2qv4WcbXqPaWIWURBB8OxdH7QELxPyG%2BUUvPaiUGscDZ76aJnEk%2BT5jBC2Hak8%2B9Zy4qB%2Ft2QCTPwoAkuC2oHUafzaA8JzytjJLVQpTFvLh7Lj%2BAWg7KZGqKfYX1tmDsYUrdBRb9PfgmCPZ6owEkbDPQ%3D%3D", oauth_signature_method="RSA-SHA256", oauth_timestamp="1662384499", oauth_version="1.0" Content-Length: 197 Content-Type: application/x-www-form-urlencoded Connection: close amount=10.42 &client_orderid=1 ¤cy=USD &deposit2card=true &destination-card-no=4402746838361941 &ipaddress=1.1.1.1 &order_desc=Your%20order%20description &redirect_url=http%3A%2F%2Fwww.example.com &server_callback_url=https://httpstat.us/200
Success Response Example
HTTP/1.1 200 OK Server: server Date: Mon, 05 Sep 2022 13:28:35 GMT Content-Type: text/html;charset=utf-8 Connection: close Vary: Accept-Encoding X-XSS-Protection: 1 X-Content-Type-Options: nosniff Strict-Transport-Security: max-age=31536000 Content-Language: en-US Strict-Transport-Security: max-age=31536000 Content-Length: 137 type=async-response &serial-number=00000000-0000-0000-0000-000002ddb02e &merchant-order-id=1 &paynet-order-id=6863078 &end-point-id=39509
Fail Response Example
HTTP/1.1 500 Internal Server Error Server: server Date: Fri, 14 Oct 2022 12:58:56 GMT Content-Length: 61 Connection: close X-XSS-Protection: 1 X-Content-Type-Options: nosniff Strict-Transport-Security: max-age=31536000 Internal server error [3fc83866-7aac-4c92-b6e9-828069e5a9d2]
Transfer from Deposit to RPI
Request Example
POST /checkout/api/v4/transfer/39509 HTTP/1.1 Host: sandbox.billblend.com User-Agent: curl/7.83.0 Accept: */* Authorization: OAuth oauth_consumer_key="TestMerchant", oauth_nonce="F2ab2fvpltW1oWmn7xV1coohcnHXAROc", oauth_signature="V5ufFoDRY%2BMR8pUP6PgCOHg2M8t53EepdzSvqzzMdQVQ3oEoyPW0TPQK1daviExQ%2FF%2Ft1Lc77n1RKopD0SXbM2UBXe%2FE9RNDERHO4blb01bKCTm9N2IAUTW5PWKcreOLYuiCt2nh5cwY2hFbvxFl5EPoUk06AIoA9wFmrNEICBQJtDhtj7bULmAZhqoXgifgPEcNsfsNDZlk4mQLRhjsONbehon7GlsU8u0itV9I0S0qZnld4zfX5UOORi3xpMEnUfn4DVuLEgElIGeOJ1Th8r3LuO53QYOcmpyJ28Es%2FXDLZh0%2Fg2jJ8kaamcL3EMewZcIwyB1FOiKUBniwX%2BXattNeXbniXTBqPG%2B653RpqEMG3YwAIbAobxLk%2B2q6plW5EDApY8rXXv61WBzVJ2pfBakWHUGslBl5SynzzhE14EFDT6eL4dl22qm%2FM6i7fJGea2d5zFboVgZ0uIXChOgtoN8gJa3mMHt2isfRzuCg8K22hkgNy3CMYeUh7TFYxgsAr14pBXKjMS6MgMvXnPsxWoMlTF4dE9xQRY7nS42K%2FcrECPfnIcjK8HvT%2Bsux4ytps%2BKrBBfXnq%2Bjg%2BtT7LjR1mQnvaWw5HRMDlz1C%2BsmO4J%2BLJQBmpKknFNBv3oxGejhzZTtVcEGddCMNeh4KXUCMucJdb1I8ssq03yFS%2FPrDZbbdK%2Fy7VonLxWg0jozw6l46M9YLvJE9clUBvhgpuG6ClMecpgoQvDMnR%2BIx3zl1qy6E8eDyaXJ%2Bh4opohJrSRGDiTcVtGRbcZUr%2FWyLDUR625LjavHv9zT1aGGieSTsNM%2BeLgxkSzRlyXR4E4zjqDAB3J9rwKKbZyx8gTduMhGydUGDapNwKVhC5hb0F%2ByYjwiz2MO5Qr40mdeBfejdAJx4%2ButBszx0lOuczlIjR8L8NAn5LVrmuf33nLT63J8mTgXU%2F1bnQQHvmnTA4nX2NkpXbUDHfry8H%2FOoyCbs6dChX4RrJOQkS49tjxzJuiFIxAsUHkrlxdS9cHuluG5%2FV%2Fp6IwYHcWhUG2PxW6PJAcuin32sM66p%2Ff63CAcu46V9cIyoXpeSBvYZMZ8jt6Guowy5uHDImUFli%2FHCVopWLs%2FRFyY2iJUmqKypGh7Po%2FJyVhAYdpXrpaLTEmOd4OpLUO0GaxjaPTmcKuDGmXDQEFmC00zAT6%2F57tvZ38bhqSbReM5dWZC6mog9iC2wjY4gpDf%2FUTX7gPGmQkefTysz84QdRdoDNi0BDDfBD5lOPSpZmMs67obwXgnsrJOdlGNRyEjQ%2B8hZgxXH2mWh2wX4skHq43kxaJJ2bdIVab9BNtVj5YjnUJxJWJoe0a0%2B7slFQwfxIm8lxKwtJdEgK6r01UOLg%3D%3D", oauth_signature_method="RSA-SHA256", oauth_timestamp="1662384669", oauth_version="1.0" Content-Length: 206 Content-Type: application/x-www-form-urlencoded Connection: close amount=10.42 &client_orderid=1 ¤cy=USD &deposit2card=true &destination_card_recurring_payment_id=1491830 &ipaddress=1.1.1.1 &order_desc=Your%20order%20description &redirect_url=http%3A%2F%2Fwww.example.com &server_callback_url=https://httpstat.us/200
Success Response Example
HTTP/1.1 200 OK Server: server Date: Mon, 05 Sep 2022 13:31:42 GMT Content-Type: text/html;charset=utf-8 Connection: close Vary: Accept-Encoding X-XSS-Protection: 1 X-Content-Type-Options: nosniff Strict-Transport-Security: max-age=31536000 Content-Language: en-US Strict-Transport-Security: max-age=31536000 Content-Length: 137 type=async-response &serial-number=00000000-0000-0000-0000-000002ddb02f &merchant-order-id=1 &paynet-order-id=6863079 &end-point-id=39509
Fail Response Example
HTTP/1.1 500 Internal Server Error Server: server Date: Fri, 14 Oct 2022 12:55:09 GMT Content-Length: 61 Connection: close X-XSS-Protection: 1 X-Content-Type-Options: nosniff Strict-Transport-Security: max-age=31536000 Internal server error [51a48bc5-a061-40c5-b88b-f2c084024b77]
Postman Collection
Postman Collection is available at this link – https://doc.billblend.com/integration/API_commands/api_v4_transfer.html#postman-collection
Request Builder
Request Builder is available at this link – https://doc.billblend.com/integration/API_commands/api_v4_transfer.html#request-builder
Debug form
| URL | |
|---|---|
| login | login should be used as Consumer Public for OAuth |
| destination-card-no | |
| destination_expire_month | |
| destination_expire_year | |
| destination_card_printed_name | |
| destination_card_recurring_payment_id | use either RPI or card number, not both |
| credit_card_number | |
| card_recurring_payment_id | use either RPI or card number, not both |
| amount | |
| currency | |
| cvv2 | |
| card_printed_name | |
| expire_month | |
| expire_year | |
| ipaddress | |
| order_desc | |
| redirect_url | |
| redirect_success_url | |
| redirect_fail_url | |
| client_orderid | |
| merchant_form_data | |
| deposit2card | boolean used only to determine if transaction type is deposit2card |
curl -H 'Authorization: OAuth oauth_consumer_key="paydroid", oauth_nonce="9Xr97SbpxZfUFtDmYtIK4BWZQ4h9lpEA", oauth_signature="Hn%2Fgw2n4gJ2ICLMIOiJmPUX8dHNL2S4zr3A%2Broucbc1ZYTvBaZYWaUGVPJcmyz%2FpTryWPHx4e6TEinmLCdQc4EiGDGWualnUZWrvNxyL06Ng%2BzLtByJO5PkauxD2I4r8iU14Tg0Al9rlDaq2ZoWd4NsHdKQB%2Fem%2Bhm2LGmfweQQYO00BxsD7axvhPjeDkI2cGmY5XubObiK31pZT8w7%2BFEkhzVwaXYXy8jCwZrlI0W30Dn7mSH9miPyxR43EFBEsH51JLZUHAAos4nUi0p0DrUVA4hrz57LZCHOKGWkshc7Sp30o%2BuWLnqY3Og84Xm6nzanosXq9OxiHZPCvdwabi3MHUQ5q8xZNWxX%2BvQSxnAVmduaskyduXzuztHP1LN76ILC30LLkVTx7NBdBaIpmf0dF6fGXFAyqHAN0QYZ0kB9xTz3OYCtsUrvZR48sLJSSPX72coAtPUyEXPcdmtfT8qlUSZyWbIc0WoaoyYnLybMDPf2NGFZZwo826c%2BzCoWvnUPSJ7VI0liDPmMjsk4Ckxaq4%2FcP8dBdLPRqHEMB3SyBiMh9VcbtEcEyBh24VC%2FW%2BMmJpFMUSjVRgTj6t1Nf5t2U2ZVX14UtLxGQYdyMZpC9JV6lucB8aIaNC6kAwQjS9wJqmDzpfQ5BGZS2wBPy9YqW%2FT0mZMdx9tbNfIV%2Fng8%3D", oauth_signature_method="RSA-SHA256", oauth_timestamp="1753200454", oauth_version="1.0"' --data 'amount=10.42&card_printed_name=John%20Doe&card_recurring_payment_id=42322&client_orderid=1&credit_card_number=4210708776705721¤cy=USD&cvv2=123&deposit2card=false&destination-card-no=4232618181101636&destination_card_recurring_payment_id=61622&expire_month=12&expire_year=2099&ipaddress=1.1.1.1&order_desc=Your%20order%20description&redirect_url=http%3A%2F%2Fwww.example.com' 'https://sandbox.billblend.com/checkout/api/v4/transfer/ENDPOINTID'<?php
/**
* Executes request
*
* @param string $url Url for payment method
* @param array $requestFields Request data fields
* @param array $customHeaders Custom request headers
*
* @return array Host response fields
*
* @throws RuntimeException Error while executing request
*/
function sendRequest($url, array $requestFields, array $customHeaders = array())
{
$curl = curl_init($url);
curl_setopt_array($curl, array
(
CURLOPT_HEADER => 1,
CURLOPT_USERAGENT => 'Billblend-Client/1.0',
CURLOPT_SSL_VERIFYHOST => 0,
CURLOPT_SSL_VERIFYPEER => 0,
CURLOPT_POST => 1,
CURLOPT_RETURNTRANSFER => 1
));
$headersJoiner = function($key, $value) {
return "{$key}: {$value}";
};
curl_setopt($curl, CURLOPT_HTTPHEADER, array_map($headersJoiner, array_keys($customHeaders), array_values($customHeaders)));
curl_setopt($curl, CURLOPT_POSTFIELDS, http_build_query($requestFields));
$response = curl_exec($curl);
if(curl_errno($curl))
{
$error_message = 'Error occurred: ' . curl_error($curl);
$error_code = curl_errno($curl);
}
elseif(curl_getinfo($curl, CURLINFO_HTTP_CODE) != 200)
{
$error_code = curl_getinfo($curl, CURLINFO_HTTP_CODE);
$error_message = "Error occurred. HTTP code: '{$error_code}'. Response: {$response}";
}
curl_close($curl);
if (!empty($error_message))
{
throw new RuntimeException($error_message, $error_code);
}
if(empty($response))
{
throw new RuntimeException('Host response is empty');
}
$responseFields = array();
parse_str($response, $responseFields);
return $responseFields;
}
$requestFields = array(
'destination-card-no' => '4232618181101636',
'credit_card_number' => '4210708776705721',
'amount' => '10.42',
'currency' => 'USD',
'cvv2' => '123',
'card_printed_name' => 'John Doe',
'expire_month' => '12',
'expire_year' => '2099',
'ipaddress' => '1.1.1.1',
'order_desc' => 'Your order description',
'redirect_url' => 'http://www.example.com',
'client_orderid' => '1',
'card_recurring_payment_id' => '42322',
'destination_card_recurring_payment_id' => '61622',
'deposit2card' => 'false',
);
$customHeaders = array(
'Authorization' => 'OAuth oauth_consumer_key="paydroid", oauth_nonce="9Xr97SbpxZfUFtDmYtIK4BWZQ4h9lpEA", oauth_signature="Hn%2Fgw2n4gJ2ICLMIOiJmPUX8dHNL2S4zr3A%2Broucbc1ZYTvBaZYWaUGVPJcmyz%2FpTryWPHx4e6TEinmLCdQc4EiGDGWualnUZWrvNxyL06Ng%2BzLtByJO5PkauxD2I4r8iU14Tg0Al9rlDaq2ZoWd4NsHdKQB%2Fem%2Bhm2LGmfweQQYO00BxsD7axvhPjeDkI2cGmY5XubObiK31pZT8w7%2BFEkhzVwaXYXy8jCwZrlI0W30Dn7mSH9miPyxR43EFBEsH51JLZUHAAos4nUi0p0DrUVA4hrz57LZCHOKGWkshc7Sp30o%2BuWLnqY3Og84Xm6nzanosXq9OxiHZPCvdwabi3MHUQ5q8xZNWxX%2BvQSxnAVmduaskyduXzuztHP1LN76ILC30LLkVTx7NBdBaIpmf0dF6fGXFAyqHAN0QYZ0kB9xTz3OYCtsUrvZR48sLJSSPX72coAtPUyEXPcdmtfT8qlUSZyWbIc0WoaoyYnLybMDPf2NGFZZwo826c%2BzCoWvnUPSJ7VI0liDPmMjsk4Ckxaq4%2FcP8dBdLPRqHEMB3SyBiMh9VcbtEcEyBh24VC%2FW%2BMmJpFMUSjVRgTj6t1Nf5t2U2ZVX14UtLxGQYdyMZpC9JV6lucB8aIaNC6kAwQjS9wJqmDzpfQ5BGZS2wBPy9YqW%2FT0mZMdx9tbNfIV%2Fng8%3D", oauth_signature_method="RSA-SHA256", oauth_timestamp="1753200454", oauth_version="1.0"'
);
$responseFields = sendRequest('https://sandbox.billblend.com/checkout/api/v4/transfer/ENDPOINTID', $requestFields, $customHeaders);
print_r($responseFields);
?>require 'net/http'
require 'uri'
require 'cgi'
##
# Executes request
#
# @param url [String] Url for payment method
# @param request_fields [Hash] Request data fields
# @param custom_headers [Hash] Custom request headers
#
# @return [Hash] Host response fields
def send_request(url, request_fields, custom_headers = [])
begin
uri = URI url
response = Net::HTTP.start uri.hostname, uri.port, :use_ssl => uri.scheme == 'https' do |http|
post = Net::HTTP::Post.new uri.request_uri
post.set_form_data request_fields
custom_headers.each do |key, value|
post[key] = value
end
http.request post
end
rescue Exception => e
raise RuntimeError, "Error occurred. #{e.message}"
end
unless Net::HTTPOK === response
raise RuntimeError, "Error occurred. HTTP code: '#{response.code}'. Response: '#{response.body}'"
end
unless response.body
raise RuntimeError, 'Host response is empty'
end
# Change hash format from {'key' => ['value']} to {'key' => 'value'} in map block
Hash[CGI.parse(response.body).map {|key, value| [key, value.first]}]
end
request_fields = {
'destination-card-no' => '4232618181101636',
'credit_card_number' => '4210708776705721',
'amount' => '10.42',
'currency' => 'USD',
'cvv2' => '123',
'card_printed_name' => 'John Doe',
'expire_month' => '12',
'expire_year' => '2099',
'ipaddress' => '1.1.1.1',
'order_desc' => 'Your order description',
'redirect_url' => 'http://www.example.com',
'client_orderid' => '1',
'card_recurring_payment_id' => '42322',
'destination_card_recurring_payment_id' => '61622',
'deposit2card' => 'false',
}
custom_headers = {
'Authorization' => 'OAuth oauth_consumer_key="paydroid", oauth_nonce="9Xr97SbpxZfUFtDmYtIK4BWZQ4h9lpEA", oauth_signature="Hn%2Fgw2n4gJ2ICLMIOiJmPUX8dHNL2S4zr3A%2Broucbc1ZYTvBaZYWaUGVPJcmyz%2FpTryWPHx4e6TEinmLCdQc4EiGDGWualnUZWrvNxyL06Ng%2BzLtByJO5PkauxD2I4r8iU14Tg0Al9rlDaq2ZoWd4NsHdKQB%2Fem%2Bhm2LGmfweQQYO00BxsD7axvhPjeDkI2cGmY5XubObiK31pZT8w7%2BFEkhzVwaXYXy8jCwZrlI0W30Dn7mSH9miPyxR43EFBEsH51JLZUHAAos4nUi0p0DrUVA4hrz57LZCHOKGWkshc7Sp30o%2BuWLnqY3Og84Xm6nzanosXq9OxiHZPCvdwabi3MHUQ5q8xZNWxX%2BvQSxnAVmduaskyduXzuztHP1LN76ILC30LLkVTx7NBdBaIpmf0dF6fGXFAyqHAN0QYZ0kB9xTz3OYCtsUrvZR48sLJSSPX72coAtPUyEXPcdmtfT8qlUSZyWbIc0WoaoyYnLybMDPf2NGFZZwo826c%2BzCoWvnUPSJ7VI0liDPmMjsk4Ckxaq4%2FcP8dBdLPRqHEMB3SyBiMh9VcbtEcEyBh24VC%2FW%2BMmJpFMUSjVRgTj6t1Nf5t2U2ZVX14UtLxGQYdyMZpC9JV6lucB8aIaNC6kAwQjS9wJqmDzpfQ5BGZS2wBPy9YqW%2FT0mZMdx9tbNfIV%2Fng8%3D", oauth_signature_method="RSA-SHA256", oauth_timestamp="1753200454", oauth_version="1.0"'
}
response_fields = send_request('https://sandbox.billblend.com/checkout/api/v4/transfer/ENDPOINTID', request_fields, custom_headers);
require 'pp'
pp response_fieldsimport java.io.*;
import java.net.HttpURLConnection;
import java.net.URL;
public class Main {
//Transactions are initiated by using URL in the following format: /checkout/api/v4/TRANSACTION_TYPE/ENDPOINTID or /checkout/api/v4/TRANSACTION_TYPE/ENDPOINTGROUPID (if group is supported)
//Use "gate" for production purposes or "sandbox" for integration needs
private static String targetURL = "https://sandbox.billblend.com/checkout/api/v4/transfer/ENDPOINTID";
//Request parameters
private static String urlParameters = "amount=10.42&card_printed_name=John%20Doe&card_recurring_payment_id=42322&client_orderid=1&credit_card_number=4210708776705721¤cy=USD&cvv2=123&deposit2card=false&destination-card-no=4232618181101636&destination_card_recurring_payment_id=61622&expire_month=12&expire_year=2099&ipaddress=1.1.1.1&order_desc=Your%20order%20description&redirect_url=http%3A%2F%2Fwww.example.com";
public static void main(String[] args) {
//Sending POST request to the specified URL with request parameters
System.out.println(executePost(targetURL, urlParameters));
}
public static String executePost(String targetURL, String urlParameters)
{
URL url;
HttpURLConnection connection = null;
try {
//Create connection
url = new URL(targetURL);
connection = (HttpURLConnection)url.openConnection();
connection.setDoOutput(true);
boolean hasHeaders = true;
if(hasHeaders){
String header ="OAuth oauth_consumer_key=\"paydroid\", oauth_nonce=\"9Xr97SbpxZfUFtDmYtIK4BWZQ4h9lpEA\", oauth_signature=\"Hn%2Fgw2n4gJ2ICLMIOiJmPUX8dHNL2S4zr3A%2Broucbc1ZYTvBaZYWaUGVPJcmyz%2FpTryWPHx4e6TEinmLCdQc4EiGDGWualnUZWrvNxyL06Ng%2BzLtByJO5PkauxD2I4r8iU14Tg0Al9rlDaq2ZoWd4NsHdKQB%2Fem%2Bhm2LGmfweQQYO00BxsD7axvhPjeDkI2cGmY5XubObiK31pZT8w7%2BFEkhzVwaXYXy8jCwZrlI0W30Dn7mSH9miPyxR43EFBEsH51JLZUHAAos4nUi0p0DrUVA4hrz57LZCHOKGWkshc7Sp30o%2BuWLnqY3Og84Xm6nzanosXq9OxiHZPCvdwabi3MHUQ5q8xZNWxX%2BvQSxnAVmduaskyduXzuztHP1LN76ILC30LLkVTx7NBdBaIpmf0dF6fGXFAyqHAN0QYZ0kB9xTz3OYCtsUrvZR48sLJSSPX72coAtPUyEXPcdmtfT8qlUSZyWbIc0WoaoyYnLybMDPf2NGFZZwo826c%2BzCoWvnUPSJ7VI0liDPmMjsk4Ckxaq4%2FcP8dBdLPRqHEMB3SyBiMh9VcbtEcEyBh24VC%2FW%2BMmJpFMUSjVRgTj6t1Nf5t2U2ZVX14UtLxGQYdyMZpC9JV6lucB8aIaNC6kAwQjS9wJqmDzpfQ5BGZS2wBPy9YqW%2FT0mZMdx9tbNfIV%2Fng8%3D\", oauth_signature_method=\"RSA-SHA256\", oauth_timestamp=\"1753200454\", oauth_version=\"1.0\"";
connection.setRequestProperty("Authorization", header);
connection.setRequestProperty("cache-control", null);
connection.setRequestProperty("pragma", null);
}
//Send request
DataOutputStream wr = new DataOutputStream (
connection.getOutputStream ());
wr.writeBytes (urlParameters);
wr.flush ();
wr.close ();
//Get Response
InputStream is = connection.getInputStream();
BufferedReader rd = new BufferedReader(new InputStreamReader(is));
String line;
StringBuffer response = new StringBuffer();
while((line = rd.readLine()) != null) {
response.append(line);
response.append('\n');
}
rd.close();
return response.toString();
} catch (Exception e) {
e.printStackTrace();
return null;
} finally {
if(connection != null) {
connection.disconnect();
}
}
}
}