createAccount(V7)
Description
The createAccount request will create new Duma Pay account, and will try to verify credit card by charging 1 USD
URL: https://secure1.sandbox.directpay.online/API/v7/index.php
Variables to send:
Parameter | Data type | Description | |
---|---|---|---|
Request | Text | createAccount | Mandatory |
CompanyToken | Token | Token you got from 3G to operate this API | Mandatory |
CustomerEmail | Text | Customer Email address | Mandatory |
CustomerFirstName | Text | Customer first name | Mandatory |
CustomerLastName | Text | Customer last name | Mandatory |
CustomerPhone | Text | Customer phone number | Mandatory |
CustomerDialCode | ISO code | Customer country ISO 2 letter code | Mandatory |
CustomerPassword | Text | 6 chars minimum. Allows characters like !@#$%&()? | Optional |
CustomerAddress | Text | Customer address | Optional |
CustomerCity | Text | Customer city | Optional |
CustomerCountry | ISO code | Customer country ISO 2 letter code | Optional |
CustomerZip | Text | Customer zip code | Optional |
| Text | Verify “mobile” or “creditCard” | Optional |
CustomerCreditCard | Text | Customer credit card number | Mandatory/Optional if |
CustomerExpiry | Text | Customer credit card expiry date (MM/YY) | Mandatory/Optional if |
CustomerCvv | Text | Customer credit card CVV | Mandatory/Optional if |
CustomerAllowSWrefunds | Bool | Verify credit card via current company account (default 0) | Optional |
CustomerHolderName | Text | Customer credit card holder name | Mandatory/Optional if |
CustomerThreeD | XML (String) | Customer credit card 3D data (if need verify 3D credit card ) | Optional |
| Bool | Allow send verify email, default - 1 | Optional |
| Text | MNO for verify payment | Mandatory/Optional if |
| Text | MNO country, for example: “Kenya“ | Mandatory/Optional if |
| Text | Phone number for mobile payment | Mandatory/Optional if |
3D Params (CustomerThreeD)
Parameter | Data type | Description |
|
---|---|---|---|
| Text | 3D param, mandatory for PG3D, MIGS3D | Optional |
| Text | 3D param, mandatory for PG3D, MIGS3D( | Optional |
| Text | 3D param, mandatory for all terminal types | Optional |
| Text | 3D param, mandatory for all terminal types | Optional |
| Text | 3D param, mandatory for all terminal types | Optional |
| Text | 3D param, mandatory for PG3D | Optional |
| Text | 3D param, mandatory for MPGS3D, MIGS3D, MPGS3DAirlines | Optional |
| Text | 3D param, mandatory for MPGS3D, MPGS3DAirlines | Optional |
Request example:
Request example creditCard verify
<?xml version="1.0" encoding="utf-8"?>
<API3G>
<CompanyToken>90EC1DA4-A7C5-432C-930C-098715D3130E</CompanyToken>
<Request>createAccount</Request>
<CustomerVerify>creditCard</CustomerVerify>
<CustomerEmail>test@directpay.online</CustomerEmail>
<CustomerPassword>12345678</CustomerPassword>
<CustomerFirstName>Josh</CustomerFirstName>
<CustomerLastName>Grinberg</CustomerLastName>
<CustomerAddress>Rose Avenue 14</CustomerAddress>
<CustomerCity>Nairobi</CustomerCity>
<CustomerCountry>KE</CustomerCountry>
<CustomerDialCode>KE</CustomerDialCode>
<CustomerPhone>0553231231</CustomerPhone>
<CustomerZip>762132</CustomerZip>
<CustomerCreditCard>4111111111111111</CustomerCreditCard>
<CustomerExpiry>1225</CustomerExpiry>
<CustomerCvv>123</CustomerCvv>
<CustomerHolderName>Josh Grinberg</CustomerHolderName>
<CustomerAllowSWrefunds>1</CustomerAllowSWrefunds>
<CustomerSendWelcomeEmail>0</CustomerSendWelcomeEmail>
<CustomerThreeD>
<Enrolled>fkf></Enrolled>
<Paresstatus>Y</Paresstatus>
<Eci>05</Eci>
<Xid>DYYVcrwnujRMnHDy1wlP1Ggz8w0=</Xid>
<Cavv>mHyn+7YFi1EUAREAAAAvNUe6Hv8=</Cavv>
<Signature>_</Signature>
<Veres>AUTHENTICATION_SUCCESSFUL</Veres>
<Pares>eAHNV1mzokgW\/is</Pares>
</CustomerThreeD>
</API3G> |
Request example mobile verify
<?xml version="1.0" encoding="utf-8"?>
<API3G>
<CompanyToken>90EC1DA4-A7C5-432C-930C-098715D3130E</CompanyToken>
<Request>createAccount</Request>
<CustomerVerify>mobile</CustomerVerify>
<CustomerEmail>test@directpay.online</CustomerEmail>
<CustomerPassword>12345678</CustomerPassword>
<CustomerFirstName>Josh</CustomerFirstName>
<CustomerLastName>Grinberg</CustomerLastName>
<CustomerAddress>Rose Avenue 14</CustomerAddress>
<CustomerCity>Nairobi</CustomerCity>
<CustomerCountry>KE</CustomerCountry>
<CustomerDialCode>KE</CustomerDialCode>
<CustomerPhone>0553231231</CustomerPhone>
<CustomerZip>762132</CustomerZip>
<CustomerMno>SafaricomC2B</CustomerMno>
<CustomerMnoCountry>Kenya</CustomerMnoCountry>
<CustomerMnoPhone>25412345678</CustomerMnoPhone>
</API3G>
Respond:
The server will respond for the createAccount request according to the following results:
Parameter | Data type | Description |
---|---|---|
Code | Number | Resault code |
Explanation | Text | Free text of the response |
customerToken | Token | Unique customer token to operate payments |
subscriptionToken | Token | Unique Subscription Token to operate payments |
cardType | Text | Credit card brand |
cardLast4 | Text | Credit card last 4 digits |
| Text | Payment phone number |
|
| Mno Country for verify number |
| Text | Mno for verify number |
Respond example:
response example creditCard verify
<?xml version="1.0" encoding="UTF-8"?>
<API3G>
<Code>000</Code>
<Explanation>Successfully created account and verified credit card</Explanation>
<customerToken>71327DB9-BCD1-4CC4-A062-2BBECF3CBCC0</customerToken>
<subscriptionToken>338182F9-03FD-4EE4-9B66-7B40746090F1</subscriptionToken>
<cardType>Visa</cardType>
<cardLast4>1111</cardLast4>
</API3G> |
response example mobile verify
<?xml version="1.0" encoding="UTF-8"?>
<API3G>
<Code>000</Code>
<Explanation>Successfully created mobile account</Explanation>
<customerToken>71327DB9-BCD1-4CC4-A062-2BBECF3CBCC0</customerToken>
<subscriptionToken>338182F9-03FD-4EE4-9B66-7B40746090F1</subscriptionToken>
<MnoPhone>25412345678</MnoPhone>
<MnoCountry>Kenya</MnoCountry>
<Mno>SafaricomC2B</Mno>
</API3G> |
Error response example:
<?xml version="1.0" encoding="UTF-8"?>
<API3G>
<Code>903</Code>
<Explanation>Terminal was not found . Please try again or contact to support team</Explanation>
</API3G> |
Respond:
The server will respond for the chargeTokenCreditCard request according to the following results:
Parameter | Data type | Description |
Result | 3/4 digits code | A code will be sent with the result of the request |
| Text | Free text of the result |
Respond codes:
Code | Explanation |
000 | Successfully created account |
900 | Create Account Error |
903 | Create account error. Please try again or contact to support team (Internal process error) |
902 | company / subsidiary company was not found |
901, | Data mismatch in one of the fields – fieldname |
804 | Error in XML |
950 | Request missing mandatory fields – fieldname |