Create order
Last updated: Oct 24th, 4:58am
Create an order to begin the Zip payment process.
Automatic capture occurs immediately after buyer approval, streamlining the payment process by eliminating the need for manual intervention to complete the transaction.
Automatic flow
Include payment source details directly in the create order request for a streamlined integration.
Use a valid access token and send a POST request to /v2/checkout/orders with request body parameters including intent set to CAPTURE, purchase_units with amount and currency (USD or AUD only), invoice_id (mandatory for Zip), payment_source with Zip details, and processing_instruction set to ORDER_COMPLETE_ON_PAYMENT_APPROVAL.
- Sample request
- Sample response
1curl -X POST https://api-m.sandbox.paypal.com/v2/checkout/orders \2 -H "Content-Type: application/json" \3 -H "Authorization: Bearer <ACCESS_TOKEN>" \4 -H "PayPal-Request-Id: <UNIQUE_REQUEST_ID>" \5 -d '{6 "intent": "CAPTURE",7 "processing_instruction": "ORDER_COMPLETE_ON_PAYMENT_APPROVAL",8 "payment_source": {9 "zip": {10 "name": {11 "given_name": "Jim",12 "surname": "Carrey"13 },14 "country_code": "US",15 "phone": {16 "country_code": "1",17 "national_number": "4085551234"18 },19 "billing_address": {20 "address_line_1": "2211 N 1st St.",21 "admin_area_1": "CA",22 "admin_area_2": "San Jose",23 "postal_code": "95131",24 "country_code": "US"25 },26 "experience_context": {27 "return_url": "https://www.example.com/returnUrl",28 "cancel_url": "https://www.example.com/cancelUrl"29 }30 }31 },32 "purchase_units": [33 {34 "reference_id": "default",35 "amount": {36 "breakdown": {37 "item_total": {38 "currency_code": "USD",39 "value": "34.10"40 },41 "tax_total": {42 "currency_code": "USD",43 "value": "2.00"44 }45 },46 "currency_code": "USD",47 "value": "36.10"48 },49 "payee": {50 "merchant_id": "M683SLY6MTM78",51 "email_address": "destaccount1@hotmail.com"52 },53 "custom_id": "Custom-1234",54 "invoice_id": "Invoice-1760356117",55 "shipping": {56 "name": {57 "full_name": "John Doe"58 },59 "address": {60 "address_line_1": "2211 N 1st St.",61 "admin_area_1": "CA",62 "admin_area_2": "San Jose",63 "postal_code": "95131",64 "country_code": "US"65 }66 },67 "items": [68 {69 "name": "Shirt",70 "quantity": "1",71 "supplementary_data": [],72 "postback_data": [],73 "unit_amount": {74 "currency_code": "USD",75 "value": "12.05"76 },77 "tax": {78 "currency_code": "USD",79 "value": "1.00"80 }81 },82 {83 "name": "Trouser",84 "quantity": "1",85 "supplementary_data": [],86 "postback_data": [],87 "unit_amount": {88 "currency_code": "USD",89 "value": "22.05"90 },91 "tax": {92 "currency_code": "USD",93 "value": "1.00"94 }95 }96 ]97 }98 ]99}'
The response includes the payer-action link to redirect the buyer to Zip.
On successful order creation, complete the Zip payment with these steps:
- Review order response: PayPal returns order ID with
PAYER_ACTION_REQUIREDstatus andpayer-actionlink - Redirect your buyer: Send the buyer to the
payer-actionURL to complete payment on Zip's platform - Monitor payment status: Buyer approves payment and order status automatically changes to
COMPLETED - Payment captured: The payment is automatically captured upon buyer approval (no additional capture call needed for Zip)
- Notify the buyer: Display order confirmation and send receipt or tracking information to complete the purchase experience.
Request and response parameters
Select a tab to view either the required request parameters or the expected response parameters for partner referrals.
Request parameters
| Parameter name | Description |
|---|---|
intentRequired, string |
Indicates whether payment is captured immediately or authorized for later capture. |
processing_instructionRequired, string |
Specifies how the order is processed. Must be set to ORDER_COMPLETE_ON_PAYMENT_APPROVAL for automatic capture. |
payment_sourceRequired, object |
Payment method for the order. Must contain a zip object. |
payment_source.zipRequired, object |
Details of the Zip payment method. |
payment_source.zip.nameRequired, object |
Name of the buyer. |
payment_source.zip.name.given_nameRequired, string |
First name of the buyer. |
payment_source.zip.name.surnameRequired, string |
Last name of the buyer. |
payment_source.zip.country_codeRequired, string |
Country where Zip payment will be processed. Valid values: US (United States) or AU (Australia). |
payment_source.zip.phoneRequired, object |
Phone number of the buyer. |
payment_source.zip.phone.country_codeRequired, string |
Country calling code. Valid values: 1 for US, 61 for AU. |
payment_source.zip.phone.national_numberRequired, string |
National phone number without country code. |
payment_source.zip.billing_addressobject |
Optional billing address for enhanced fraud screening. When provided, all sub-fields are required. |
payment_source.zip.billing_address.address_line_1Required, string |
Street address of the buyer. |
payment_source.zip.billing_address.admin_area_1Required, string |
State or province code. Valid values: US states (For example, CA, TX) or Australian states. |
payment_source.zip.billing_address.admin_area_2Required, string |
City name of the billing address. |
payment_source.zip.billing_address.postal_codeRequired, string |
Postal or ZIP code of the billing address. |
payment_source.zip.billing_address.country_codeRequired, string |
Country code for billing address. Valid values: US or AU. |
payment_source.zip.experience_contextRequired, object |
Configuration for the buyer's checkout experience. |
payment_source.zip.experience_context.return_urlRequired, string |
URL to redirect the buyer after payment approval. |
payment_source.zip.experience_context.cancel_urlRequired, string |
URL to redirect the buyer for cancelled or failed payment. |
purchase_unitsRequired, array |
Array containing purchase details for the order. |
purchase_units[].reference_idstring |
Reference ID for the purchase unit. Defaults to default. |
purchase_units[].amountRequired, object |
Total amount and currency for the purchase. |
purchase_units[].amount.currency_codeRequired, string |
Three-character currency code for Zip payments. Valid values: USD (US Dollar) or AUD (Australian Dollar). |
purchase_units[].amount.valueRequired, string |
Total amount value. |
purchase_units[].amount.breakdownobject |
Breakdown of the total amount by category. |
purchase_units[].invoice_idRequired, string |
Merchant's invoice number. |
purchase_units[].custom_idstring |
Custom identifier for merchant tracking. |
purchase_units[].payeeobject |
Recipient of the payment. |
purchase_units[].shippingRecommended, object |
Shipping information for the order. |
purchase_units[].itemsRecommended, array |
Array of line item details for the purchase. |
- When you send a
GETrequest to/v2/customer/partner-referrals/{partner_referral_id}, the response only includes the user data you provided for the merchant. It does not include any information the merchant may have entered directly on PayPal.com. - This section documents only a subset of relevant request and response parameters. For the exhaustive list of request parameters, see API reference.