Skip to content

Commit 2240038

Browse files
Merge pull request #82 from PaystackOSS/patch-transaction
Chore: Update Transaction responses
2 parents 1594c89 + e7e5d3d commit 2240038

File tree

22 files changed

+530
-492
lines changed

22 files changed

+530
-492
lines changed

dist/api/transactions/charge_authorization/response.json

Lines changed: 24 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -5,46 +5,55 @@
55
"status": true,
66
"message": "Charge attempted",
77
"data": {
8-
"amount": 27000,
8+
"amount": 35247,
99
"currency": "NGN",
10-
"transaction_date": "2020-05-27T11:45:03.000Z",
10+
"transaction_date": "2024-08-22T10:53:49.000Z",
1111
"status": "success",
12-
"reference": "cn65lf4ixmkzvda",
12+
"reference": "0m7frfnr47ezyxl",
1313
"domain": "test",
1414
"metadata": "",
1515
"gateway_response": "Approved",
1616
"message": null,
1717
"channel": "card",
1818
"ip_address": null,
1919
"log": null,
20-
"fees": 14500,
20+
"fees": 10247,
2121
"authorization": {
22-
"authorization_code": "AUTH_pmx3mgawyd",
22+
"authorization_code": "AUTH_uh8bcl3zbn",
2323
"bin": "408408",
2424
"last4": "4081",
2525
"exp_month": "12",
26-
"exp_year": "2020",
26+
"exp_year": "2030",
2727
"channel": "card",
28-
"card_type": "visa DEBIT",
29-
"bank": "Test Bank",
28+
"card_type": "visa ",
29+
"bank": "TEST BANK",
3030
"country_code": "NG",
3131
"brand": "visa",
3232
"reusable": true,
33-
"signature": "SIG_2Gvc6pNuzJmj4TCchXfp",
33+
"signature": "SIG_yEXu7dLBeqG0kU7g95Ke",
3434
"account_name": null
3535
},
3636
"customer": {
37-
"id": 23215815,
37+
"id": 181873746,
3838
"first_name": null,
3939
"last_name": null,
40-
"email": "mail@mail.com",
41-
"customer_code": "CUS_wt0zmhzb0xqd4nr",
40+
"email": "demo@test.com",
41+
"customer_code": "CUS_1rkzaqsv4rrhqo6",
4242
"phone": null,
43-
"metadata": null,
44-
"risk_action": "default"
43+
"metadata": {
44+
"custom_fields": [
45+
{
46+
"display_name": "Customer email",
47+
"variable_name": "customer_email",
48+
"value": "[email protected]"
49+
}
50+
]
51+
},
52+
"risk_action": "default",
53+
"international_format_phone": null
4554
},
4655
"plan": null,
47-
"id": 696105928
56+
"id": 4099490251
4857
}
4958
}
5059
},

dist/api/transactions/export/response.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,8 @@
55
"status": true,
66
"message": "Export successful",
77
"data": {
8-
"path": "https://files.paystack.co/exports/100032/1460290758207.csv"
8+
"path": "https://s3.eu-west-1.amazonaws.com/files.paystack.co/exports/463433/transactions/Integration_name_transactions_1724324423843.csv?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=AKIAI7CL5IZL2DJHOPPA%2F20240822%2Feu-west-1%2Fs3%2Faws4_request&X-Amz-Date=20240822T110023Z&X-Amz-Expires=60&X-Amz-Signature=40525f4f361e07c09a445a1a6888d135758abd507ed988ee744c2d94ea14cf1e&X-Amz-SignedHeaders=host",
9+
"expiresAt": "2024-08-22 11:01:23"
910
}
1011
}
1112
}

dist/api/transactions/fetch/response.json

Lines changed: 46 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -5,31 +5,24 @@
55
"status": true,
66
"message": "Transaction retrieved",
77
"data": {
8-
"id": 292584114,
8+
"id": 4099260516,
99
"domain": "test",
1010
"status": "success",
11-
"reference": "203520101",
12-
"amount": 10000,
11+
"reference": "re4lyvq3s3",
12+
"receipt_number": null,
13+
"amount": 40333,
1314
"message": null,
1415
"gateway_response": "Successful",
15-
"paid_at": "2019-10-09T13:03:28.000Z",
16-
"created_at": "2019-10-09T13:00:16.000Z",
16+
"helpdesk_link": null,
17+
"paid_at": "2024-08-22T09:15:02.000Z",
18+
"created_at": "2024-08-22T09:14:24.000Z",
1719
"channel": "card",
1820
"currency": "NGN",
19-
"ip_address": "197.211.43.98",
20-
"metadata": {
21-
"custom_fields": [
22-
{
23-
"display_name": "Mobile Number",
24-
"variable_name": "mobile_number",
25-
"value": "+2348012345678"
26-
}
27-
],
28-
"referrer": "http://localhost:3001/integration/microphone.html?"
29-
},
21+
"ip_address": "197.210.54.33",
22+
"metadata": "",
3023
"log": {
31-
"start_time": 1570626018,
32-
"time_spent": 192,
24+
"start_time": 1724318098,
25+
"time_spent": 4,
3326
"attempts": 1,
3427
"errors": 0,
3528
"success": true,
@@ -39,48 +32,66 @@
3932
{
4033
"type": "action",
4134
"message": "Attempted to pay with card",
42-
"time": 191
35+
"time": 3
4336
},
4437
{
4538
"type": "success",
4639
"message": "Successfully paid with card",
47-
"time": 192
40+
"time": 4
4841
}
4942
]
5043
},
51-
"fees": 150,
44+
"fees": 10283,
5245
"fees_split": null,
5346
"authorization": {
54-
"authorization_code": "AUTH_2e4k18sj52",
47+
"authorization_code": "AUTH_uh8bcl3zbn",
5548
"bin": "408408",
5649
"last4": "4081",
5750
"exp_month": "12",
58-
"exp_year": "2020",
51+
"exp_year": "2030",
5952
"channel": "card",
60-
"card_type": "visa DEBIT",
61-
"bank": "Test Bank",
53+
"card_type": "visa ",
54+
"bank": "TEST BANK",
6255
"country_code": "NG",
6356
"brand": "visa",
6457
"reusable": true,
65-
"signature": "SIG_JrPFkMYhcu8AD75eQWKl",
66-
"account_name": "BoJack Horseman"
58+
"signature": "SIG_yEXu7dLBeqG0kU7g95Ke",
59+
"account_name": null
6760
},
6861
"customer": {
69-
"id": 1809887,
62+
"id": 181873746,
7063
"first_name": null,
7164
"last_name": null,
72-
"email": "customer@email.com",
73-
"customer_code": "CUS_0c35ys9w8ma5tbr",
65+
"email": "demo@test.com",
66+
"customer_code": "CUS_1rkzaqsv4rrhqo6",
7467
"phone": null,
75-
"metadata": null,
76-
"risk_action": "deny"
68+
"metadata": {
69+
"custom_fields": [
70+
{
71+
"display_name": "Customer email",
72+
"variable_name": "customer_email",
73+
"value": "[email protected]"
74+
}
75+
]
76+
},
77+
"risk_action": "default",
78+
"international_format_phone": null
7779
},
7880
"plan": {},
7981
"subaccount": {},
82+
"split": {},
8083
"order_id": null,
81-
"paidAt": "2019-10-09T13:03:28.000Z",
82-
"createdAt": "2019-10-09T13:00:16.000Z",
83-
"requested_amount": 1500000
84+
"paidAt": "2024-08-22T09:15:02.000Z",
85+
"createdAt": "2024-08-22T09:14:24.000Z",
86+
"requested_amount": 30050,
87+
"pos_transaction_data": null,
88+
"source": {
89+
"type": "api",
90+
"source": "merchant_api",
91+
"identifier": null
92+
},
93+
"fees_breakdown": null,
94+
"connect": null
8495
}
8596
}
8697
},

dist/api/transactions/initialize/response.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,9 @@
55
"status": true,
66
"message": "Authorization URL created",
77
"data": {
8-
"authorization_url": "https://checkout.paystack.com/0peioxfhpn",
9-
"access_code": "0peioxfhpn",
10-
"reference": "7PVGX8MEk85tgeEpVDtD"
8+
"authorization_url": "https://checkout.paystack.com/3ni8kdavz62431k",
9+
"access_code": "3ni8kdavz62431k",
10+
"reference": "re4lyvq3s3"
1111
}
1212
}
1313
}

dist/api/transactions/list/response.json

Lines changed: 74 additions & 67 deletions
Original file line numberDiff line numberDiff line change
@@ -6,89 +6,96 @@
66
"message": "Transactions retrieved",
77
"data": [
88
{
9-
"id": 5833,
9+
"id": 4099260516,
1010
"domain": "test",
11-
"status": "failed",
12-
"reference": "icy9ma6jd1",
13-
"amount": 100,
11+
"status": "success",
12+
"reference": "re4lyvq3s3",
13+
"amount": 40333,
1414
"message": null,
15-
"gateway_response": "Declined",
16-
"paid_at": null,
17-
"created_at": "2016-09-29T00:00:05.000Z",
15+
"gateway_response": "Successful",
16+
"paid_at": "2024-08-22T09:15:02.000Z",
17+
"created_at": "2024-08-22T09:14:24.000Z",
1818
"channel": "card",
1919
"currency": "NGN",
20-
"ip_address": null,
20+
"ip_address": "197.210.54.33",
2121
"metadata": null,
22-
"timeline": null,
23-
"customer": {
24-
"first_name": "Test",
25-
"last_name": "Dummy",
26-
"email": "[email protected]",
27-
"phone": "16504173147",
28-
"metadata": null,
29-
"customer_code": "CUS_1uld4hluw0g2gn0"
30-
},
31-
"authorization": {},
32-
"plan": {},
33-
"requested_amount": 100
34-
},
35-
{
36-
"id": 298126,
37-
"domain": "live",
38-
"status": "failed",
39-
"reference": "z1gsnks86e6kfo8",
40-
"amount": 10000,
41-
"message": null,
42-
"gateway_response": "Declined",
43-
"paid_at": null,
44-
"created_at": "2016-09-29T00:03:22.000Z",
45-
"channel": "card",
46-
"currency": "NGN",
47-
"ip_address": null,
48-
"metadata": {
49-
"custom_fields": [
22+
"log": {
23+
"start_time": 1724318098,
24+
"time_spent": 4,
25+
"attempts": 1,
26+
"errors": 0,
27+
"success": true,
28+
"mobile": false,
29+
"input": [],
30+
"history": [
5031
{
51-
"display_name": "Mobile Number",
52-
"variable_name": "mobile_number",
53-
"value": "+2348012345678"
32+
"type": "action",
33+
"message": "Attempted to pay with card",
34+
"time": 3
35+
},
36+
{
37+
"type": "success",
38+
"message": "Successfully paid with card",
39+
"time": 4
5440
}
5541
]
5642
},
57-
"log": null,
58-
"fees": null,
59-
"paidAt": "2016-09-29T00:03:25.000Z",
60-
"createdAt": "2016-09-29T00:03:22.000Z",
43+
"fees": 10283,
44+
"fees_split": null,
45+
"customer": {
46+
"id": 181873746,
47+
"first_name": null,
48+
"last_name": null,
49+
"email": "[email protected]",
50+
"phone": null,
51+
"metadata": {
52+
"custom_fields": [
53+
{
54+
"display_name": "Customer email",
55+
"variable_name": "customer_email",
56+
"value": "[email protected]"
57+
}
58+
]
59+
},
60+
"customer_code": "CUS_1rkzaqsv4rrhqo6",
61+
"risk_action": "default"
62+
},
6163
"authorization": {
62-
"authorization_code": "AUTH_86gs11dr",
63-
"bin": "539983",
64-
"last4": "0061",
65-
"exp_month": "08",
66-
"exp_year": "2018",
67-
"card_type": "mastercard DEBIT",
68-
"bank": "Guaranty Trust Bank",
64+
"authorization_code": "AUTH_uh8bcl3zbn",
65+
"bin": "408408",
66+
"last4": "4081",
67+
"exp_month": "12",
68+
"exp_year": "2030",
69+
"channel": "card",
70+
"card_type": "visa ",
71+
"bank": "TEST BANK",
6972
"country_code": "NG",
70-
"brand": "mastercard",
71-
"account_name": "BoJack Horseman"
73+
"brand": "visa",
74+
"reusable": true,
75+
"signature": "SIG_yEXu7dLBeqG0kU7g95Ke",
76+
"account_name": null
7277
},
73-
"customer": {
74-
"id": 8279,
75-
"first_name": "Test",
76-
"last_name": "Dummy",
77-
"email": "[email protected]",
78-
"phone": "16504173147",
79-
"customer_code": "CUS_1uld4hluw0g2gn0",
80-
"metadata": null,
81-
"risk_action": "default"
78+
"plan": {},
79+
"split": {},
80+
"subaccount": {},
81+
"order_id": null,
82+
"paidAt": "2024-08-22T09:15:02.000Z",
83+
"createdAt": "2024-08-22T09:14:24.000Z",
84+
"requested_amount": 30050,
85+
"source": {
86+
"source": "merchant_api",
87+
"type": "api",
88+
"identifier": null,
89+
"entry_point": "transaction_initialize"
8290
},
83-
"requested_amount": 10000
91+
"connect": null,
92+
"pos_transaction_data": null
8493
}
8594
],
8695
"meta": {
87-
"total": 1,
88-
"skipped": 0,
89-
"perPage": 50,
90-
"page": 1,
91-
"pageCount": 1
96+
"next": "dW5kZWZpbmVkOjQwMTM3MDk2MzU=",
97+
"previous": null,
98+
"perPage": 50
9299
}
93100
}
94101
}

0 commit comments

Comments
 (0)