PayPal First billing agreement transaction
2
Create a billing agreement token
{
"ppcUid": "21261b6f-07df-4b63-3f4f-7fa0b83a20db",
"description": "Stored PayPal account with The Partner merchant",
"enableAddressChange": true,
"returnUrl": "https://68f8497efb9ce8aeef3ed419c6ef0597.m.pipedream.net/success",
"cancelUrl": "https://68f8497efb9ce8aeef3ed419c6ef0597.m.pipedream.net/cancel"
}{
"approvalUrl": "https://www.sandbox.paypal.com/agreements/approve?ba_token=BA-29L89918T33851208",
"billingToken": "BA-29L89998T33851208"
}4
Create a billing agreement
{
"billingToken":"BA-29L89998T33851208",
"ppcUid":"21261b6f-07df-4b63-3f4f-7fa0b83a20db"
}{
"agreementId": {
"id": "B-1WW844616B620123",
"state": "ACTIVE",
"description": "Stored PayPal account with The Partner merchant",
"merchant": {
"payeeInfo": {
"email": "merchant@business.example.com"
}
},
"payer": {
"payerInfo": {
"email": "payer@business.example.com",
"firstName": "John",
"lastName": "Doe",
"payerId": "VJRXDDV4UWZ2W"
}
},
"plan": {
"merchantPreferences": {}
},
"createTime": "2021-03-03T11:56:27.000Z",
"updateTime": "2021-03-03T11:56:27.000Z"
}
}7
Create a transaction
{
"context": {
"paymentProviderContract": "26761b6f-07df-4b63-9f4f-7fa0b83a20db"
},
"intent": "AUTHORIZE",
"amount": {
"currencyCode": "USD",
"value": 20000
},
"applicationContext": {
"returnUrl": "https://68f8497efb9ce8aeef3ed419c6ef0597.m.pipedream.net/success",
"cancelUrl": "https://68f8497efb9ce8aeef3ed419c6ef0597.m.pipedream.net/cancel"
},
"shipping": {
"address": {
"country": "IN",
"postalCode": "91",
"countrySubdivision": "IN-MH",
"city": "yyy",
"addressLine1": "add1",
"addressLine2": "add2"
},
"fullName": "JamesSmith"
}
}{
"id": "e432ddb2-82a8-4213-a7da-8a7c0a3952de",
"status": "INITIATED",
"orderId": "1W065188KT702530J",
"createdAt": "2021-03-25T13:56:27Z",
"approvalUrl": "https://www.sandbox.paypal.com/checkoutnow?token=1W065188KT702530J"
}8
Authorize transaction by billing agreement
{
"agreementId":"B-1WW844616B620123"
}{
"id": "e123ddb2-82a8-4213-a7da-8a7c0a3952de",
"authorizationId": "2JM15603JS454230B",
"createdAt": "2021-03-25T14:00:46Z",
"expiresAt": "2021-04-23T14:00:46Z",
"status": "AUTHORISED",
"payer": {
"payerId": "VJRXDDV4UWZ4W",
"shippingAddress": {
"country": "IN",
"postalCode": "400097",
"countrySubdivision": "Maharashtra",
"city": "Mumbai",
"addressLine1": "Flat no. 507 Wing A Raheja Residency",
"addressLine2": "Film City Road"
}
}
}Last updated
Was this helpful?
