Empowering Restaurants through Integration

Follow

Payments

The payments endpoints handle the details around storing and accessing credit cards and other payment methods stored within a Braintree vault. PCI-DSS standards require strict controls on credit cards, you'll have to use Braintree methods to store credit card information and generate a nonce that our endpoints can use.

Paths

Attaches a payment to a cart

POST /payments/partner_payment
Description

This endpoint attaches a credit card or paypal express account - via a Braintree nonce - to the currently active cart.

Body
payment_nonce
labelRequired
String
A nonce created using the Braintree Grant API that links to the credit card to use.
type
labelRequired
String
The type of payment to add. This should be "CREDIT_CARD", "PAYPAL_EXPRESS", or "APPLE_PAY". Note that you'll need to register your Braintree merchant account with us as described here and then contact us to activate it.
payment_name
label_outlineOptional
String
A descriptive name to give this payment as to help the diner remember it. Usually, this information comes from diner input.
vaulted
labelRequired
Boolean
Whether this payment should be stored for future use in Grubhub orders. Currently, this should always be set to `false`.
is_default
label_outlineOptional
Boolean
Whether this payment method should be used as the default method in future orders.
Responses

Add Apple Pay payment method

POST /payments/apple_pay
Description

Adds an Apple Pay account to the available payment methods for this user.

Body
payment_nonce
labelRequired
String
The Braintree nonce associated with the Apple Pay account to add.
type
labelRequired
String
The type of payment. For this endpoint, this field should be "APPLE PAY".
payment_name
label_outlineOptional
String
The name under which to store this payment on the diner's account, e.g. "Personal Account".
vaulted
label_outlineOptional
Boolean
Whether to store the payment method details with the diner's account. By default, this is false.
is_default
label_outlineOptional
Boolean
Whether this payment method is automatically selected by default when the diner proceeds to check out a cart.
Responses

Get the payment types available

POST /kendo/get-available-entitlement-types
Description

This service returns the payment methods attached available to your integration currently. If a method is temporarily unavailable or if new methods become available, this list will change.

Body
cart
label_outlineOptional
The cart to check. If this is not included, the request will return information for the current cart associated with the currently authorized diner.
Responses

Models

AvailableEntitlementType

A payment type that could be attached to a cart. If it is available, then the URI can be used to request information about it.

Properties
entitlement_type
label_outlineOptional
String
The type of payment method.
detail_url
label_outlineOptional
URI
The URI of the endpoint against which you can make calls to view, change, or delete this payment method. Because we do not currently support shared vaulting, these URIs will not hold any payment information.

AvailableEntitlementTypesResponse

An array of the entitlement types. If a given entitlement is available as a payment method, then the URI field can be used to request information about it. Because we do not currently support shared vaulting, these URIs will not hold any payment information.

Properties
available_entitlement_types
label_outlineOptional
An array of the payment types.

ResourceCreateResponse

A new payment-related resource.

Properties
id
labelRequired
String
The ID of the newly created resource (payment, etc.).
uri
label_outlineOptional
URI
The URI that you can use as a RESTful endpoint to affect this new resource.
already_exists
label_outlineOptional
boolean
Indicates whether this resource already has been created.