Search code examples
paypalpaypal-ipnpaypal-rest-sdkpaypal-subscriptions

Set Custom Values to PayPal's Billing Agreements created via API


Is it possible to set custom values while creating an agreement using PayPal's Billing Agreements API? I would like these values to be returned by the IPN system.

For example, I want to pass a "purchase id" to the agreement.


Solution

  • using PayPal's Billing Agreements API

    Be more specific, there are several classic or REST APIs this could be referring to. Each have their own API reference on https://developer.paypal.com

    In general there are two parameters you can use, which will be named slightly differently depending on the API request you are using to actually create the transaction or recurring profile:

    • invoice or invoice_id :: by default must be unique, never before used for a successful transaction on your account, prevents accidental/duplicate payments
    • custom or custom_id :: can be anything