younifyd
Menu

Create order

Create order

POST/v2/checkout/orders

Use it in a workflow

  1. Add a step and choose the PayPal connector.
  2. Pick the Create order action (under Orders).
  3. Fill in the fields below, then reference the result from later steps as {{createOrder.response.data}}.

Request

Headers

PayPal-Request-Idstring

The server stores keys for 6 hours. The API callers can request the times to up to 72 hours by speaking to their Account Manager. It is mandatory for all single-step create order calls (E.g. Create Order Request with payment source information like Card, PayPal.vault_id, PayPal.billing_agreement_id, etc).

PayPal-Partner-Attribution-Idstring

PayPal Partner can send a PayPal-Partner-Attribution-Id request header with the value that they have been assigned by the PayPal Partner program. This value is known as a BN Code. In order to reward such partners (through partner programs), all the activities (including API calls) that they are doing on behalf of the merchants need to be tracked.

PayPal-Client-Metadata-Idstring

A GUID value originating from Fraudnet and Dyson passed from external API clients via HTTP header. The value is used by Risk decisions to correlate calls which, in turn, might result in lower decline rates..

Preferstring

The preferred server response upon successful completion of the request. Value is:<ul><li><code>return=minimal</code>. The server returns a minimal response to optimize communication between the API caller and the server. A minimal response includes the <code>id</code>, <code>status</code> and HATEOAS links.</li><li><code>return=representation</code>. The server returns a complete resource representation, including the current state of the resource.</li></ul>

Default "return=minimal"

Authorizationstring

Holds authorization information for external API calls.

PayPal-Auth-Assertionstring

Header for an API client-provided JWT assertion that identifies the merchant. Establishing the consent to act-on-behalf of a merchant is a prerequisite for using this header.

Request body

Enter the body as JSON in the step's Body field.

intentstringrequired

The intent to either capture payment immediately or authorize a payment for an order after order creation.

One ofCAPTUREAUTHORIZE

payerany
purchase_unitsarray<any>required

An array of purchase units. Each purchase unit establishes a contract between a payer and the payee. Each purchase unit represents either a full or partial order that the payer intends to purchase from the payee.

payment_sourceobject

The payment source definition.

tokenobject2 fields

The tokenized payment source to fund a payment.

paypalany
bancontactany
blikany
epsany
giropayany
idealany
mybankany
p24any
sofortany
trustlyany
apple_payany
google_payany
venmoany
cryptoany
application_contextany
json
{
  "intent": "CAPTURE",
  "purchase_units": [
    null
  ],
  "payer": null,
  "payment_source": {
    "token": {
      "id": "string",
      "type": "BILLING_AGREEMENT"
    },
    "paypal": null,
    "bancontact": null,
    "blik": null,
    "eps": null,
    "giropay": null,
    "ideal": null,
    "mybank": null,
    "p24": null,
    "sofort": null,
    "trustly": null,
    "apple_pay": null
  },
  "application_context": null
}

Response

Returns 200 with an object. Read it in later steps with {{createOrder.response.data.<field>}}.

Need more? See the PayPal guide for connection setup and behaviour shared by every action.