MOTO payments Stripe Payment Intents
MOTO (mail order/telephone order) payments are a special case where a customer requests that an order is placed in their name. This payment flow receives a default exemption from 3D Secure challenges (although they may still happen on a rare occasion). They are a single-step payment that is automatically confirmed, although they do require a previously registered customer and a tokenized payment method.
IMPORTANT In order to perform MOTO payments, a permission needs to be granted by Stripe individually. Centra cannot extend this permission to its connected accounts.
IMPORTANT Since this method provides a way to circumvent a 3D Secure challenge, it has to be performed
through a call secured with the shared secret (X-Shared-Secret header). Otherwise the request containing
the MOTO parameters will be rejected by Centra's API.
Below are the instructions on how to perform a MOTO payment:
- Receive the permission from Stripe by contacting them directly. It will be granted to a specific account.
- Connect the Stripe Payment Intents plugin to the account for which the permission was given.
- Build a custom checkout page that will facilitate the following steps:
- collect the ID of the customer that is registered in Stripe (see),
- tokenize a payment method for the registered customer (see),
- submit a payment request with the data collected in the previous steps, example below:
# This requests needs to be performed with the shared secret (the `X-Shared-Secret` header)
mutation paymentInstructions($input: PaymentInstructionsInput!) {
paymentInstructions(input: $input) {
action {
action
... on SuccessPaymentAction {
order {
number
}
}
}
userErrors {
message
path
}
}
}
{
"variables": {
"input": {
// The ID of the plugin for which the MOTO payments were enabled
"paymentMethod": 1,
"termsAndConditions": true,
"paymentReturnPage": "https://centra.dev/confirm",
"paymentFailedPage": "https://centra.dev/failed",
"paymentMethodSpecificFields": {
// This is where the data collected previously should be inputted
"moto": {
// The ID of the Stripe customer
"customer": "cus_XXXX",
// The `payment_method` property of the created Setup Intent
"paymentMethod": "pm_XXXX"
}
},
"address": {
"email":"abc123@example.com",
"firstName": "Test Billing",
"lastName": "Test Billing",
"address1": "Address One",
"zipCode": "12345",
"city": "City",
"phoneNumber": "12345"
},
"shippingAddress": {
"email":"abc123@example.com",
"firstName": "Test Billing",
"lastName": "Test Billing",
"address1": "Address One",
"zipCode": "12345",
"city": "City",
"phoneNumber": "12345"
}
}
}
}
The order should be created upon successful making the above request, there is no need to additionally confirm the payment in the frontend widget.