Skip to main content
Aria Knowledge Central

save_paypal_bill_agreement_m Sample Call and Response

This example shows a call that confirms a PayPal billing agreement after the account holder has accepted it, using the session token that init_paypal_bill_agreement_m previously created. The example is based on the save_paypal_bill_agreement_m method defined in plsql_m_r73.yml.

This example includes every required field and a representative set of commonly used optional fields, not every field the method accepts. The token and identifiers shown are fictitious placeholders and do not resemble real PayPal or Aria credentials.

Sample call

{
  "rest_call": "save_paypal_bill_agreement_m",
  "output_format": "json",
  "client_no": 4521,
  "auth_key": "FAKE-AUTH-KEY-0001",
  "acct_no": 830147,
  "token": "FAKE-PP-TOKEN-771",
  "billing_group_no": 60214,
  "auth_reversal": "false"
}

The account is identified with acct_no, one side of an alternative-identifier pair that also includes client_acct_id; acct_no is used here because it is the Aria-assigned numeric identifier. The billing agreement is tied to a billing group, which is identified with billing_group_no, one of a group of four alternative identifiers that also includes client_billing_group_id, master_plan_instance_no, and client_master_plan_instance_id; only one of the four is supplied. The auth_reversal value of “false” means the authorization created alongside this billing agreement is not immediately reversed, which is the default behavior; a value of “true” would reverse it immediately. The rest_call and output_format fields are not part of the method’s own documented arguments; they are added by the REST gateway that routes the request to this method.

Sample response

{
  "error_code": 0,
  "error_msg": "OK",
  "bill_agreement_id": "BA-FAKE-99001122",
  "paypal_email": "sample.customer@example.com",
  "paypal_payerid": "FAKEPAYERID44",
  "paypal_payerstatus": "verified",
  "auth_no": 9021789,
  "proc_payment_id": "PROC-FAKE-556677"
}

An error_code of zero and an error_msg of “OK” indicate that the billing agreement was confirmed and saved. This example leaves out several optional PayPal-supplied address fields that the method can return, including paypal_countrycode, paypal_shiptoname, paypal_shiptostreet, paypal_shipttostreet2, paypal_shiptocity, paypal_shiptostate, paypal_shiptozip, paypal_shiptocountrycode, and paypal_addressstatus, all of which follow the same pattern as the fields shown here.

TOP
  • Was this article helpful?