Skip to main content
Aria Knowledge Central

init_paypal_bill_agreement_m Sample Call and Response

This example creates a session with PayPal so that an account user can set up a billing agreement with an Aria client, based on the method definition in plsql_m_r73.yml. All PayPal identifiers shown are clearly fake and are provided only to illustrate the shape of the request and response.

This example includes every required field and a representative set of commonly used optional fields, not every field the method accepts.

Sample call

{
  "rest_call": "init_paypal_bill_agreement_m",
  "output_format": "json",
  "client_no": 10023,
  "auth_key": "a1b2c3d4e5f6g7h8i9j0k1l2m3n4o5p6",
  "acct_no": 3300481,
  "req_billing_address": 1,
  "update_avs_return_address": 1,
  "paypal_credit": 0,
  "in_context_checkout": 1
}

The envelope fields rest_call and output_format are added by the REST layer and are not part of the method’s own documented arguments. The account is identified with acct_no rather than its alternative, client_acct_id. The req_billing_address value of one means the call sends an address verification request to PayPal, and update_avs_return_address value of one means Aria updates its billing address from the returned address verification results; other values allow you to suppress this behavior or defer to configuration settings. The paypal_credit value of zero means the PayPal Credit financing option is not offered to the buyer. The in_context_checkout value of one means the buyer completes the PayPal flow in a secure window layered over the client’s own site rather than being redirected away from it.

Sample response

{
  "error_code": 0,
  "error_msg": "OK",
  "error_details": "",
  "return_url": "https://checkout.acmewireless.example.com/paypal/confirm",
  "token": "EC-FAKE7788990011AABBCC",
  "billing_group_no": 550281
}

An error_code of zero and an error_msg of OK indicate that the call succeeded. The token field holds the PayPal-supplied session token, valid for only fifteen minutes, that the client must pass to the follow-up save_paypal_bill_agreement_m call. The return_url field holds the client-configured PayPal Agreement Confirmation URL that the USS or Reg software uses to direct the end user to the next step. This example leaves out the amount, billing_group_no, client_billing_group_id, master_plan_instance_no, and client_master_plan_instance_id input fields, since this billing agreement is not being tied to a specific existing billing group or master plan instance at initiation time.

TOP
  • Was this article helpful?