Téléventes
Telesales is an alternative way of initiating the Affirm checkout.
Aperçu
L'API de paiement Télévente est une méthode efficace pour initier le processus de paiement Affirm. Cette fonctionnalité conviviale permet aux télévendeurs de lancer le processus de paiement pour les clients, en intégrant de manière transparente l’expérience avec le flux en magasin.
Comment ça fonctionne
Flux de clients
Lorsqu'un client effectue un paiement, il déclenche une redirection du navigateur ainsi qu'une requête webhook contenant le checkout_token pour l'autorisation.
Sécurité
We prioritize privacy and security for our customers. Therefore, the Telesales API requires customers to apply using their own device. When an API request is submitted, Affirm sends a text message or email to the provided phone number or email address, containing a link to the customer’s online application.
Utilisation des webhooks
For added efficiency and reliability, you can provide Affirm with a webhook address for server-to-server confirmation of the checkout_token after the customer confirms their loan. While Affirm continues to POST the token to the user_confirmation_url
, using a webhook can minimize the risk of client/browser errors and expedite the payment status update in your telesales system.
Étapes d'intégration
Étape 1 : Ajoutez Affirm comme option de paiement dans votre flux Telesales
When customers choose to pay with Affirm over the phone, your telesales agents select Affirm as a payment option from your frontend or from the agent dashboard. For details, see the sample frontend template and instructions.
Étape 2 : Appelez l'API /store pour initier l'appel de paiement Affirm
When a customer selects Affirm, send the order and customer details to Affirm’s /store API. This prompts Affirm to send the customer a text or email containing the link to finish their checkout with Affirm. See the example below: \
POST /api/v2/checkout/store HTTP/1.1
Host: sandbox.affirm.com
Content-Type: application/json
{
"merchant": {
"public_api_key": "PUBLIC_API_KEY",
"user_cancel_url": "https://www.cancelurl.com",
"user_confirmation_url": "https://www.confirmationurl.com",
"user_confirmation_url_action": "POST",
"name": "Telesales Affirm demo"
},
"billing":{
"name":{
"full": "John Doe"
},
"address":{
"line1": "325 Pacific Ave",
"city": "San Francisco",
"state": "CA",
"zipcode": "94112",
"country": "USA"
},
"phone_number": "4155552222",
"email": "[email protected]"
},
"metadata": {
"entity_name": "Vignan 1234",
"store_location": "Denver"
},
"order_id": "your_order_identifier_ABC_123",
"total": 5000
}
Testing
The Store API sends SMS text messages only in the Affirm Live environment. During Sandbox environment testing, you can use only email messages to receive the Checkout URL to complete your Affirm purchase.
In the response, you receive the redirect_url
that the customer was sent and an Affirm checkout_id
, which is used for authorization.
Étape 3 : recevoir la confirmation de commande via Webhook
After a user receives and confirms their loan, Affirm's server is notified of that event. The checkout_id
is POSTed back to your server at the webhook URL that you provide your Technical Account Manager.
Configuration du webhook
You must configure a webhook URL to complete the in-store integration. You can contact Affirm through your Account team or the support widget.
Appelez l'API /transactions d'Affirm et passez le paramètre checkout_id
au paramètre transaction_id
et autorisez la commande. La commande doit être autorisée en toute sécurité avant de la sauvegarder ou de mettre à jour le statut de la commande sur le tableau de bord de l’agent.
Étape 4 : Mettre à jour l’interface de l’agent
Informez votre agent que la commande a été autorisée. À cette étape, l’agent de télévente peut finaliser la commande pour le client.
Étape 5 : Capturer et gérer la commande
With the persistent id
received from authorization, you can initiate different transaction actions, such as capturing the order on fulfillment or issuing a refund depending on your internal processes.
Mis à jour about 1 month ago