I have an account with BlueSnap, where I offer my shoppers to buy using PayPal. I use the payment API when I send credit card orders, and in that I can separate Authorization and capture like this:
{
"amount": 100,
"vaultedShopperId": xxxx1240,
"recurringTransaction": "ECOMMERCE",
"softDescriptor": "MYSOFT",
"currency": "USD",
"cardTransactionType": "AUTH_ONLY"
}
And capture later with this:
{
"cardTransactionType": "CAPTURE",
"transactionId": xxxxx77363
}
But I don't know how to do this for PayPal transactions. The reason I need delay the capture is because I want to sell a pre-ordered item, and I don't want to charge the shopper in PayPal until I get the product ready to ship.
I'm using the Payment API, and I wasn't sure how I can separate the purchase to two stages/phases. I looked in the documentation and I couldn't find a simple answer. Is there a way to do this?
BlueSnap has a few ways to interact with PayPal. Through the Payment API they have three flows, each for a specific scenario:
For the problem you're describing, it sounds like the delayed capture flow is the best fit.
The full API is here: https://developers.bluesnap.com/v8976-JSON/docs/update-paypal-transaction, and https://developers.bluesnap.com/v8976-JSON/docs/create-paypal-transaction.
You can start off by sending a create order request (via POST):
After this is sent the response will include a PayPal redirection URL and the BlueSnap order ID (save for later). Send your shopper there.
After the shopper has returned from PayPal and you are sure you want to set a pending order (and for how much) send this request (via PUT):
The order ID in this request was provided in the first step. Now you can wait until your product has arrived and is ready for shipping. Once it's shipped (which can be weeks after step 2) you can send the capture request to get the money (via PUT):
Note: you cannot capture for more money than you send in step 2 - so consider the potential surcharges when you're creating the pending order!
Hope it helped :)