For more information about this gateway, please refer to https://developer.paypal.com/docs/api/payments/v1/
- Gateway type code:
paypal
- Production API endpoint: https://api.paypal.com
- Sandbox API endpoint: https://api.sandbox.paypal.com
- Supported payment types: Credit Card
- Supported operations: Authorization, Capture, Charge, Void, Refund
To add a PayPal gateway, use the following settings:
{
"client_id" : "Your client ID",
"client_secret" : "Your client secret",
"payPal_partner_attribution_id" : "Your PayPal partner ID" (OPTIONAL)
}
Gateway Specific Fields
- Charge and Authorize:
In order to do an Authorization or a Charge on PayPal, it is required to first do a transaction to "Create" the order. When calling the FlexPay API for Authorization or Charge, this prerequisite transaction will be created automatically, and then Auth or Charge will be performed. Most of the non-sensitive data is passed in the "Create" transaction.
- Amount Breakdown:
If a child node is present it MUST have both a currency_code and value string. For more information view the PayPal documentation of amount_breakdown: https://developer.paypal.com/docs/api/orders/v2/?mark=amount_breakdown#definition-amount_breakdown
"gatewaySpecificFields":{
"paypal":{
"merchant_id": "Your merchant id", (required to do transactions on behalf of a merchant)
"merchant_client_id": "Your merchant client id",
"invoice_id": "Your invoice id",
"soft_descriptor": "Hello World",
"shipping_preference": "NO_SHIPPING", ("SET_PROVIDED_ADDRESS": shipment data will be sent to PayPal. "NO_SHIPPING" or no value provided: no shipment data will be sent to PayPal)
"payee_email_address": "Email of the payee", (required if charging platform fees)
"platform_fees_currency_code": "USD", (required if charging platform fees)
"platform_fee_amount": "1000", (required if charging platform fees. Amount in cents: e.g. 1000 = $10.00)
"amount_breakdown" : {
"discount": {
"currency_code": "USD",
"value": "10.00"
},
"handling": {
"currency_code": "USD",
"value": "9.99"
},
"insurance": {
"currency_code": "USD",
"value": "9.98"
},
"item_total": {
"currency_code": "USD",
"value": "9.97"
},
"shipping": {
"currency_code": "USD",
"value": "9.96"
},
"shipping_discount": {
"currency_code": "USD",
"value": "9.95"
},
"tax_total": {
"currency_code": "USD",
"value": "9.94"
}
}
}
}