The buttons in the examples include line breaks to make it easier to see the different variables and their values. The actual buttons will not include line breaks. The encrypted buttons in the examples have been shortened for illustration. The actual length of the encrypted information is about 2000-3000 characters.
Creating a Regular Payment Button
Example Request
ics_applications=ics_paypal_button_create merchant_id=infodev
merchant_ref_number=482046C3A7E9XYZ button_type=buy
customer_firstname=Joe customer_lastname=Smith bill_address1=1040 Elm St.
bill_city=San Jose bill_state=CA bill_zip=95127 bill_country=US ship_to_firstname=Joe ship_to_lastname=Smith
ship_to_address1=1040 Elm St.
ship_to_city=San Jose ship_to_state=CA ship_to_zip=95127 ship_to_country=US grand_total_amount=25.99 total_tax_amount=2.55 freight_amount=4.95 currency=USD
paypal_cancel_return=http://paypalcancel.example.com paypal_return=http://paypalsuccess.example.com paypal_item_name=Nouveau Lamp
paypal_item_number=3362710 server_host=ics2testa.ic3.com server_port=80
Example Reply
request_id=0305782650000167905080
request_token=AA4JUrWguaLLQxMUGwxSWVdPS1BIRk5IMUwA2yCv merchant_ref_number=482046C3A7E9XYZ
ics_rcode=1 ics_rflag=SOK
ics_rmsg=Request was processed successfully.
paypal_button_create_rcode=1 paypal_button_create_rflag=SOK
paypal_button_create_rmsg=Request was processed successfully.
paypal_button_create_button_type=buy paypal_button_create_amount=33.49 currency=USD
paypal_button_create_time=2005-04-27T184955Z paypal_button_create_trans_ref_no=RYXWMQX04MC9 paypal_button_create_unencrypted_form_data=
<form action="https://www.paypal.com/cgi-bin/webscr" method="post">
<input type="image" src="https://https://www.paypal.com/en_US/i/btn/x-click-but23.gif" border="0" name="submit">
<input type="hidden" name="cmd" value="_s-xclick">
<input type="hidden" name="business" value="[email protected]">
<input type="hidden" name="first_name" value="Joe">
<input type="hidden" name="Smith" value="Smith">
<input type="hidden" name="address1" value="1040 Elm St">
<input type="hidden" name="city" value="San Jose">
<input type="hidden" name="state" value="CA">
<input type="hidden" name="zip" value="95127">
<input type="hidden" name="amount" value="25.99">
<input type="hidden" name="tax" value="2.55">
<input type="hidden" name="handling" value="0.00">
<input type="hidden" name="shipping" value="4.95">
<input type="hidden" name="item_number"value="3362710">
<input type="hidden" name="cancel_return" value="http://
paypalcancel.example.com">
<input type="hidden" name="undefined_quantity" value="1">
<input type="hidden" name="quantity" value="0">
<input type="hidden" name="return" value="http://
paypalsuccess.example.com">
<input type="hidden" name="item_name" value="Noveau Lamp">
<input type="hidden" name="shipping2" value="0.00">
<input type="hidden" name="currency_code" value="USD">
<input type="hidden" name="undefined_quantity" value="1">
<input type="hidden" name="quantity" value="0">
<input type="hidden" name="return" value="http://
paypalsuccess.example.com">
<input type="hidden" name="return" value="http://
paypalsuccess.example.com">
<input type="hidden" name="item_name" value="Noveau Lamp">
<input type="hidden" name="shipping2" value="0.00">
<input type="hidden" name="currency_code" value="USD">
<input type="hidden" name="bn" value="CyberSource">
<input type="hidden" name="notify_url" value="http://example.com/ipn">
<input type="hidden" name="invoice" value="RYXWMQX04MC9">
<input type="hidden" name="custom"
value="RYXWMQX04MC9,0305782650000167905080,482046C3A7E9XYZ"></form>
paypal_button_create_encrypted_form_data=
<form action="https://www.paypal.com/cgi-bin/webscr" method="post">
<input type="image" src="https://https://www.paypal.com/en_US/i/btn/x-click-but23.gif" border="0" name="submit">
<input type="hidden" name="cmd" value="_s-xclick">
<input type="hidden" name="encrypted" value=
"---BEGIN
PKCS7---MIIGTQYJKoZIhvcNAQcDoIIGPjCCBjoCAQAxggE6MIIBNgIBADCBnjCBmDELMAkGA1UEBhM CVVMxEzARBgNVBAgTCkNhbGlmb3JuaWExETAPBgNVBAcTCFNhbiBKb3NlMRUwEwYDSIb3DQ EBAQUABIGAg0SFsADkAz5l03qK8we8z3zt86F9IZB8q8J+oCSjmBWgrZdh+VKHgPL2SKuRG rifwXDCGFOJonjYK5EKExeSCmR/eZRUwzIpUmnKAY/r7Hqzd/e1IslJuFZ9/iKQO2hK/
wRq5VYIL22MGn0fY8GZ6CBmM76ceYojOe/XmlpUOLjANQnx2MVMI85hhpMAcaM ---END PKCS7---"></form>
client_lib_version=Perl3.2/MSWin324.0/NT4.0/WIN32/C/3.4.5
Creating a Billing Agreement Button
Example Request
ics_applications=ics_paypal_button_create merchant_id=infodev
merchant_ref_number=482046C3A7E94F5 button_type=preapproved_billing_agreement customer_firstname=Joe
customer_lastname=Smith bill_address1=1040 Elm St.
bill_city=San Jose bill_state=CA bill_zip=95127 bill_country=US
paypal_return=http://basuccess.example.com paypal_mp_cycle_start=1
paypal_mp_desc=Gold Package Web Access at www.example.com paypal_mp_max=20.00
paypal_mp_test_amount=10.00 server_host=ics2testa.ic3.com server_port=80
Example Reply request_id=0305782650000167905081
request_token=rWguaL5IMUwAwxAA4JUS1BIRk2Rk5IMUyCv merchant_ref_number=482046C3A7E94F3
ics_rcode=1 ics_rflag=SOK
ics_rmsg=Request was processed successfully.
paypal_button_create_rcode=1 paypal_button_create_rflag=SOK
paypal_button_create_rmsg=Request was processed successfully.
paypal_button_create_button_type=preapproved_billing_agreement paypal_button_create_amount=33.49
currency=USD
paypal_button_create_time=2005-04-29T184955Z paypal_button_create_trans_ref_no=RYXWMQX04MC1 paypal_button_create_unencrypted_form_data=
<form action="https://www.paypal.com/cgi-bin/webscr" method="post">
<input type="submit" name="submit" value="Approve Agreement">
<input type="hidden" name="cmd" value="_xclick-merchant">
<input type="hidden" name="business" value="[email protected]">
<input type="hidden" name="mp_max" value="20.00">
<input type="hidden" name="mp_cycle_start" value="1">
<input type="hidden" name="mp_test_amount" value="10.00">
<input type="hidden" name="return" value="http://basuccess.example.com">
<input type="hidden" name="mp_desc" value="Gold Package Web Access at www.example.com">
<input type="hidden" name="currency_code" value="USD">
<input type="hidden" name="bn" value="CyberSource">
<input type="hidden" name="notify_url" value="http://example.com/ipn">
<input type="hidden" name="mp_custom"
value="RYXWMQX04MC1,0305782650000167905081,482046C3A7E94F3"></form>
paypal_button_create_encrypted_form_data=
<form action="https://www.paypal.com/cgi-bin/webscr" method="post">
<input type="image" src="https://https://www.paypal.com/en_US/i/btn/x-click-but23.gif" border="0" name="submit">
<input type="hidden" name="cmd" value="_s-xclick">
<input type="hidden" name="encrypted" value="
"---BEGIN
PKCS7---MIIGTQYJKoZIhvcNAQcDoIIGPjCCBjoCAQAxggE6MIIBNgIBADCBnjCBmDELMAkGA1UEBhMCVVMxEzARBgNVB AgTCkNhbGlmb3JuaWExETAPBgNVBAcTCFNhbiBKb3NlMRUwEwYDSIb3DQEBAQUABIGAg0SFsADkAz5l03qK8w e8z3zt86F9IZB8q8J+oCSjmBWgrZdh+VKHgPL2SKuRGrifwXDCGFOJonjYK5EKExeSCmR/eZRUwzIpUmnKAY/
r7Hqzd/e1IslJuFZ9/iKQO2hK/wRq5VYIL22MGn0fY8GZ6CBmM76ceYojOe/
XmlpUOLjANQnx2MVMI85hhpMAcaM ---END PKCS7---"></form>
Processing a Preapproved Payment
Example Request
Example Reply
ics_applications=ics_paypal_preapproved_payment merchant_id=infodev
merchant_ref_number=482046C3A7E94F3 customer_firstname=Joe
customer_lastname=Smith bill_address1=1040 Elm St.
bill_city=San Jose bill_state=CA bill_zip=95127 bill_country=US
grand_total_amount=19.95 currency=USD
paypal_mp_id=B-123456789ABCDEFGH
paypal_email_subject=Your Monthly Payment for Gold Package at www.example.com
server_host=ics2testa.ic3.com server_port=80
request_id=0305782650000167905052
request_token=AA4JUrWguaLLQxMUGwxSWVdPS1BIRk5IMUwA2yCv merchant_ref_number=482046C3A7E94F3
ics_rcode=1 ics_rflag=SOK
ics_rmsg=Request was processed successfully.
paypal_preapproved_payment_rcode=1 paypal_preapproved_payment_rflag=SOK
paypal_preapproved_payment_rmsg=Request was processed successfully.
currency=USD
paypal_preapproved_payment_time=2005-05-27T184955Z paypal_preapproved_payment_trans_ref_no=RYXWMQX04MC2
paypal_preapproved_payment_desc=Gold Package Web Access at www.example.com
paypal_preapproved_payment_fee_amount=0.00 paypal_preapproved_payment_mp_max=20.00 paypal_preapproved_payment_mp_status=Active [email protected] paypal_preapproved_payment_payer_country=US paypal_preapproved_payment_payer_id=S6D5MJQSVYX94 paypal_preapproved_payment_payer_name=Joe Smith paypal_preapproved_payment_payer_status=verified
paypal_preapproved_payment_payment_date=10:50:30 May 27, 2005 PST paypal_preapproved_payment_payment_gross_amount=19.95
paypal_preapproved_payment_tax_amount=19.95
paypal_preapproved_payment_payment_status=Completed paypal_preapproved_payment_payment_type=instant
paypal_preapproved_payment_transaction_id=56K11500RY2882507 paypal_preapproved_payment_pending_reason=none
paypal_preapproved_payment_transaction_type=mercht-pmt client_lib_version=Perl3.2/MSWin324.0/NT4.0/WIN32/C/3.4.5
Updating a Billing Agreement
This example cancels the billing agreement. You could also update the billing agreement with a different description.
Example Request
ics_applications=ics_paypal_preapproved_update merchant_id=infodev
merchant_ref_number=482046C3A7E94F3 paypal_mp_ip=B-123456789ABCDEFGH paypal_mp_status=Canceled
server_host=ics2testa.ic3.com server_port=80
Example Reply
request_id=0305782650000168405099
request_token=AA4JUrWguaLLQxMUGwxSWVdPS1BIRk5IMUwA2yCv merchant_ref_number=482046C3A7E94F3
ics_rcode=1 ics_rflag=SOK
ics_rmsg=Request was processed successfully.
paypal_preapproved_update_rcode=1 paypal_preapproved_update_rflag=SOK
paypal_preapproved_update_rmsg=Request was processed successfully.
currency=USD
paypal_preapproved_update_time=2005-06-17T184955Z paypal_preapproved_update_trans_ref_no=RYXWMQX04WC4
paypal_preapproved_update_desc=Gold Package Web Access at www.example.com
paypal_preapproved_update_mp_max=20.00 paypal_preapproved_update_mp_status=Canceled [email protected] paypal_preapproved_update_payer_country=US paypal_preapproved_update_payer_id=S6D5MJQSVYX94 paypal_preapproved_update_payer_name=Joe Smith paypal_preapproved_update_payer_status=verified
client_lib_version=Perl3.2/MSWin324.0/NT4.0/WIN32/C/3.4.5
Processing a Credit
Example Request
Example Reply
ics_applications=ics_paypal_credit merchant_id=infodev
merchant_ref_number=482046C3A7E94F5
paypal_payment_request_id=0305782650000168405099
order_request_token=AA4JUrWguaLLQxMUGwxSWVdPS1BIRk5IMUwA2yCv currency=USD
grand_total_amount=10.00 server_host=ics2testa.ic3.com server_port=80
request_id=0305782650000167943227
request_token=AA4JUrWguaLLQxMUGwxSWVdPS1BIRk5IMUwA2yCv merchant_ref_number=482046C3A7E94F5
ics_rcode=1 ics_rflag=SOK
ics_rmsg=Request was processed successfully.
paypal_credit_rcode=1 paypal_credit_rflag=SOK
paypal_credit_rmsg=Request was processed successfully.
paypal_credit_time=2005-05-19T18:49:55Z paypal_credit_trans_ref_no=RYX9483QX04WC4 paypal_credit_amount=10.00
currency=USD
client_lib_version=Perl3.2/MSWin324.0/NT4.0/WIN32/C/3.4.5
Creating a Shopping Cart Button
Example Request
ics_applications=ics_paypal_button_create button_type=shopping_cart
merchant_id=infodev
merchant_ref_number=482046C3A7E94F5
paypal_cancel_return=http://paypalcancel.example.com paypal_return=http://paypalsuccess.example.com paypal_item_name_1=Book
paypal_item_number_1=999999 paypal_amount_1=25.95 paypal_quantity_1=1 paypal_shipping_1=3.95 paypal_shipping2_1=0.00 paypal_handling_1=0.00 paypal_tax_1=0.00 paypal_item_name_2=DVD paypal_item_number_2=777777 paypal_amount_2=18.95 paypal_quantity_2=1 paypal_shipping_2=0.00 paypal_shipping2_2=0.00 paypal_handling_2=0.00 paypal_tax_2=0.00
// Include the API fields for the billing // and shipping information here