Address verification system (AVS)

Address verification system (AVS) checks with the acquiring bank if the address of the cardholder matches the billing address. The acquiring bank provides a score as a result of this verification.

Testing values

The AVS feature is testable in Sandbox when making pay-ins in GBP by changing the two first digits of the billing address PostalCode.

First 2 digits of the PostalCodeAVSResult
22FULL_MATCH
12, 42, 82ADDRESS_MATCH_ONLY
21, 24, 28POSTAL_CODE_MATCH_ONLY
14, 18, 41, 44, 48, 81, 84, 88NO_MATCH
11, any other valueNO_CHECK

Note – PostalCode default value

Keep in mind that, by default, the Address information of the Billing parameter inherits the values of the Shipping parameter, if provided, otherwise the user (author).

Worked example

Prerequisites

To go through the worked example below, you need to have everything you usually have for making a pay-in:

  • A User object, with a GBP wallet
  • A GBP card for the same user
REST
1{
2 "AuthorId": "142036728 ",
3 "CreditedWalletId": "150014739",
4 "DebitedFunds": {
5 "Currency": "GBP",
6 "Amount": 5000
7 },
8 "Fees": {
9 "Currency": "GBP",
10 "Amount": 100
11 },
12 "SecureModeReturnURL": "http://example.com",
13 "CardId": "162951073",
14 "Billing": {
15 "FirstName": "Petra",
16 "LastName": "Braun",
17 "Address": {
18 "AddressLine1": "660 Hayes Fork",
19 "AddressLine2": "Zora Locks",
20 "City": "Paris",
21 "Region": "Île-de-France",
22 "PostalCode": "22400",
23 "Country": "FR"
24 }
25 },
26 "IpAddress": "2001:0620:0000:0000:0211:24FF:FE80:C12C",
27 "BrowserInfo": {
28 "AcceptHeader": "text/html, application/xhtml+xml, application/xml;q=0.9, /;q=0.8",
29 "JavaEnabled": true,
30 "Language": "FR-FR",
31 "ColorDepth": 4,
32 "ScreenHeight": 1800,
33 "ScreenWidth": 400,
34 "TimeZoneOffset": 60,
35 "UserAgent": "Mozilla/5.0 (iPhone; CPU iPhone OS 13_6_1 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148",
36 "JavascriptEnabled": true
37 }
38}
API Response with AVS check
1{
2 "Id": "162996961",
3 "Tag": "Created using MANGOPAY API Collection Postman",
4 "CreationDate": 1677163753,
5 "AuthorId": "142036728",
6 "CreditedUserId": "142036728",
7 "DebitedFunds": {
8 "Currency": "GBP",
9 "Amount": 5000
10 },
11 "CreditedFunds": {
12 "Currency": "GBP",
13 "Amount": 4900
14 },
15 "Fees": {
16 "Currency": "GBP",
17 "Amount": 100
18 },
19 "Status": "SUCCEEDED",
20 "ResultCode": "000000",
21 "ResultMessage": "Success",
22 "ExecutionDate": 1677163755,
23 "Type": "PAYIN",
24 "Nature": "REGULAR",
25 "CreditedWalletId": "150014739",
26 "DebitedWalletId": null,
27 "PaymentType": "CARD",
28 "ExecutionType": "DIRECT",
29 "SecureMode": "DEFAULT",
30 "CardId": "162951073",
31 "SecureModeReturnURL": "http://example.com?transactionId=162996961",
32 "SecureModeRedirectURL": null,
33 "SecureModeNeeded": false,
34 "Culture": "EN",
35 "SecurityInfo": {
36 "AVSResult": "FULL_MATCH"
37 },
38 "StatementDescriptor": "MANGOPAY",
39 "BrowserInfo": {
40 "AcceptHeader": "text/html, application/xhtml+xml, application/xml;q=0.9, /;q=0.8",
41 "JavaEnabled": true,
42 "Language": "FR-FR",
43 "ColorDepth": 4,
44 "ScreenHeight": 1800,
45 "ScreenWidth": 400,
46 "TimeZoneOffset": 60,
47 "UserAgent": "Mozilla/5.0 (iPhone; CPU iPhone OS 13_6_1 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148",
48 "JavascriptEnabled": true
49 },
50 "IpAddress": "0112:73bb:2d58:2369:2a2e:cf3c:03b4:c6a3",
51 "Billing": {
52 "FirstName": "Petra",
53 "LastName": "Braun",
54 "Address": {
55 "AddressLine1": "660 Hayes Fork",
56 "AddressLine2": "Zora Locks",
57 "City": "Paris",
58 "Region": "Île-de-France",
59 "PostalCode": "22400",
60 "Country": "FR"
61 }
62 },
63 "Shipping": {
64 "FirstName": "Petra",
65 "LastName": "Braun",
66 "Address": {
67 "AddressLine1": "660 Hayes Fork",
68 "AddressLine2": "Zora Locks",
69 "City": "Paris",
70 "Region": "Île-de-France",
71 "PostalCode": "22400",
72 "Country": "FR"
73 }
74 },
75 "Requested3DSVersion": null,
76 "Applied3DSVersion": "V2_1",
77 "RecurringPayinRegistrationId": null
78}