Skip to content

Instantly share code, notes, and snippets.

@mattlo
Created October 28, 2017 23:38
Show Gist options
  • Save mattlo/c3f68b25419694d590a461786a944854 to your computer and use it in GitHub Desktop.
Save mattlo/c3f68b25419694d590a461786a944854 to your computer and use it in GitHub Desktop.
{
"id": "8PT597110X687430LKGECATA",
"create_time": "2013-06-25T21:41:28Z",
"resource_type": "authorization",
"event_version": "1.0",
"event_type": "PAYMENT.AUTHORIZATION.CREATED",
"summary": "A payment authorization was created",
"resource": {
"id": "I-1TJ3GAGG82Y9",
"state": "Active",
"name": "Monthly agreement with free trial payment definition",
"description": "Monthly agreement with free trial payment definition.",
"payer": {
"payment_method": "paypal",
"status": "unverified",
"payer_info": {
"email": "[email protected]",
"first_name": "John",
"last_name": "Doe",
"payer_id": "NEW8A85AK4ET4",
"shipping_address": {
"recipient_name": "John Doe",
"line1": "751235 Stout Drive",
"line2": "0976249 Elizabeth Court",
"city": "Quimby",
"state": "IA",
"postal_code": "51049",
"country_code": "US"
}
}
},
"plan": {
"name": "Plan with Regular and Trial Payment Definitions",
"description": "Plan with regular and trial payment definitions.",
"type": "FIXED",
"payment_definitions": [{
"name": "Trial payment definition",
"type": "TRIAL",
"frequency": "MONTH",
"amount": {
"value": "0.00",
"currency": "USD"
},
"cycles": "2",
"charge_models": [{
"type": "TAX",
"amount": {
"value": "0.00",
"currency": "USD"
}
},
{
"type": "SHIPPING",
"amount": {
"value": "0.00",
"currency": "USD"
}
}
],
"frequency_interval": "1"
},
{
"name": "Regular payment definition",
"type": "REGULAR",
"frequency": "MONTH",
"amount": {
"value": "5.99",
"currency": "USD"
},
"cycles": "10",
"charge_models": [{
"type": "TAX",
"amount": {
"value": "0.29",
"currency": "USD"
}
},
{
"type": "SHIPPING",
"amount": {
"value": "0.20",
"currency": "USD"
}
}
],
"frequency_interval": "1"
}
],
"merchant_preferences": {
"setup_fee": {
"value": "0.40",
"currency": "USD"
},
"return_url": "http://www.paypal.com",
"cancel_url": "http://www.paypal.com/cancel",
"max_fail_attempts": "2",
"auto_bill_amount": "YES"
},
"links": [],
"currency_code": "USD"
},
"start_date": "2016-12-23T08:00:00Z",
"shipping_address": {
"recipient_name": "John Doe",
"line1": "751235 Stout Drive",
"line2": "0976249 Elizabeth Court",
"city": "Quimby",
"state": "IA",
"postal_code": "51049",
"country_code": "US"
},
"agreement_details": {
"outstanding_balance": {
"currency": "USD",
"value": "0.00"
},
"cycles_remaining": "2",
"cycles_completed": "0",
"next_billing_date": "2017-01-23T08:00:00Z",
"last_payment_date": "2016-12-23T08:00:00Z",
"last_payment_amount": {
"currency": "USD",
"value": "0.40"
},
"final_payment_date": "2017-09-23T08:00:00Z",
"failed_payment_count": "0"
},
"links": [{
"href": "https://api.sandbox.paypal.com/v1/payments/billing-agreements/I-1TJ3GAGG82Y9/suspend",
"rel": "suspend",
"method": "POST"
},
{
"href": "https://api.sandbox.paypal.com/v1/payments/billing-agreements/I-1TJ3GAGG82Y9/re-activate",
"rel": "re_activate",
"method": "POST"
},
{
"href": "https://api.sandbox.paypal.com/v1/payments/billing-agreements/I-1TJ3GAGG82Y9/cancel",
"rel": "cancel",
"method": "POST"
},
{
"href": "https://api.sandbox.paypal.com/v1/payments/billing-agreements/I-1TJ3GAGG82Y9/bill-balance",
"rel": "self",
"method": "POST"
},
{
"href": "https://api.sandbox.paypal.com/v1/payments/billing-agreements/I-1TJ3GAGG82Y9/set-balance",
"rel": "self",
"method": "POST"
}
]
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment