PayPal Recurring (Billing Agreement)
Initial setup of a billing agreement via Hosted Payment Page
Pre-conditions
On the gateway side, your account must be set up with the Data Vault / Hosted Data service.
Please contact PayPal to verify if your PayPal business account meets the PayPal requirements for this feature.
Besides sending the paymentMethod
as 'paypal', you need to submit the parameter chargetotal
with a zero value in your preauthorization request. Such transaction request is always used to create a Billing Agreement ID on the PayPal side, returned to you in the field hostedDataId
Transaction Response
Response parameter | Description |
---|---|
approval_code | Transaction approval code. Initial character indicates the transaction status. ‘Y’ – Transaction approved ‘N’ – Transaction declined ‘?:waiting PAYPAL’ – Transaction has been initiated but a final result is not yet available |
status | Transaction status, e.g. ‘APPROVED’, ‘DECLINED’, ‘FAILED’ or ‘WAITING’ |
hostedDataId | Stores “Billing Agreement ID” |
sname | Ship-to Name |
saddr1 | Shipping Address |
scity | Shipping City |
scountry | Country of Shipping Address |
szip | Zip or Postal Code |
fail_reason | Indicates why the transaction was declined |
ipgTransactionId | It is mapped to the PayPal Custom. You will be able to see this value in your PayPal seller account while reviewing a transaction |
refnumber | Represents the PayPal Transaction ID. The value will be visible in your PayPal seller account while reviewing a transaction |
Initate a recurring PayPal transaction using the billing agreement
In order to execute a recurring or subsequent payment transaction based on the billing agreement, you need to use our RESTful payment API. Please refer to:
Updated 22 days ago