Email Payment Link

Use emailToToken to instruct DPO to send a payment email for a token you already created with createToken.

Email Payment Link for an Existing Token (emailToToken, v6)

This operation does not create a token.
It uses your existing TransactionToken (a.k.a. TransToken).


Endpoint & Headers

POST https://secure.3gdirectpay.com/API/v6/
Content-Type: application/xml; charset=utf-8
Accept: application/xml

Request

Required Fields

FieldRequiredDescription
CompanyTokenYesYour merchant token
RequestYesMust be emailToToken
TransactionTokenYesThe token returned by [createToken](../reference/create-token)

If the token doesn’t already have a customer email attached, first call updateToken to add customerEmail (and optional phone/country), then call emailToToken.


Example Request (XML)

<?xml version="1.0" encoding="utf-8"?>
<API3G>
  <CompanyToken>YOUR_COMPANY_TOKEN</CompanyToken>
  <Request>emailToToken</Request>
  <TransactionToken>EC9E975A-A7A2-4031-8972-BF123CDD9EDD</TransactionToken>
</API3G>

Responses

Implementations vary slightly by tenant. You’ll receive a high-level Result plus optional delivery details.

Example Success (email queued/sent)

<?xml version="1.0" encoding="utf-8"?>
<API3G>
  <Result>000</Result>
  <ResultExplanation>Email queued</ResultExplanation>
  <TransToken>EC9E975A-A7A2-4031-8972-BF123CDD9EDD</TransToken>
</API3G>

Example “Not sent” (common on test tenants)

<?xml version="1.0" encoding="utf-8"?>
<API3G>
  <Result>001</Result>
  <ResultExplanation>Check details</ResultExplanation>
  <ResultDetails>
    <emailResult>200</emailResult>
    <emailExplanation>Not sent</emailExplanation>
    <smsResult>200</smsResult>
    <smsExplanation>Not sent</smsExplanation>
  </ResultDetails>
</API3G>

Why you might see “Not sent”:

  • Outbound email/SMS is disabled for your merchant (very common in test)
  • Email templates/sender not configured on DPO’s side
  • No customerEmail associated with the token (add via updateToken first)

Delivery Troubleshooting

  1. Ensure the token has an email
    If not, update first:

    <API3G>
      <CompanyToken>YOUR_COMPANY_TOKEN</CompanyToken>
      <Request>updateToken</Request>
      <TransToken>EC9E975A-A7A2-4031-8972-BF123CDD9EDD</TransToken>
      <Transaction>
        <customerFirstName>Alex</customerFirstName>
        <customerLastName>Nkosi</customerLastName>
        <customerEmail>[email protected]</customerEmail>
      </Transaction>
    </API3G>
  2. If DPO delivery is disabled in test, send your own email with the hosted link:

    https://secure.3gdirectpay.com/pay.asp?ID={TransToken}
  3. Need DPO to send the messages from test?
    Ask DPO Support to enable email/SMS notifications and configure templates/sender for your merchant.


Typical Flow

sequenceDiagram
  participant M as Merchant
  participant D as DPO API
  participant C as Customer

  M->>D: createToken → TransToken
  M->>D: (optional) updateToken add customerEmail
  M->>D: emailToToken (TransactionToken)
  D-->>C: Sends email with pay link (if enabled)
  C->>D: Opens link and pays
  D-->>M: BackURL callback (final result)
  M->>D: (optional) verifyToken for reconciliation

Notes & Best Practices

  • emailToToken does not modify token data; it only triggers the send.
    Use updateToken to attach/modify customerEmail, customerPhone, PTL, etc.
  • If you need a guaranteed experience, send your own email containing the hosted URL; the payment flow is identical.
  • Log: TransToken, CompanyRef, Result, and (if present) the ResultDetails delivery info.