Skip to main content
PayPal is one of the largest payment methods in the world. Consumers can pay using their PayPal wallet balance, credit or debit cards, or Pay Later products.
The payment must be completed in 73 hours. The validity of the refund is 180 days.

How it works

Flowchart depicting PayPal payment flow PayPal is an asynchronous payment method. When you create a payment, the customer authenticates and approves it through the PayPal interface:
  • Desktop: a modal opens within the page.
  • Mobile: a new browser tab opens and closes automatically on completion.
The transaction remains in a processing status until the customer acts. Once the customer completes the payment, PayPal sends a notification and the transaction is updated to either succeeded or failed.

Create payment

The following example shows how to create a PayPal payment and the response it returns:
curl --request POST \
 --url https://gateway.paybyrd.com/api/v2/payment \
 --header 'Accept: application/json' \
 --header 'Content-Type: application/json' \
 --header 'x-api-key: {your_api_key}' \
 --data '
{
 "type": "OnlineTransfer",
 "amount": "8.15",
 "currency": "EUR",
 "orderRef": "ABC12345", 
 "brand": "PAYPAL",
 "culture": "pt-PT"
}'
{
 "type": "OnlineTransfer",
 "currency": "EUR",
 "orderRef": "ABC12345",
 "brand": "PAYPAL",
 "redirectUrl": "https://your-shop-url?orderRef=ABC12345",
 "code": "BYRD207",
 "description": "Pending redirect",
 "transactionId": "39824983-4a13-42d4-8e85-e2821e494975",
 "amount": "8.15",
 "action": {
   "type": "redirect",
   "url": "https://gateway.paybyrd.com/api/v1/Redirect/39824983-4a13-42d4-8e85-e2821e494975"
 }
}
See the full API reference here. Check the code field to know whether the transaction was accepted. A successful scenario returns the code BYRD207. You can find the list of all status codes in the Respone code reference.