{
"name": "T-Shirt of the Month Club Plan",
"description": "Template creation.",
"type": "fixed",
"payment_definitions": [
{
"name": "Regular Payments",
"type": "REGULAR",
"frequency": "Month",
"frequency_interval": "2",
"cycles": "12",
"amount": {
"value": "100",
"currency": "USD"
},
"charge_models": [
{
"type": "SHIPPING",
"amount": {
"value": "10",
"currency": "USD"
}
}
]
}
],
"merchant_preferences": {
"return_url": "https://vidtube.5v.pl/assets/import/PayPal/vendor/paypal/rest-api-sdk-php/sample/billing/ExecuteAgreement.php?success=true",
"cancel_url": "https://vidtube.5v.pl/assets/import/PayPal/vendor/paypal/rest-api-sdk-php/sample/billing/ExecuteAgreement.php?success=false",
"auto_bill_amount": "yes",
"initial_fail_amount_action": "CONTINUE",
"max_fail_attempts": "0",
"setup_fee": {
"value": "1",
"currency": "USD"
}
}
}{
"name": "T-Shirt of the Month Club Plan",
"description": "Template creation.",
"type": "FIXED",
"payment_definitions": [
{
"id": "PD-00L50647LP007014XCZHKDBQ",
"name": "Regular Payments",
"type": "REGULAR",
"frequency": "Month",
"amount": {
"currency": "USD",
"value": "100"
},
"cycles": "12",
"charge_models": [
{
"id": "CHM-9AB61874U75723617CZHKDBQ",
"type": "SHIPPING",
"amount": {
"currency": "USD",
"value": "10"
}
}
],
"frequency_interval": "2"
}
],
"merchant_preferences": {
"setup_fee": {
"currency": "USD",
"value": "1"
},
"max_fail_attempts": "0",
"return_url": "https://vidtube.5v.pl/assets/import/PayPal/vendor/paypal/rest-api-sdk-php/sample/billing/ExecuteAgreement.php?success=true",
"cancel_url": "https://vidtube.5v.pl/assets/import/PayPal/vendor/paypal/rest-api-sdk-php/sample/billing/ExecuteAgreement.php?success=false",
"auto_bill_amount": "YES",
"initial_fail_amount_action": "CONTINUE"
},
"id": "P-3FK81542GK247244KCZHKDBQ",
"state": "CREATED",
"create_time": "2025-10-24T13:00:43.270Z",
"update_time": "2025-10-24T13:00:43.270Z",
"links": [
{
"href": "https://api.sandbox.paypal.com/v1/payments/billing-plans/P-3FK81542GK247244KCZHKDBQ",
"rel": "self",
"method": "GET"
}
]
}[
{
"op": "replace",
"path": "/",
"value": {
"state": "ACTIVE"
}
}
]{
"id": "P-3FK81542GK247244KCZHKDBQ",
"state": "ACTIVE",
"name": "T-Shirt of the Month Club Plan",
"description": "Template creation.",
"type": "FIXED",
"payment_definitions": [
{
"id": "PD-00L50647LP007014XCZHKDBQ",
"name": "Regular Payments",
"type": "REGULAR",
"frequency": "Month",
"amount": {
"currency": "USD",
"value": "100"
},
"cycles": "12",
"charge_models": [
{
"id": "CHM-9AB61874U75723617CZHKDBQ",
"type": "SHIPPING",
"amount": {
"currency": "USD",
"value": "10"
}
}
],
"frequency_interval": "2"
}
],
"merchant_preferences": {
"setup_fee": {
"currency": "USD",
"value": "1"
},
"max_fail_attempts": "0",
"return_url": "https://vidtube.5v.pl/assets/import/PayPal/vendor/paypal/rest-api-sdk-php/sample/billing/ExecuteAgreement.php?success=true",
"cancel_url": "https://vidtube.5v.pl/assets/import/PayPal/vendor/paypal/rest-api-sdk-php/sample/billing/ExecuteAgreement.php?success=false",
"auto_bill_amount": "YES",
"initial_fail_amount_action": "CONTINUE"
},
"create_time": "2025-10-24T13:00:43.270Z",
"update_time": "2025-10-24T13:00:44.102Z",
"links": [
{
"href": "https://api.sandbox.paypal.com/v1/payments/billing-plans/P-3FK81542GK247244KCZHKDBQ",
"rel": "self",
"method": "GET"
}
]
}{
"name": "DPRP",
"description": "Payment with credit Card",
"start_date": "2019-06-17T9:45:04Z",
"plan": {
"id": "P-3FK81542GK247244KCZHKDBQ"
},
"payer": {
"payment_method": "credit_card",
"payer_info": {
"email": "jaypatel512-facilitator@hotmail.com"
},
"funding_instruments": [
{
"credit_card": {
"type": "visa",
"number": "4491759698858890",
"expire_month": "12",
"expire_year": "2017",
"cvv2": "128"
}
}
]
},
"shipping_address": {
"line1": "111 First Street",
"city": "Saratoga",
"state": "CA",
"postal_code": "95070",
"country_code": "US"
}
}Got Http response code 400 when accessing https://api.sandbox.paypal.com/v1/payments/billing-agreements/.
{
"name": "VALIDATION_ERROR",
"debug_id": "49533848de15b",
"message": "Invalid request. See details.",
"information_link": "https://developer.paypal.com/docs/api/payments.billing-agreements#errors",
"details": [
{
"field": "payer.funding_instruments[0].credit_card",
"issue": "Expiration date cannot be in the past."
},
{
"field": "start_date",
"issue": "Agreement start date is required,should be valid and greater than the current date. Should be consistent with ISO 8601 Format"
}
]
}