Menu

Sale

Perform a pay direct sale request.

Methods

POST

Perform a sale request.

Request

Copied!
{
 "type": "object",
 "properties": {
  "instruction": {
   "type": "object",
   "properties": {
    "narrative": {
     "type": "object",
     "properties": {
      "line1": {
       "type": "string"
      },
      "line2": {
       "type": "string"
      }
     },
     "required": [
      "line1"
     ]
    },
    "paymentInstrument": {
     "type": "object",
     "properties": {
      "accountNumber": {
       "type": "string"
      },
      "accountType": {
       "type": "string"
      },
      "billingAddress": {
       "oneOf": [
        {
         "type": "object",
         "properties": {
          "address1": {
           "type": "string"
          },
          "address2": {
           "type": "string"
          },
          "address3": {
           "type": "string"
          },
          "city": {
           "type": "string"
          },
          "countryCode": {
           "type": "string"
          },
          "firstName": {
           "type": "string"
          },
          "lastName": {
           "type": "string"
          },
          "state": {
           "type": "string"
          },
          "zipCode": {
           "type": "string"
          }
         },
         "required": [
          "address1",
          "city",
          "countryCode",
          "zipCode"
         ]
        },
        {
         "type": "object",
         "properties": {
          "address1": {
           "type": "string"
          },
          "address2": {
           "type": "string"
          },
          "address3": {
           "type": "string"
          },
          "city": {
           "type": "string"
          },
          "countryCode": {
           "type": "string"
          },
          "firstName": {
           "type": "string"
          },
          "lastName": {
           "type": "string"
          },
          "state": {
           "type": "string"
          },
          "postalCode": {
           "type": "string"
          }
         },
         "required": [
          "address1",
          "city",
          "countryCode",
          "postalCode"
         ]
        }
       ]
      },
      "checkNumber": {
       "type": "string"
      },
      "companyName": {
       "type": "string"
      },
      "routingNumber": {
       "type": "string"
      },
      "type": {
       "type": "string"
      }
     },
     "required": [
      "accountNumber",
      "accountType",
      "billingAddress",
      "routingNumber",
      "type"
     ]
    },
    "value": {
     "type": "object",
     "properties": {
      "amount": {
       "type": "integer"
      },
      "currency": {
       "type": "string"
      }
     },
     "required": [
      "amount",
      "currency"
     ]
    }
   },
   "required": [
    "narrative",
    "paymentInstrument",
    "value"
   ]
  },
  "merchant": {
   "type": "object",
   "properties": {
    "entity": {
     "type": "string"
    }
   },
   "required": [
    "entity"
   ]
  },
  "transactionReference": {
   "type": "string"
  }
 },
 "required": [
  "instruction",
  "merchant",
  "transactionReference"
 ]
}

Responses

Examples

POST
 ACH Sale with an outcome of 'authorized'
View
POST
 ACH Sale with an outcome of 'Sent for Settlement'
View
POST
 ACH Sale with an outcome of 'refused'
View
POST
 EFT Sale with an outcome of 'Sent for Settlement'
View

Link relationship

post
 ACH Sale with an outcome of 'authorized' 
POST
Copied!
{
  "Authorization": "Basic Auth",
  "Content-Type": "application/vnd.worldpay.pay-direct-v1+json",
  "Accept": "application/vnd.worldpay.pay-direct-v1+json"
}
Copied!
{
  "transactionReference": "reference",
  "merchant": {
    "entity": "entity"
  },
  "instruction": {
    "narrative": {
      "line1": "LINE1",
      "line2": "LINE2"
    },
    "paymentInstrument": {
      "type": "bankAccountUS",
      "accountType": "corporate",
      "accountNumber": "01234567890123456",
      "routingNumber": "01234567",
      "checkNumber": "012345678901234",
      "companyName": "companyName",
      "billingAddress": {
        "firstName": "firstName",
        "lastName": "lastName",
        "address1": "address1",
        "address2": "address2",
        "address3": "address3",
        "zipCode": "45249",
        "city": "city",
        "state": "OH",
        "countryCode": "US"
      }
    },
    "value": {
      "currency": "USD",
      "amount": 250
    }
  }
}

201

Copied!
{
  "outcome": "authorized",
  "_links": {
    "direct:events": {
      "href": "https://try.access.worldpay.com/payments/alternative/direct/events/{resource}"
    },
    "direct:reversal": {
      "href": "https://try.access.worldpay.com/payments/alternative/direct/reversals/{resource}"
    },
    "curies": [
      {
        "name": "direct",
        "href": "https://try.access.worldpay.com/rels/payments/alternative/direct/{rel}",
        "templated": true
      }
    ]
  }
}