Wiki source code of Addressee
Last modified by Asbjørn Ulsberg on 2018/07/05 12:48
8.1 | 1 | The Payer resource contains information about the person that performed the PayEx Checkout user flow and eventually paid for the goods or service. | |
2 | |||
3 | = Retrieve Addressee resource = | ||
4 | |||
16.1 | 5 | To retrieve the Addressee resource, you first have to have created a [[Payment Session resource>>Sandbox.payex-checkout-v1.Introduction.Payment-session.WebHome]] and have the payer complete the PayEx Checkout user flow. Then, within the Payment Session resource, you will find a {{code}}Addressee{{/code}} property containing the URL of the Addressee resource. When you have discovered that URL, just perform an HTTP {{code}}GET{{/code}} request on it. | |
8.1 | 6 | ||
7 | == Example == | ||
8 | |||
9 | === Request === | ||
10 | |||
11 | {{code language="JavaScript"}} | ||
12 | GET https://api.payex.com/psp/checkout/payment-sessions/123-456-789/addressee HTTP/1.1 | ||
13 | Accept: application/json | ||
14 | Authorization: Bearer merchantToken== | ||
15 | {{/code}} | ||
16 | |||
17 | === Response === | ||
18 | |||
19 | {{code language="JavaScript"}} | ||
20 | HTTP/1.1 200 OK | ||
21 | Content-Type: application/json | ||
22 | |||
23 | { | ||
24 | "id": "https://api.payex.com/psp/checkout/payment-sessions/123-456-789/addressee", | ||
25 | "email": "payer@example.com", | ||
26 | "mobilePhoneNumber": "+4712345678", | ||
27 | "fullName": "Bill Payson", | ||
28 | "address": { | ||
29 | "streetAddress": "Street 13", | ||
30 | "zipCode": "93837", | ||
31 | "city": "Billington", | ||
32 | "coAddress": "Cash Payson, Some Avenue 13", | ||
33 | "countryCode": "NO" | ||
34 | } | ||
35 | } | ||
36 | {{/code}} |