> For the complete documentation index, see [llms.txt](https://docs.verifone.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.verifone.com/api-reference/open-api-references/paypal-ecommerce/billing-agreements.md).

# Billing Agreements

**Billing Agreements** enable recurring payments by creating a stored PayPal payment method on behalf of a payer. Once a billing agreement is in place, it can be referenced in future transactions without requiring the payer to authenticate each time.

The billing agreement lifecycle follows a two-step initiation flow: first generate a token, then convert it to a live agreement after the payer approves.

## How It Works

{% stepper %}
{% step %}

## Initiate the agreement

Call `POST /billingAgreement/initiate` with the PayPal contract details. You receive an approval token and a redirect URL.
{% endstep %}

{% step %}

## Redirect the payer

Send the payer to the PayPal approval URL so they can consent to the recurring billing arrangement.
{% endstep %}

{% step %}

## Create the agreement

After the payer approves, call `POST /billingAgreement/create` with the token to convert approval into a live billing agreement. Store the returned `agreementId` for future use.
{% endstep %}
{% endstepper %}

{% hint style="danger" %}
Store the `agreementId` from the Create Billing Agreement response. This ID is required to reference the agreement in future transactions and to retrieve or cancel it later.
{% endhint %}

## Initiate Billing Agreement

Initiates a new billing agreement by generating a PayPal approval token and redirect URL. The payer must visit the redirect URL to consent before the agreement can be created.

## POST /billingAgreement/initiate

> Initiate billing agreement

```json
{"openapi":"3.0.1","info":{"title":"PayPal eComm API","version":"1.6.0"},"servers":[{"url":"https://emea.gsc.verifone.cloud/oidc/paypal-ecom","description":"EMEA Production"},{"url":"https://us.gsc.verifone.cloud/oidc/paypal-ecom","description":"Americas Production"},{"url":"https://nz.gsc.verifone.cloud/oidc/paypal-ecom","description":"New Zealand"},{"url":"https://cst.test-gsc.vfims.com/oidc/paypal-ecom","description":"Global Sandbox"},{"url":"https://uscst.gb.gsc.cficloud/oidc/paypal-ecom","description":"Americas Sandbox"}],"security":[{"bearerAuth":[]}],"components":{"securitySchemes":{"bearerAuth":{"scheme":"bearer","bearerFormat":"JWT","type":"http"}},"schemas":{"Model32":{"required":["paymentProviderContract"],"type":"object","properties":{"paymentProviderContract":{"type":"string","description":"PayPal Payment Provider Contract UUID"},"description":{"type":"string","description":"Agreement description"},"shippingAddress":{"$ref":"#/components/schemas/Model31"},"enableAddressChange":{"type":"boolean","description":"Indicates whether to show the shipping address but prevent the customer from editing it."},"collectShippingAddress":{"type":"boolean","description":"Indicates whether to skip the collection of the shipping address from the customer during the agreement sign-up phase."},"allowedCountries":{"$ref":"#/components/schemas/allowedCountries"},"experienceId":{"type":"string","description":"The ID of the experience profile to apply during the agreement approval UI flow."},"externalSelectedFundingInstrumentType":{"type":"string","description":"The type of financial instrument (FI) that the merchant wants to promote.","enum":["CREDIT","PAY_UPON_INVOICE"]},"returnUrl":{"type":"string","description":"The URL where the customer is redirected after the customer approves the payment"},"cancelUrl":{"type":"string","description":"The URL where the customer is redirected after the customer cancels the payment"}}},"Model31":{"required":["addressLine1","city","country","countrySubdivision","postalCode"],"type":"object","properties":{"country":{"maxLength":2,"minLength":2,"pattern":"^([A-Z]{2}|C2)$","type":"string","description":"The two-character ISO 3166-1 code that identifies the country or region."},"postalCode":{"maxLength":60,"type":"string","description":"The postal code, which is the zip code or equivalent.  Typically required for countries with a postal code or an equivalent."},"countrySubdivision":{"maxLength":300,"type":"string","description":"The highest level sub-division in a country, which is usually a province, state, or ISO-3166-2 subdivision."},"city":{"maxLength":120,"type":"string","description":"A city, town, or village. Smaller than admin_area_level_1"},"addressLine2":{"maxLength":300,"type":"string","description":"The second line of the address. For example, suite or apartment number."},"addressLine1":{"maxLength":300,"type":"string","description":"The first line of the address. For example, number or street.  For example, 173 Drury Lane. Required for data entry and compliance and risk checks. Must contain the full address."}},"description":"Shipping Address details"},"allowedCountries":{"type":"array","description":"An array of legally accepted customer country codes","items":{"maxLength":2,"minLength":2,"pattern":"^([A-Z]{2}|C2)$","type":"string","description":"The two-character ISO 3166-1 code that identifies the country or region."}},"Model33":{"required":["approvalUrl","billingToken"],"type":"object","properties":{"approvalUrl":{"type":"string","description":"PayPal approval URL"},"billingToken":{"type":"string","description":"Billing token"}}},"Model5":{"required":["code","message"],"type":"object","properties":{"code":{"type":"number","description":"A 3-digit code which uniquely identify an error."},"details":{"$ref":"#/components/schemas/details"},"message":{"type":"string","description":"A description of the error."},"timestamp":{"type":"string","description":"Error timestamp","format":"date"}}},"details":{"type":"object"}}},"paths":{"/billingAgreement/initiate":{"post":{"tags":["Billing Agreement"],"summary":"Initiate billing agreement","operationId":"postBillingagreementInitiate","requestBody":{"content":{"*/*":{"schema":{"$ref":"#/components/schemas/Model32"}}},"required":false},"responses":{"200":{"description":"Successful","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Model33"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Model5"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Model5"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Model5"}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Model5"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Model5"}}}}}}}}}
```

## Show Token Details

Retrieves details about a billing agreement token before it is converted to a live agreement. Use this to inspect the token state or payer information after redirect.

## GET /billingAgreement/token/{tokenId}

> Show token details

```json
{"openapi":"3.0.1","info":{"title":"PayPal eComm API","version":"1.6.0"},"servers":[{"url":"https://emea.gsc.verifone.cloud/oidc/paypal-ecom","description":"EMEA Production"},{"url":"https://us.gsc.verifone.cloud/oidc/paypal-ecom","description":"Americas Production"},{"url":"https://nz.gsc.verifone.cloud/oidc/paypal-ecom","description":"New Zealand"},{"url":"https://cst.test-gsc.vfims.com/oidc/paypal-ecom","description":"Global Sandbox"},{"url":"https://uscst.gb.gsc.cficloud/oidc/paypal-ecom","description":"Americas Sandbox"}],"security":[{"bearerAuth":[]}],"components":{"securitySchemes":{"bearerAuth":{"scheme":"bearer","bearerFormat":"JWT","type":"http"}},"schemas":{"Model17":{"required":["tokenId"],"type":"object","properties":{"tokenId":{"type":"string","description":"The state of the agreement."},"status":{"type":"string","description":"The description of the agreement."},"description":{"type":"string","description":"The description of the agreement."},"collectShippingAddress":{"type":"boolean","description":"Indicates whether to skip the collection of the shipping address from the customer during the agreement sign-up phase."},"enableAddressChange":{"type":"boolean","description":"Indicates whether to show the shipping address but prevent the customer from editing it."},"payerInfo":{"$ref":"#/components/schemas/payerInfo"},"redirectUrls":{"$ref":"#/components/schemas/redirectUrls"},"experienceId":{"type":"string","description":"The ID of the experience profile to apply during the agreement approval UI flow."},"externalSelectedFundingInstrumentType":{"type":"string","description":"The type of financial instrument (FI) that the merchant wants to promote.","enum":["CREDIT","PAY_UPON_INVOICE"]}}},"payerInfo":{"required":["email","payerId"],"type":"object","properties":{"email":{"type":"string","description":"The payer's email address."},"suffix":{"type":"string","description":"The payer's name suffix."},"firstName":{"type":"string","description":"The payer's first name."},"lastName":{"type":"string","description":"The payer's last name."},"payerId":{"type":"string","description":"The PayPal-assigned payer ID."},"phone":{"type":"string","description":"The payer's phone number."},"billingAddress":{"$ref":"#/components/schemas/billingAddress"}}},"billingAddress":{"required":["country","postalCode"],"type":"object","properties":{"country":{"maxLength":2,"minLength":2,"pattern":"^([A-Z]{2}|C2)$","type":"string","description":"The two-character ISO 3166-1 code that identifies the country or region."},"postalCode":{"maxLength":60,"type":"string","description":"The postal code, which is the zip code or equivalent.  Typically required for countries with a postal code or an equivalent."},"countrySubdivision":{"maxLength":300,"type":"string","description":"The highest level sub-division in a country, which is usually a province, state, or ISO-3166-2 subdivision."},"city":{"maxLength":120,"type":"string","description":"A city, town, or village. Smaller than admin_area_level_1"},"addressLine2":{"maxLength":300,"type":"string","description":"The second line of the address. For example, suite or apartment number."},"addressLine1":{"maxLength":300,"type":"string","description":"The first line of the address. For example, number or street.  For example, 173 Drury Lane. Required for data entry and compliance and risk checks. Must contain the full address."}},"description":"Shipping Address details"},"redirectUrls":{"type":"object","properties":{"returnUrl":{"type":"string","description":"The URL where the customer is redirected after the customer approves the payment"},"cancelUrl":{"type":"string","description":"The URL where the customer is redirected after the customer cancels the payment"}}},"Model5":{"required":["code","message"],"type":"object","properties":{"code":{"type":"number","description":"A 3-digit code which uniquely identify an error."},"details":{"$ref":"#/components/schemas/details"},"message":{"type":"string","description":"A description of the error."},"timestamp":{"type":"string","description":"Error timestamp","format":"date"}}},"details":{"type":"object"}}},"paths":{"/billingAgreement/token/{tokenId}":{"get":{"tags":["Billing Agreement"],"summary":"Show token details","operationId":"getBillingagreementTokenTokenid","parameters":[{"name":"tokenId","in":"path","description":"The ID of the agreement token for which to show details.","required":true,"schema":{"type":"string"}},{"name":"paymentProviderContract","in":"query","description":"PayPal Payment Provider Contract UUID","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Successful","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Model17"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Model5"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Model5"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Model5"}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Model5"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Model5"}}}}}}}}}
```

## Create Billing Agreement

Converts an approved billing agreement token into a live PayPal billing agreement. Call this after the payer has completed the PayPal approval flow.

{% hint style="warning" %}
Use `x-vfi-api-idempotencyKey` to prevent duplicate agreement creation on network retries.
{% endhint %}

## POST /billingAgreement/create

> Create billing agreement using token

```json
{"openapi":"3.0.1","info":{"title":"PayPal eComm API","version":"1.6.0"},"servers":[{"url":"https://emea.gsc.verifone.cloud/oidc/paypal-ecom","description":"EMEA Production"},{"url":"https://us.gsc.verifone.cloud/oidc/paypal-ecom","description":"Americas Production"},{"url":"https://nz.gsc.verifone.cloud/oidc/paypal-ecom","description":"New Zealand"},{"url":"https://cst.test-gsc.vfims.com/oidc/paypal-ecom","description":"Global Sandbox"},{"url":"https://uscst.gb.gsc.cficloud/oidc/paypal-ecom","description":"Americas Sandbox"}],"security":[{"bearerAuth":[]}],"components":{"securitySchemes":{"bearerAuth":{"scheme":"bearer","bearerFormat":"JWT","type":"http"}},"schemas":{"Model29":{"required":["billingToken","paymentProviderContract"],"type":"object","properties":{"billingToken":{"type":"string","description":"PayPal agreement token"},"paymentProviderContract":{"type":"string","description":"PayPal Payment Provider Contract UUID"}}},"Model30":{"required":["createTime","id","state"],"type":"object","properties":{"id":{"type":"string","description":"The ID of the agreement."},"state":{"type":"string","description":"The state of the agreement."},"description":{"type":"string","description":"The description of the agreement."},"merchant":{"$ref":"#/components/schemas/merchant"},"payer":{"$ref":"#/components/schemas/payer"},"plan":{"$ref":"#/components/schemas/plan"},"createTime":{"type":"string","description":"The date and time when the agreement was created."},"updateTime":{"type":"string","description":"The date and time when the agreement was updated."}}},"merchant":{"type":"object","properties":{"payeeInfo":{"$ref":"#/components/schemas/payeeInfo"}}},"payeeInfo":{"required":["email"],"type":"object","properties":{"email":{"type":"string","description":"The email address that is associated with the payee's PayPal account."}}},"payer":{"type":"object","properties":{"payerInfo":{"$ref":"#/components/schemas/payerInfo"}}},"payerInfo":{"required":["email","payerId"],"type":"object","properties":{"email":{"type":"string","description":"The payer's email address."},"suffix":{"type":"string","description":"The payer's name suffix."},"firstName":{"type":"string","description":"The payer's first name."},"lastName":{"type":"string","description":"The payer's last name."},"payerId":{"type":"string","description":"The PayPal-assigned payer ID."},"phone":{"type":"string","description":"The payer's phone number."},"billingAddress":{"$ref":"#/components/schemas/billingAddress"}}},"billingAddress":{"required":["country","postalCode"],"type":"object","properties":{"country":{"maxLength":2,"minLength":2,"pattern":"^([A-Z]{2}|C2)$","type":"string","description":"The two-character ISO 3166-1 code that identifies the country or region."},"postalCode":{"maxLength":60,"type":"string","description":"The postal code, which is the zip code or equivalent.  Typically required for countries with a postal code or an equivalent."},"countrySubdivision":{"maxLength":300,"type":"string","description":"The highest level sub-division in a country, which is usually a province, state, or ISO-3166-2 subdivision."},"city":{"maxLength":120,"type":"string","description":"A city, town, or village. Smaller than admin_area_level_1"},"addressLine2":{"maxLength":300,"type":"string","description":"The second line of the address. For example, suite or apartment number."},"addressLine1":{"maxLength":300,"type":"string","description":"The first line of the address. For example, number or street.  For example, 173 Drury Lane. Required for data entry and compliance and risk checks. Must contain the full address."}},"description":"Shipping Address details"},"plan":{"type":"object","properties":{"merchantPreferences":{"$ref":"#/components/schemas/merchantPreferences"}}},"merchantPreferences":{"type":"object","properties":{"collectShippingAddress":{"type":"string","description":"Indicates whether to skip the collection of the shipping address from the customer during the agreement sign-up phase."},"enableAddressChange":{"type":"string","description":"Indicates whether to show the shipping address but prevent the customer from editing it."},"experienceId":{"type":"string","description":"The ID of the experience profile to apply during the agreement approval UI flow."},"externalSelectedFundingInstrumentType":{"type":"string","description":"The type of financial instrument (FI) that the merchant wants to promote."},"allowedCountries":{"$ref":"#/components/schemas/allowedCountries"}}},"allowedCountries":{"type":"array","description":"An array of legally accepted customer country codes","items":{"maxLength":2,"minLength":2,"pattern":"^([A-Z]{2}|C2)$","type":"string","description":"The two-character ISO 3166-1 code that identifies the country or region."}},"Model5":{"required":["code","message"],"type":"object","properties":{"code":{"type":"number","description":"A 3-digit code which uniquely identify an error."},"details":{"$ref":"#/components/schemas/details"},"message":{"type":"string","description":"A description of the error."},"timestamp":{"type":"string","description":"Error timestamp","format":"date"}}},"details":{"type":"object"}}},"paths":{"/billingAgreement/create":{"post":{"tags":["Billing Agreement"],"summary":"Create billing agreement using token","operationId":"postBillingagreementCreate","parameters":[{"name":"x-vfi-api-idempotencyKey","in":"header","description":"A value you specify that uniquely identifies the transaction. If you're unsure whether a particular transaction succeeded, you can reattempt it with the same idempotency key without worrying about duplicating the transaction.","schema":{"type":"string"}}],"requestBody":{"content":{"*/*":{"schema":{"$ref":"#/components/schemas/Model29"}}},"required":false},"responses":{"200":{"description":"Successful","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Model30"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Model5"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Model5"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Model5"}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Model5"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Model5"}}}}}}}}}
```

## Get Agreement Details

Retrieves the full details of an existing billing agreement, including status, payer information, and shipping details.

## GET /billingAgreement/{agreementId}

> Get agreement details

```json
{"openapi":"3.0.1","info":{"title":"PayPal eComm API","version":"1.6.0"},"servers":[{"url":"https://emea.gsc.verifone.cloud/oidc/paypal-ecom","description":"EMEA Production"},{"url":"https://us.gsc.verifone.cloud/oidc/paypal-ecom","description":"Americas Production"},{"url":"https://nz.gsc.verifone.cloud/oidc/paypal-ecom","description":"New Zealand"},{"url":"https://cst.test-gsc.vfims.com/oidc/paypal-ecom","description":"Global Sandbox"},{"url":"https://uscst.gb.gsc.cficloud/oidc/paypal-ecom","description":"Americas Sandbox"}],"security":[{"bearerAuth":[]}],"components":{"securitySchemes":{"bearerAuth":{"scheme":"bearer","bearerFormat":"JWT","type":"http"}},"schemas":{"Model8":{"required":["createTime","id","state"],"type":"object","properties":{"id":{"type":"string","description":"The ID of the agreement."},"state":{"type":"string","description":"The state of the agreement."},"description":{"type":"string","description":"The description of the agreement."},"merchant":{"$ref":"#/components/schemas/merchant"},"payer":{"$ref":"#/components/schemas/payer"},"shippingAddress":{"$ref":"#/components/schemas/shippingAddress"},"plan":{"$ref":"#/components/schemas/plan"},"createTime":{"type":"string","description":"The date and time when the agreement was created."},"updateTime":{"type":"string","description":"The date and time when the agreement was updated."}}},"merchant":{"type":"object","properties":{"payeeInfo":{"$ref":"#/components/schemas/payeeInfo"}}},"payeeInfo":{"required":["email"],"type":"object","properties":{"email":{"type":"string","description":"The email address that is associated with the payee's PayPal account."}}},"payer":{"type":"object","properties":{"payerInfo":{"$ref":"#/components/schemas/payerInfo"}}},"payerInfo":{"required":["email","payerId"],"type":"object","properties":{"email":{"type":"string","description":"The payer's email address."},"suffix":{"type":"string","description":"The payer's name suffix."},"firstName":{"type":"string","description":"The payer's first name."},"lastName":{"type":"string","description":"The payer's last name."},"payerId":{"type":"string","description":"The PayPal-assigned payer ID."},"phone":{"type":"string","description":"The payer's phone number."},"billingAddress":{"$ref":"#/components/schemas/billingAddress"}}},"billingAddress":{"required":["country","postalCode"],"type":"object","properties":{"country":{"maxLength":2,"minLength":2,"pattern":"^([A-Z]{2}|C2)$","type":"string","description":"The two-character ISO 3166-1 code that identifies the country or region."},"postalCode":{"maxLength":60,"type":"string","description":"The postal code, which is the zip code or equivalent.  Typically required for countries with a postal code or an equivalent."},"countrySubdivision":{"maxLength":300,"type":"string","description":"The highest level sub-division in a country, which is usually a province, state, or ISO-3166-2 subdivision."},"city":{"maxLength":120,"type":"string","description":"A city, town, or village. Smaller than admin_area_level_1"},"addressLine2":{"maxLength":300,"type":"string","description":"The second line of the address. For example, suite or apartment number."},"addressLine1":{"maxLength":300,"type":"string","description":"The first line of the address. For example, number or street.  For example, 173 Drury Lane. Required for data entry and compliance and risk checks. Must contain the full address."}},"description":"Shipping Address details"},"shippingAddress":{"required":["addressLine1","city","country","countrySubdivision","postalCode"],"type":"object","properties":{"fullName":{"type":"string","description":"Full Name"},"addressLine1":{"maxLength":300,"type":"string","description":"The first line of the address. For example, number or street.  For example, 173 Drury Lane. Required for data entry and compliance and risk checks. Must contain the full address."},"addressLine2":{"maxLength":300,"type":"string","description":"The second line of the address. For example, suite or apartment number."},"city":{"maxLength":120,"type":"string","description":"A city, town, or village. Smaller than admin_area_level_1"},"countrySubdivision":{"maxLength":300,"type":"string","description":"The highest level sub-division in a country, which is usually a province, state, or ISO-3166-2 subdivision."},"country":{"maxLength":2,"minLength":2,"pattern":"^([A-Z]{2}|C2)$","type":"string","description":"The two-character ISO 3166-1 code that identifies the country or region."},"postalCode":{"maxLength":60,"type":"string","description":"The postal code, which is the zip code or equivalent.  Typically required for countries with a postal code or an equivalent."}}},"plan":{"type":"object","properties":{"merchantPreferences":{"$ref":"#/components/schemas/merchantPreferences"}}},"merchantPreferences":{"type":"object","properties":{"collectShippingAddress":{"type":"string","description":"Indicates whether to skip the collection of the shipping address from the customer during the agreement sign-up phase."},"enableAddressChange":{"type":"string","description":"Indicates whether to show the shipping address but prevent the customer from editing it."},"experienceId":{"type":"string","description":"The ID of the experience profile to apply during the agreement approval UI flow."},"externalSelectedFundingInstrumentType":{"type":"string","description":"The type of financial instrument (FI) that the merchant wants to promote."},"allowedCountries":{"$ref":"#/components/schemas/allowedCountries"}}},"allowedCountries":{"type":"array","description":"An array of legally accepted customer country codes","items":{"maxLength":2,"minLength":2,"pattern":"^([A-Z]{2}|C2)$","type":"string","description":"The two-character ISO 3166-1 code that identifies the country or region."}},"Model5":{"required":["code","message"],"type":"object","properties":{"code":{"type":"number","description":"A 3-digit code which uniquely identify an error."},"details":{"$ref":"#/components/schemas/details"},"message":{"type":"string","description":"A description of the error."},"timestamp":{"type":"string","description":"Error timestamp","format":"date"}}},"details":{"type":"object"}}},"paths":{"/billingAgreement/{agreementId}":{"get":{"tags":["Billing Agreement"],"summary":"Get agreement details","operationId":"getBillingagreementAgreementid","parameters":[{"name":"agreementId","in":"path","description":"PayPal billing agreement id","required":true,"schema":{"type":"string"}},{"name":"paymentProviderContract","in":"query","description":"PayPal Payment Provider Contract UUID","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Successful","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Model8"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Model5"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Model5"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Model5"}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Model5"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Model5"}}}}}}}}}
```

## Cancel Billing Agreement

Cancels an active billing agreement. Once cancelled, the agreement can no longer be used to process payments.

{% hint style="danger" %}
Cancellation is irreversible. If a billing agreement is cancelled, a new one must be initiated and approved by the payer to resume recurring payments.
{% endhint %}

## POST /billingAgreement/{agreementId}/cancel

> Cancel agreement details

```json
{"openapi":"3.0.1","info":{"title":"PayPal eComm API","version":"1.6.0"},"servers":[{"url":"https://emea.gsc.verifone.cloud/oidc/paypal-ecom","description":"EMEA Production"},{"url":"https://us.gsc.verifone.cloud/oidc/paypal-ecom","description":"Americas Production"},{"url":"https://nz.gsc.verifone.cloud/oidc/paypal-ecom","description":"New Zealand"},{"url":"https://cst.test-gsc.vfims.com/oidc/paypal-ecom","description":"Global Sandbox"},{"url":"https://uscst.gb.gsc.cficloud/oidc/paypal-ecom","description":"Americas Sandbox"}],"security":[{"bearerAuth":[]}],"components":{"securitySchemes":{"bearerAuth":{"scheme":"bearer","bearerFormat":"JWT","type":"http"}},"schemas":{"Model38":{"required":["paymentProviderContract"],"type":"object","properties":{"paymentProviderContract":{"type":"string","description":"PayPal Payment Provider Contract UUID"}}},"Model5":{"required":["code","message"],"type":"object","properties":{"code":{"type":"number","description":"A 3-digit code which uniquely identify an error."},"details":{"$ref":"#/components/schemas/details"},"message":{"type":"string","description":"A description of the error."},"timestamp":{"type":"string","description":"Error timestamp","format":"date"}}},"details":{"type":"object"}}},"paths":{"/billingAgreement/{agreementId}/cancel":{"post":{"tags":["Billing Agreement"],"summary":"Cancel agreement details","operationId":"postBillingagreementAgreementidCancel","parameters":[{"name":"agreementId","in":"path","description":"PayPal billing agreement id","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"*/*":{"schema":{"$ref":"#/components/schemas/Model38"}}},"required":false},"responses":{"200":{"description":"Successful","content":{"application/json":{"schema":{"type":"string"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Model5"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Model5"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Model5"}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Model5"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Model5"}}}}}}}}}
```


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.verifone.com/api-reference/open-api-references/paypal-ecommerce/billing-agreements.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
