On This Page
Create a Venmo Order
This section describes how to create a
Venmo
order.You must send a create order request to begin processing a new payment. Creating an order
enables the customer to complete checkout using their Venmo account.
- Itemization
- Every unique item being purchased must be itemized in the request as a line item. For more information about how to format line items in a request, see Including Line Items in Requests.
- Payment Processing Type
- You must also set theprocessingInformation.authorizationOptions.authTyperequest field toAUTHORIZEorCAPTUREto indicate which follow-on requests you will send to process the payment. Set the field value toAUTHORIZEif you want to process the payment using the authorization and capture requests. Set the field value toCAPTUREif you want to process the payment using the sale request.
- Payment Method
- To specify that the customer is paying with Venmo, set thepaymentInformation.paymentType.method.namerequest field toVenmo.
- Saving Payment Credentials
- You can save a customer's payment credentials in order to make future transactions fast and simple for the customer. To save the customer's credentials, you must include the optionalprocessingInformation.processingInstructionrequest field and set its value toORDER_SAVED_EXPLICITLY. After you successfully create the order and the customer completes the checkout, you must send a follow-on save payment credentials request. For more information, see Save an Order.
A successful request is indicated by a Venmo transaction ID in the
processorInformation.transactionId
response field and a request ID in the
id
response field. Your system should set the transaction ID in the SDK to automatically
create a Venmo checkout button on your checkout webpage. When the customer clicks the
Venmo button, a QR displays to the customer. Your customer uses their Venmo mobile app
to scan the QR code and complete the checkout using their Venmo mobile app. Save the
request ID in your system for the follow-on API requests.Endpoints
Production:
POST
https://api.cybersource.com
/pts/v2/intentsTest:
POST
https://apitest.cybersource.com
/pts/v2/intentsRequesting to Create a Venmo Order
Follow these steps to successfully create an order.
- Send aPOSTrequest to theendpoint and include these required fields:https://api.cybersource.com/v2/intents
- orderInformation.amountDetails.taxDetails.taxId
- orderInformation.amountDetails.taxDetails.type
- orderInformation.invoiceDetails.invoiceNumber
- orderInformation.invoiceDetails.productDescription
- paymentInformation.customer.customerid
- Set tovenmo.
- Set toeWallet.
- Set toAP_ORDER.
- processingInformation.authorizationOptions.authType
- Set to one of these values:
- AUTHORIZE: The created order can be processed with an authorization and capture.
- CAPTURE: The created order can be processed for a sale.
- Include any optional fields in the request:
- orderInformation.invoiceDetails.productDescription
- processingInformation.processingInstruction
- Set toORDER_SAVED_EXPLICITLYto save the customer's payment credentials using the save an order follow-on request.
- After sending your request, your system sets theprocessorInformation.transactionIdresponse field value in the Venmo SDK. The SDK creates a Venmo checkout button that the customer clicks to display a Venmo QR code. Your customer scans the QR code using their Venmo mobile app. When your customer approves the payment on their Venmo mobile app, the payment is complete.
Example: Creating a Venmo Order
Request
Response to a Successful Request
Response Statuses for Creating a Venmo Order
Cybersource
responds to your request with one of these statuses in
the status
field:- PAYER_ACTION_REQUIRE: The request was successful, and your system must create a Venmo checkout button using the Venmo SDK in order for the customer to approve the payment.
- INVALID_REQUEST: The request was not successful. Send a new request.
When you request a status update,
Cybersource
responds with one of these
statuses in the status
field:- COMPLETED: The order was approved by the customer. This status can also occur when the order is successfully used for an authorization or sale.
Follow-On Requests
After you create an order, you can send these follow-on API requests using the order
ID from the response message.
- Update Order
- To update the order information, such as the payment amount or line items, send an update order request. For more information, see Update an Order.
- Save Order
- To save the customer's payment credentials in the order to make future check out experiences faster for the customer, send a save order request. For more information, see Save an Order.
- Authorization
- To authorize funds for a payment, send an authorization request. For more information, see Authorize a Payment.
- Sale
- To authorize and capture funds for a payment in the same request, send a sale request. For more information, see Process a Sale.