Appearance
/auth
Instead of using the Connect Product to handle collecting and verifying credentials, the auth endpoint can be used in conjunction with webhook events and the auth step endpoint to have full control of the user experience. Due to the complexity of the auth process, the webhook events that support this are not enabled by default. Please reach out to your customer support contact to discuss using this feature.
Create auth submits a request to validate given credentials then performs a swap. When userPresenceRequired
is true, this means the client is set up on the company's site to use code or prompt based MFA.
HTTP Request
POST https://api.q2open.io/v1/auth
Arguments
Parameter | Description |
---|---|
clientId | ID of client to create the auth for. |
companyId | ID of the company to validate credentials for. |
items | Must be set to 'swap'. What to do after validating credentials. |
paymentIdentifier | Optional - custom identifier for external system correlation. |
meta.paymentMethodId | Optional - ID of payment method to assign. |
meta.billId | DEPRECATED Optional - ID of existing bill. Should not be used with swapId. |
meta.swapId | Optional - ID of existing swap. Should not be used with billId. |
form | Required login fields that are unique to each company. Usually email/username and password, but sometimes it can be more such as phone number or account number |
Returns
A success message and the new or existing authId for the given company.
Example Request
shell
curl "https://api.q2open.io/v1/auth" \
-H "Authorization: Bearer dc220490-e6ee-11e5-8a94-e7385a8d929e" \
-H "Content-Type: application/json" \
-d '{
"items": ["swap"],
"paymentIdentifier": "PaymentIdentifier001",
"meta": {
"paymentMethodId": "56e1ddbd1a05319bc198d36f",
},
"clientId": "579b695decfa11012711875d",
"companyId": "579b695decea110719b1874d",
"form": {
"email": "example@example.com",
"password": "12345678"
}
}'
Example Response
json
{
"success": true,
"message": "Auth has been queued and will respond via webhooks.",
"authId": "579b695decea110719b1874d"
}