-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathpaysafeapidirectdebitv1-apiary.apib
3218 lines (2767 loc) · 182 KB
/
paysafeapidirectdebitv1-apiary.apib
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
FORMAT: 1A
HOST: https://api.test.paysafe.com/directdebit/
# Paysafe Direct Debit API
# Release Notes
| Version | Date | Details |
|--- |--- |--- |
| 1.0 | April 2018 | <ul><li>Changed "turnkey" to "platforms"</li></ul>|
| 1.0 | December 2017 | <ul><li>Added Direct Debit single-use tokens</li></ul>|
| 1.0 | November 2016 | <ul><li>Document release</li></ul> |
# Overview
Connect your application with the Paysafe payment engine through our RESTful API and access a full suite of methods, including Purchases and Standalone Credits.
* Obtain output in JSON format that’s easily parsed by wide range of Web and mobile applications.
* Use any language or platform to make requests through standard HTTP protocols.
**Start accepting Direct Debit payments**
Once you have set up a Paysafe merchant account, you can connect to the Paysafe gateway with our simple-to-use API.
Here is a summary of the process:
1. You send a transaction request, including bank information and purchase amount.
2. Paysafe processes the request.
3. The transaction is completed in real time, though in most cases the request clears in 3–5 business days, at which time payment will be deposited in your business bank account.
4. You can look up any Direct Debit transaction you have processed with Paysafe, including charges and credits.
**Direct Debit workflow**
The flow of funds in a Direct Debit charge transaction is depicted in the diagram below.
![](https://developer.paysafe.com/fileadmin/flarecontent/devcentre/Content/Resources/Images/DD_Processing_Overview_Paysafe.png)
1. The customer places an order on the merchant's website.
2. The merchant securely transfers the order information (including bank information and purchase amount) to Paysafe. Note that for certain bank schemes, a mandate reference number must be included in the request.
3. Paysafe sends the transaction request to a Direct Debit clearing house.
4. The Direct Debit charge request is routed to the customer's bank. At this point, the bank information is verified.
5. The transaction is approved by the customer's bank and the approval relayed via Paysafe to the Merchant server.
6. The customer is informed of the approval.
7. The customer's bank transfers the moixedney to the merchant's bank account.
8. The transaction is completed in real time, but in most cases the request clears in 3–5 business days, by which time payment will be deposited in the merchant's business bank account. Merchants can look up any Direct Debit transaction they have processed with Paysafe, including charges and credits, using either the Direct debit API or the Paysafe Merchant Back Office.
<a name="apikey" title="Authentication"></a>
# Authentication
In order for you to use the Paysafe REST API, Paysafe must first set you up on their system
and provide you with an API key. Your API key looks something like this:
* Key Username – MerchantXYZ
* Key Password – B-tst1-0-51ed39e4-312d02345d3f123120881dff9bb4020a89e8ac44cdfdcecd702151182fdc952272661d290ab2e5849e31bb03deede7e
Note that this is not the same as your Merchant Back Office username and password.
The case-sensitive API key is sent using HTTP Basic Authentication. To use HTTP Basic Authentication, you must send the API key credentials using the Authorization header with every request. The Authorization header is constructed as follows:
1. The Key Username and Key Password are combined into a string separated by a colon, e.g.,“Key Username:Key Password”.
2. The resulting string literal is then encoded using Base64.
3. The authorization method and a space (i.e., “Basic”) are then put before the encoded string.
For example, using the Key Username and Password examples above, the header is formed as follows:
``Authorization: Basic
TWVyY2hhbnRYWVo6Qi10c3QxLTAtNTFlZDM5ZTQtMzEyZDAyMzQ1ZDNmMTIzMTIwODgxZGZmOWJiNDAyMGE4OWU4YWM0NGNkZmRjZWNkNzAyMTUxMTgyZmRjOTU yMjcyNjYxZDI5MGFiMmU1ODQ5ZTMxYmIwM2RlZWRlN2U=``
For additional details, please refer to [http://en.wikipedia.org/wiki/Basic_access_authentication](http://en.wikipedia.org/wiki/Basic_access_authentication).
**Note:** Your Production API key will be different from your Test API key. Contact your account manager for details. You must keep your API keys safe and ensure that it is used appropriately for your needs.
# URLs
## Test URL
In order to test your integration with Paysafe, use the following Test URL:
`https://api.test.paysafe.com`
For example:
`https://api.test.paysafe.com/directdebit/v1/accounts/{account_id}`
## Production URL
In order to process live requests with Paysafe, use the following Production URL:
`https://api.paysafe.com`
For example:
`https://api.paysafe.com/directdebit/v1/accounts/{account_id}`
<a name="pagination" title="Pagination"></a>
# Pagination
In the case where an API GET request returns multiple results, Paysafe returns the first 10 records by default and uses HATEOAS links to provide page navigation. In addition to the default behavior, it is also possible to control the number of results and starting point by passing in query parameters as follows:
<a name="globalinvalidcharacters" title="Global Invalid Characters"></a>
# Global Invalid Characters
You must not include any of the characters in this [table](https://developer.paysafe.com/en/resources-and-support/global-invalid-characters/) as values in any of your request parameters. If you do, your request will result in an error.
<a name="isostandards" title="ISO Standards"></a>
# ISO Standards
ISO standards add value by providing the common business process data semantics to be used in the API based exchanges. This [section](https://developer.paysafe.com/en/resources-and-support/iso-standards/) presents you codes for four areas - Currency, Province, State, and Country.
# API
The Direct Debit API allows merchants to process echeck transactions using the REST protocol. The protocol uses JSON for all requests and responses.
The following request types are supported:
* [Purchases](#purchaserequest)
* [Standalone Credits](#standalonecreditrequest)
**Note:** The availability of request types is allotted on a merchant-by-merchant basis, since not all merchant banks support all operations. If you have any questions, contact your account manager.
**API Endpoint**
`https://api.paysafe.com/directdebit/v1/accounts/{account_id}`
**Resource Patterns**
|Endpoint URL |Description |Action |
|--- |--- |--- |
|/purchases |Submit a Purchase |POST |
|/purchases/{purchase_id} |Cancel a Purchase |PUT |
|/purchases/{purchase_id} |Look Up a Purchase |GET |
|/standalonecredits |Submit a Standalone Credit |POST |
|/standalonecredits/{standalone_credit_id} |Cancel a Standalone Credit |PUT |
|/standalonecredits/{standalone_credit_id} |Look Up a Standalone Credit |GET |
<a name="gettingstarted"></a>
# Getting Started
Click [here](https://developer.paysafe.com/en/rest-apis/direct-debit/using-the-api/scenarios/) for some common scenarios for making Direct Debit payments.
# Testing Instructions
The Paysafe Test environment can be used to test websites or applications without actually running transactions through the payment processing engine. It is important to make sure that your systems are working correctly before going into a live environment. Click [here](https://developer.paysafe.com/en/rest-apis/direct-debit/test-and-go-live/testing-instructions/) for details of how to use the test environment.
# Complex JSON Objects
<a name="achobject" title="ACH Object"></a>
## ach
When providing ACH bank account information, merchants can provide either a payment token of the customer's bank account, or the bank account details.
|Element |Type |Required |Description |
|--- |--- |--- |--- |
|paymentToken |string <br/>`length<=50` |Yes |If the payment token is provided, no other bank account information is necessary.<br/>**Note:** The payment token is the *paymentToken* value returned in the response to the ACH bank account creation request.|
|payMethod |enum |Yes |This is the payment type. <ul><li>WEB (Personal bank accounts only)</li><li>TEL (Personal bank accounts only)</li><li>PPD (Personal bank accounts only</li><li>CCD (Business bank accounts only)</li></ul><br>**Note:** Standalone Credits support only PPD and CCD.|
|paymentDescriptor |string<br/>`length<=12` | |This is the descriptor that will appear on the customer's bank statement.|
**OR**
|Element |Type |Required |Description |
|--- |--- |--- |--- |
|accountHolderName |string <br/>`length<=22` |Yes |This is the name of the customer or company.|
|accountType |enum |Yes |This is the bank account type.<ul><li>SAVINGS</li><li>CHECKING</li><li>LOAN</li></ul>|
|payMethod |enum |Yes |This is the payment type. <ul><li>WEB (Personal bank accounts only)</li><li>TEL (Personal bank accounts only)</li><li>PPD (Personal bank accounts only</li><li>CCD (Business bank accounts only)</li></ul><br>**Note:** Standalone Credits support only PPD and CCD.|
|accountNumber |string <br/>`length=4-17` |Yes |This is the bank account number.|
|routingNumber |string<br/>`length=9` |Yes |For USD accounts, this is the 9-digit routing number of the customer's bank.|
|paymentDescriptor |string<br/>`length<=12` | |This is the descriptor that will appear on the customer's bank statement.|
|lastDigits |string<br/>`length=2` | |These are the last two digits of the bank account number, returned in the response. |
```apib
{
"ach": {
"accountHolderName": "XYZ Company",
"accountType": "CHECKING",
"accountNumber": "988772192",
"routingNumber": "211589828",
"payMethod": "WEB"
}
}
```
<a name="bacsobject" title="BACS Object"></a>
## bacs
When providing BACS bank account information, merchants can provide either a payment token of the customer's bank account, or the bank account details.
|Element |Type |Required |Description |
|--- |--- |--- |--- |
|paymentToken |string <br/>`length<=50` |Yes |If the payment token is provided, no other bank account information is necessary.<br/>**Note:** The payment token is the *paymentToken* value returned in the response to the BACS bank account creation request.|
**OR**
|Element |Type |Required |Description |
|--- |--- |--- |--- |
|accountHolderName |string <br/>`length<=18` |Yes |This is the name of the customer or company.|
|sortCode |string<br/>`length=6` |Yes |This is the sort code for the customer's bank account.|
|accountNumber |string <br/>`length=8` |Yes |This is the bank account number.|
|mandateReference |string<br/>`length=10` |Yes |This is the *reference* element used in the mandate creation request. It is the identifier of the mandate in the banking system.|
|lastDigits |string<br/>`length=2` | |These are the last two digits of the bank account number, returned in the response. |
```apib
{
"bacs": {
"accountHolderName": "XYZ Company",
"sortCode": "321654",
"accountNumber": "98877219",
"mandateReference": "SUBSCRIP10"
}
}
```
<a name="billingdetailsobject" title="Billing Details Object"></a>
## billingDetails
|Element |Type |Required |Description |
|--- |--- |--- |--- |
|street |string<br/>`length<=50` | |This is the first line of the street address in the billing address.|
|street2 |string<br/>`length<=50` | |This is the second line of the street address in the billing address, if required (e.g., apartment number).|
|city |string<br/>`length<=40` | |This is the city in the billing address.|
|state |string<br/>`length<=40` | |Use the 2-character state or province codes for Canada or the United States.|
|country |enum <br/>`length<=2` | |See [Country Codes](#countrycodes).|
|zip |string<br/>`length<=10` | |This is the postal/zip code in the billing address.|
|phone |string<br/>`length<=40` | |This is the customer's telephone number.|
```apib
{
"billingDetails":{
"street":"100 Queen Street West",
"city":"Toronto",
"state":"ON",
"country":"CA",
"zip":"M5H 2N2"
}
}
```
<a name="dateofbirthobject" title="Date of Birth Object"></a>
## dateOfBirth
|Element |Type |Required |Description |
|--- |--- |--- |--- |
|day |number<br/>`length=2 max=31` |Yes |This is the day of the customer’s birth.|
|month |number<br/>`length=2 max=12` |Yes |This is the month of the customer’s birth.|
|year |string<br/>`length=4 min=1900` |Yes |This is the year of the customer’s birth.|
```apib
{
"dateOfBirth": {
"day": 15,
"month": 9,
"year": 1968
}
}
```
<a name="eftobject" title="EFT Object"></a>
## eft
When providing EFT bank account information, merchants can provide either a payment token of the customer's bank account, or the bank account details.
|Element |Type |Required |Description |
|--- |--- |--- |--- |
|paymentToken |string <br/>`length<=50` |Yes |If the payment token is provided, no other bank account information is necessary.<br/>**Note:** The payment token is the *paymentToken* value returned in the response to the EFT bank account creation request.|
|paymentDescriptor |string<br/>`length<=15` | |This is the descriptor that will appear on the customer's bank statement.|
**OR**
|Element |Type |Required |Description |
|--- |--- |--- |--- |
|accountHolderName |string <br/>`length<=30` |Yes |This is the name of the customer or company.|
|accountNumber |string <br/>`length=4-12` |Yes |This is the bank account number.|
|transitNumber |string<br/>`length=5` |Yes |This is the 5-digit transit number of the customer's bank branch.|
|institutionId |string<br/>`length=3` |Yes |This is the 3-digit institution ID of the customer’s bank branch.|
|paymentDescriptor |string<br/>`length<=15` | |This is the descriptor that will appear on the customer's bank statement.|
|lastDigits |string<br/>`length=2` | |These are the last two digits of the bank account number, returned in the response. |
```apib
{
"eft": {
"accountHolderName": "XYZ Company",
"accountNumber": "336612",
"transitNumber": "22446",
"institutionId": "001"
}
}
```
<a name="errorobject" title="Error Object"></a>
## error
|Element |Type |Description |
|--- |--- |--- |
|code |string |The error code. Also shown in the X-Application-Status-Code response header. |
|message |string |A description of the error. |
|details |string array |Details of any parameter value errors (optional). |
|links |string array |One or more rel/href pairs, where rel is "errorinfo", and href is the Developer Center URL containing a description of the error.|
```apib
{
"error":{
"code":"5016",
"message":"The merchant account submitted with your request could not be found",
"details":[
"Account 89983659 does not exist"
],
"links":[
{
"rel":"errorinfo",
"href":"https://developer.optimalpayments.com/en/documentation/direct-debit-api/error-5016"
}
]
}
}
```
<a name="linksobject" title="Links Object"></a>
## links
|Element |Type |Required |Description|
|--- |--- |--- |---|
|rel |string |Required |This is the link type that allows different endpoints to be targeted depending on the end state of the transaction.|
|href |string |Required |This is the URI of the resource.|
```apib
{
"links": [
{
"rel": "self",
"href": "https://api.paysafe.com/directdebit/v1/accounts/1001058140/purchases/a02e52c7-c991-4418-966a-b62989cb0eae"
}
],
}
```
<a name="profileobject" title="Profile Object"></a>
## profile
|Element |Type |Required |Description |
|--- |--- |--- |--- |
|firstName |string<br/>`length<=80` |Yes |This is the customer’s first name.|
|lastName |string<br/>`length<=80` |Yes |This is the customer’s last name.|
|email |string<br/>`length<=255` | |This is the customer’s email address.|
|ssn |string<br/>`length<=9` | |This is the customer's social security number.|
|dateOfBirth |[dateOfBirth](#dateofbirthobject) | |This is the customer's date of birth.|
```apib
{
"profile": {
"firstName": "Joe",
"lastName": "Smith",
"email": "[email protected]",
"ssn": "123456789",
"dateOfBirth": {
"day": 15,
"month": 9,
"year": 1968
}
}
}
```
<a name="purchaseobject" title="Purchase Object"></a>
## purchase
|Element |Type |Description |
|--- |--- |--- |
|id |string <br/>`length<=36` |This is the ID returned in the response. This ID can be used for future associated requests, e.g., Purchase lookup.|
|merchantRefNum |string <br/>`length<=255` |This is the merchant reference number created by the merchant and submitted as part of the request. It must be unique for each request.|
|amount |number<br>`max=99999999999` |This is the amount of the request, in minor units. For example, to process US $10.99, this value should be 1099. To process 1000 Japanese yen, this value should be 1000. To process 10.139 Tunisian dinar, this value should be 10139.<br/>**Note:** If the merchant account is set up for a currency that has 3 decimal units, our system will half round up the least significant digit. Therefore, a transaction of 10.139 Tunisian dinar would be processed as 10.14.|
|ach |[ach](#achobject) |These are the details of the bank account used.|
|eft |[eft](#eftobject) |These are the details of the bank account used.|
|bacs |[bacs](#bacsobject) |These are the details of the bank account used.|
|sepa |[sepa](#sepaobject) |These are the details of the bank account used.|
|profile |[profile](#profileobject) |These are some details about the customer. |
|billingDetails |[billingDetails](#billingdetailsobject)|These are the billing details for the request.|
|customerIp |string<br/>`length<=39` |This is the customer's IP address.|
|dupCheck |boolean |This validates that this request is not a duplicate. A request is considered a duplicate if the *merchantRefNum* has already been used in a previous request within the last 90 days.<br/>**Note:** This value defaults to *true*.|
|txnTime |UTC formatted date |This is the date and time the request was processed. For example:<br/>2017-01-26T10:32:28Z|
|currencyCode |string<br/>`length=3` |This is the currency of the merchant account, e.g., USD or GBP, returned in the request response. See [Currency Codes](#currencycodes)|
|error |[error](#errorobject) | |
|status |enum |This is the status of the transaction request. Possible values are:<ul><li>RECEIVED – Our system has received the request and is waiting for the downstream processor’s response.</li><li>PENDING – Our system has received the request but it has not yet been batched.</li><li>PROCESSING – The batching has started.</li><li>COMPLETED – The transaction has been completed.</li><li>FAILED – The transaction failed, due to either an error or being declined.</li><li>CANCELLED – The request has been cancelled.</li></ul>|
|splitpay |[splitpay](#splitpayobject) |This enables you to use Split Payouts functionality when processing a purchase.|
<a name="sepaobject" title="SEPA Object"></a>
## sepa
When providing SEPA bank account information, merchants can provide either a payment token of the customer's bank account, or the bank account details.
|Element |Type |Required |Description |
|--- |--- |--- |--- |
|paymentToken |string <br/>`length<=50` |Yes |If the payment token is provided, no other bank account information is necessary.<br/>**Note:** The payment token is the *paymentToken* value returned in the response to the SEPA bank account creation request.|
**OR**
|Element |Type |Required |Description |
|--- |--- |--- |--- |
|accountHolderName |string <br/>`length<=32` |Yes |This is the name of the customer or company.|
|iban |string<br/>`length=1-34` |Yes |This is the International Bank Account Number for the customer's bank account.|
|mandateReference |string<br/>`length=35` |Yes |This is the *reference* element used in the mandate creation request. It is the identifier of the mandate in the banking system. <br/>**Note:** This element is not required for SEPA standalone credits.|
|lastDigits |string<br/>`length=2` | |These are the last two digits of the bank account number, returned in the response. |
|bic |string<br/>`length=8-11` | |This is the Bank Identifier Code for the customer's bank account.|
```apib
{
"sepa": {
"mandateReference": "1000-3232659874-65985698",
"accountHolderName": "XYZ Company",
"iban": "NL77ABNA0492122466"
}
}
```
<a name="shippingdetailsobject" title="Shipping Details Object"></a>
## shippingDetails
|Element |Type |Required |Description |
|--- |--- |--- |--- |
|carrier |enum | |This is the shipment carrier. Possible values are:<ul><li>APC – APC Overnight</li><li>APS – Anpost</li><li>CAD – Canada Postal Service</li><li>DHL – DHL</li><li>FEX – Fedex</li><li>RML – Royal Mail</li><li>UPS – United Parcel Service</li><li>USPS – United States Postal Service</li><li>CLK – CityLink</li><li>EMS – EMS (US Postal Service)</li><li>NEX – Nexworldwide</li><li>OTHER</li></ul>|
|shipMethod |enum | |This is the method of shipment. Possible values are:<ul><li>T – Next Day/Overnight</li><li>T – Two-Day Service</li><li>C – Lowest Cost</li><li>O – Other</li></ul>|
|recipientName |string<br/>`length<=255` | |This is the name of the person receiving the goods.|
|street |string<br/>`length<=50` | |This is the recipient's street address.|
|street2 |string<br/>`length<=50` | |This is the second line of the street address in the shipping address, if required (e.g., apartment number).|
|city |string<br/>`length<=40` | |This is the city in which the recipient resides.|
|state |string | |See [Province Codes](#provincecodes) or [State Codes](#statecodes) for Canada or the United States.|
|country |enum | |See [Country Codes](#countrycodes). |
|zip |string<br/>`length<=40` | |This is the the recipient's postal/zip code.|
```apib
{
"shippingDetails":{
"carrier":"UPS",
"shipMethod":"N",
"street":"100 Broadway",
"city":"Sacramento",
"state":"CA",
"country":"US",
"zip":"94203"
}
}
```
<a name="splitpayobject"></a>
## splitpay
|Element |Type |Required |Description |
|--- |--- |--- |--- |
|linkedaccount |string |Yes |This is the ID of the linked account.
|amount |number | |The amount to transfer to the linked account in minor currency units. Either this or percent must be specified.|
|percent |number | |This is the percentage of the total transaction amount to transfer to the linked account, to two decimal places. The total percentage to all linked accounts cannot exceed 100%. Either this or amount must be specified.|
```apib
{
"splitpay": [
{
"linkedAccount": "123124124",
"percent": 5
},
{
"linkedAccount": "767862873",
"amount": 500
}]
}
```
<a name="standalonecreditobject" title="Standalone Credit Object"></a>
## standalonecredit
|Element |Type |Description |
|--- |--- |--- |
|id |string <br/>`length<=36` |This is the ID returned in the response. This ID can be used for future associated requests, e,g., Standalone Credit lookup.|
|merchantRefNum |string <br/>`length<=255` |This is the merchant reference number created by the merchant and submitted as part of the request. It must be unique for each request.|
|amount |number<br>`max=99999999999` |This is the amount of the request, in minor units.For example, to process US $10.99, this value should be 1099. To process 1000 Japanese yen, this value should be 1000. To process 10.139 Tunisian dinar, this value should be 10139.<br/>**Note:** If the merchant account is set up for a currency that has 3 decimal units, our system will half round up the least significant digit. Therefore, a transaction of 10.139 Tunisian dinar would be processed as 10.14.|
|ach |[ach](#achobject) |These are the details of the bank account used.|
|eft |[eft](#eftobject) |These are the details of the bank account used.|
|bacs |[bacs](#bacsobject) |These are the details of the bank account used.|
|sepa |[sepa](#sepaobject) |These are the details of the bank account used.|
|profile |[profile](#profileobject) |These are some details about the customer.|
|billingDetails |[billingDetails](#billingdetailsobject) |These are the billing details for the request.|
|shippingDetails |[shippingDetails](#shippingdetailsobject) |These are the shipping details for the request.|
|customerIp |string<br/>`length<=39` |This is the customer's IP address.|
|dupCheck |boolean |This validates that this request is not a duplicate. A request is considered a duplicate if the *merchantRefNum* has already been used in a previous request within the last 90 days.<br/>**Note:** This value defaults to *true*.|
|txnTime |UTC formatted date |This is the date and time the request was processed. For example:<br/>2017-01-26T10:32:28Z|
|currencyCode |string<br/>`length=3` |This is the currency of the merchant account, e.g., USD or GBP, returned in the request response. See [Currency Codes](#currencycodes)|
|error |[error](#errorobject) | |
|status |enum |This is the status of the transaction request. Possible values are:<ul><li>RECEIVED – Our system has received the request and is waiting for the downstream processor’s response.</li><li>PENDING – Our system has received the request but it has not yet been batched.</li><li>PROCESSING – The batching has started.</li><li>COMPLETED – The transaction has been completed.</li><li>FAILED – The transaction failed, due to either an error or being declined.</li><li>CANCELLED – The request has been cancelled.</li></ul>|
# Error Summary
<a name="commonerrors" title="Common Errors"></a>
## Common Errors
|HTTP Status Code |Error Code |Description|
|--- |--- |---|
|500 |1000 |An internal error occurred. |
|502 |1001 |An error occurred with the external processing gateway.|
|500 |1002 |An internal error occurred. |
|500 |1003 |An internal error occurred. |
|500 |1007 |An internal error occurred. |
|500 |1008 |An internal error occurred. |
|429 |1200 |The API call has been denied as it has exceeded the permissible call rate limit.|
|401 |5000 |Your merchant account authentication failed. Either your store ID/password are invalid or the IP address from which you are sending the transaction has not been authorized.|
|400 |5001 |The submitted currency code is invalid or your account does not support this currency.|
|400 |5003 |You submitted an invalid amount with your request.|
|400 |5004 |You submitted an invalid account type with your request.|
|400 |5005 |You submitted an invalid operation type with your request.|
|400 |5010 |The submitted country code is invalid.|
|400 |5016 |The merchant account you provided cannot be found.|
|400 |5017 |The merchant account you provided is disabled.|
|402 |5021 |Your transaction request has been declined.|
|400 |5023 |The request is not parseable.|
|409 |5031 |The transaction you have submitted has already been processed.|
|401 |5040 |Your merchant account is not configured for the transaction you attempted.|
|400 |5042 |The merchant reference number is missing or invalid or it exceeds the maximum permissible length.|
|400 |5068 |Either you submitted a request that is missing a mandatory field or the value of a field does not match the format expected.|
|404 |5269 |The ID(s) specified in the URL do not correspond to the values in the system.|
|403 |5270 |The credentials provided with the request do not have permission to access the requested data.|
|406 |5271 |You requested a response in the 'Accept' header that is in an unsupported format.|
|406 |5272 |The 'Content-Type' you specified in request header was submitted in an unsupported format.|
|404 |5273 |Your client reached our application but we were unable to service your request due to an invalid URL.|
|401 |5275 |The authentication credentials provided with the request have expired.|
|401 |5276 |The authentication credentials provided with the request provided have been disabled.|
|401 |5277 |The authentication credentials provided with the request have been locked due to multiple authentication failures.|
|401 |5278 |The authentication credentials provided with the request were not accepted for an unknown reason.|
|401 |5279 |The authentication credentials are invalid.|
|401 |5280 |The required authentication credentials were not provided.|
|405 |5281 |The request uses an action (e.g., GET, POST, or PUT) that is not supported by the resource.|
|400 |5502 |Either the payment token is invalid or the corresponding profile or bank account is not active.|
<a name="directdebiterrors" title="Direct Debit Errors"></a>
## Direct Debit Errors
|HTTP Status Code |Error Code |Description|
|--- |--- |---|
|400 |2004 |The Direct Debit transaction cannot be found. |
|400 |2011 |You have submitted a mandate reference that does not exist.|
|400 |2012 |You have submitted a mandate reference that is not active yet.|
|400 |2013 |The mandate reference does not have a valid status.|
|400 |2014 |The mandate reference is already in use for the specified bank account information.|
|400 |2017 |The payment token bank scheme does not match the merchant account bank scheme.|
|400 |2019 |The specified bank and account information is currently under INVALID state.|
|402 |4002 |The transaction was declined by our Risk Management department.|
<a name="directdebitreturncodes" title="Direct Debit Return Codes"></a>
## Direct Debit Return Codes
Occasionally, a Direct Debit API request will be successful, but can fail at the banking network level, e.g., due to insufficient funds or bank account closure. In such cases, the bank scheme provides a Return Code as an explanation. Because Direct Debit requests can take up to 7 days to clear, you cannot be notified of errors such as these via the API response.
However, you can use the [Paysafe Merchant Back Office](https://developer.paysafe.com/en/rest-apis/reference-information/managing-payments/paysafe-merchant-back-office/) to run reports to view Return Codes in the case where a Direct Debit request has failed.
| Code | Description | Bank Scheme |
|--------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------|-------------|
| RT not found | | ACH |
| CONFIG | Client configuration problem | ACH |
| LIMIT | The maximum amount per check was exceeded. | ACH |
| INVACCT | Invalid account type. | ACH |
| INVDIR | Invalid direction. | ACH |
| NOPOP | Merchant not configured or not allowed to run POP transactions - Electronic Check Conversion. | ACH |
| PAPER | Paper draft and can't send paper. | ACH |
| PARSE | Parsing problem | ACH |
| THOMSON | Reject due to Thomson database. | ACH |
| UNKMER | Unknown merchant. | ACH |
| DEMO | Demonstration transaction/ or merchant. | ACH |
| R90 | Invalid MOD digit | ACH |
| R91 | Invalid ABA. Not nine (9) characters or numeric | ACH |
| R92 | ABA not active | ACH |
| R93 | Invalid Tran Code SEC combo | ACH |
| R94 | Invalid amount for pre-note Tran Code | ACH |
| R95 | Amount is zero (0) | ACH |
| R96 | Not a valid Tran code | ACH |
| R97 | Not a valid SEC code | ACH |
| R98 | Account decryption error | ACH |
| R99 | OFAC possible match | ACH |
| R37 | Source Document Presented for Payment | ACH |
| R38 | Stop Payment on Source Document | ACH |
| R39 | Improper Source Document | ACH |
| R53 | Item and ACH Entry Presented for Payment | ACH |
| R75 | Original Return not a Duplicate | ACH |
| R76 | No Errors Found | ACH |
| R83 | Foreign Receiving DFI Unable to Settle | ACH |
| R84 | Entry Not Processed by OGO | ACH |
| R01 | Insufficient funds | ACH |
| R02 | Account closed | ACH |
| R03 | No account/unable to locate | ACH |
| R04 | Invalid account number | ACH |
| R05 | Reserved | ACH |
| R06 | Return requested by ODFI | ACH |
| R07 | Authorization revoked Note 2 | ACH |
| R08 | Stop payment | ACH |
| R09 | Uncollected funds | ACH |
| R10 | Not authorizedNote 2 | ACH |
| R11 | Check truncation entry return | ACH |
| R12 | Branch sold to another DFI | ACH |
| R13 | RDFI not qualified to participate/or invalid route | ACH |
| R14 | Payee deceased | ACH |
| R15 | Beneficiary deceased | ACH |
| R16 | Account frozen | ACH |
| R17 | File record edit criteria | ACH |
| R18 | Improper effective entry date | ACH |
| R19 | Amount field error | ACH |
| R20 | Non transaction account | ACH |
| R21 | Invalid company ident. | ACH |
| R22 | Invalid individual ID number | ACH |
| R23 | Credit entry refused by receiver | ACH |
| R24 | Duplicate entry | ACH |
| R25 | Addenda error | ACH |
| R26 | Mandatory field error | ACH |
| R27 | Trace number error | ACH |
| R28 | Routing # check digit error | ACH |
| R29 | Corp cust. adviser not auth. | ACH |
| R30 | RDFI non-part truncation prob | ACH |
| R31 | Permissible return entry | ACH |
| R32 | RDFI non-settlement | ACH |
| R33 | Return of XCK entry | ACH |
| R34 | Limited participation DFI | ACH |
| R35 | Return of improper debit entry | ACH |
| R36 | Return of improper credit entry | ACH |
| R40 | Return of ENR entry by Fed. Gov. | ACH |
| R41 | Invalid transaction code | ACH |
| R42 | Routing #/check digit error | ACH |
| R43 | Inv. DFI acct. number | ACH |
| R44 | Inv. Individual ED number | ACH |
| R45 | Inv. individual name/company name | ACH |
| R46 | Inv. rep. payee indicator | ACH |
| R47 | Duplicate enrollment | ACH |
| R50 | State Law affecting RCK acceptance | ACH |
| R51 | Item is ineligible (RCK) | ACH |
| R52 | Stop payment on item (RCK) | ACH |
| R61 | Dishonor | ACH |
| R62 | Dishonor | ACH |
| R63 | Dishonor | ACH |
| R64 | Dishonor | ACH |
| R65 | Dishonor | ACH |
| R66 | Dishonor | ACH |
| R67 | Dishonor | ACH |
| R68 | Dishonor | ACH |
| R69 | Dishonor | ACH |
| R70 | Dishonor | ACH |
| R71 | ContestedNote 4 | ACH |
| R72 | ContestedNote 4 | ACH |
| R73 | ContestedNote 4 | ACH |
| R74 | ContestedNote 4 | ACH |
| R80 | Cross- border payment coding error | ACH |
| R81 | Non-participant in cross-border pgm. | ACH |
| R82 | Invalid foreign RDFI ID | ACH |
| YE | Transaction code unauthorised for originating Account | BACS |
| 0 | Refer to Payer | BACS |
| 1 | Instruction cancelled by payer | BACS |
| 2 | Payer Deceased | BACS |
| 3 | Account Transferred | BACS |
| 4 | Advance Notice Disputed | BACS |
| 5 | No Account | BACS |
| 6 | No Instruction | BACS |
| 7 | Amount Differs | BACS |
| 8 | Amount not yet due | BACS |
| 9 | Presentation Overdue | BACS |
| A | Service User Differs | BACS |
| B | Account Closed | BACS |
| E | Instruction amended | BACS |
| AE | Originating sort code and/or Account number invalid (bank originated) | BACS |
| BE | Originating sort code and/or Account number invalid (customer originated) | BACS |
| CE | Destination sort code and originating sort code and/or Account number invalid (bank originated) | BACS |
| DE | Destination sort code and originating sort code and/or Account number invalid (customer originated) | BACS |
| EE | Destination sort code invalid | BACS |
| FE | Account type and originating sort code and/or Account number invalid (bank originated) | BACS |
| GE | Account type and originating sort code and/or Account number invalid (customer originated) | BACS |
| HE | Destination sort code and Account type and originating sort code and/or Account number invalid (bank originated) | BACS |
| IE | Destination sort code and Account type and originating sort code and/or Account number invalid (customer originated) | BACS |
| JE | Destination sort code and Account type invalid | BACS |
| KE | Account type invalid | BACS |
| LE | Destination Account number and destination Account name and other fields invalid | BACS |
| ME | Destination Account number and destination Account name invalid | BACS |
| NE | Contra record was amended | BACS |
| OE | Reference number was invalid | BACS |
| PE | Originating Account does not support the file currency | BACS |
| QE | Automated reversal due to an error | BACS |
| RE | Reversal of another item (same day) | BACS |
| SE | Automated recall | BACS |
| TE | Originating Account invalid and was substituted with the default main Account details, but this Account does not support the file currency (customer originated) | BACS |
| UE | Unpaid direct debit reference was in error (bank originated) | BACS |
| XE | Originator's service user number invalid (bank originated) | BACS |
| ZE | Unpaid direct debit reference and other fields were in error (bank originated) | BACS |
| 1I | Amount and / or date of Direct Debit differ from Advance Notice | BACS |
| 2I | No Advance Notice received by Payer/or the amount quoted is disputed | BACS |
| 3I | DDI cancelled by paying bank | BACS |
| 4I | Payer has cancelled DDI direct with service user | BACS |
| 5I | AUDDIS service users only - No Instruction held. Payer disputes having given authority | BACS |
| 6I | AUDDIS service users only - Signature on DDI is fraudulent or not in accordance with account authorised signature(s) | BACS |
| 7I | Claim raised at service users request after Direct Debit applied to payers account | BACS |
| 8I | Service user name disputed. Payer does not recognise service user collecting Direct Debit | BACS |
| CC | Requested by originator | BACS |
| 0C | Invalid details | BACS |
| 2C | Beneficiary deceased | BACS |
| 3C | Account transferred | BACS |
| 5C | No account | BACS |
| BC | Account closed | BACS |
| C | Account transferred to a different branch of bank / building society | BACS |
| D | Advance notice disputed | BACS |
| F | Invalid account type | BACS |
| G | Bank will not accept Direct Debits on account | BACS |
| H | Instruction has expired | BACS |
| I | Payer reference is not unique | BACS |
| K | Instruction cancelled by paying bank | BACS |
| L | Incorrect payer's account details | BACS |
| M | Transaction code / user status incompatible | BACS |
| N | Transaction disallowed at payer's branch | BACS |
| O | Invalid reference | BACS |
| P | Payer's Name not present | BACS |
| Q | Service user's name blank | BACS |
| R | Instruction re-instated (maximum 2 months from original DDI cancellation date) | BACS |
| 900 | Validation Rejection | EFT |
| 901 | Not sufficient funds (debits only) | EFT |
| 902 | Cannot trace | EFT |
| 903 | Payment stopped/recalled | EFT |
| 904 | Post dated/stale dated | EFT |
| 905 | Account closed | EFT |
| 906 | Account transferred | EFT |
| 907 | No chequing privileges | EFT |
| 908 | Funds not cleared | EFT |
| 909 | Currency/Account Mismatch | EFT |
| 910 | Payor/payee deceased | EFT |
| 911 | Account frozen | EFT |
| 912 | Invalid/incorrect account number | EFT |
| 914 | Incorrect payor/payee name | EFT |
| 915 | Refused by payor/payee | EFT |
| 916 | Not in accordance with Agreement - Personal | EFT |
| 917 | Agreement Revoked - Personal | EFT |
| 918 | No Pre-Notification - Personal | EFT |
| 919 | Not in accordance with Agreement - Business | EFT |
| 920 | Agreement Revoked - Business | EFT |
| 921 | No Pre-Notification - Business | EFT |
| 922 | Customer Initiated Return Credit Only | EFT |
| 990 | Institution in Default | EFT |
| 998 | No Return Agreement | EFT |
| 4 | TRANSACTION TYPE is invalid or blank. See Appendix 3 for a list of CPA Transaction Types. | EFT |
| 5 | AMOUNT is blank, or not greater than zero. | EFT |
| 6 | DUE DATE is invalid or blank. | EFT |
| 7 | INSTITUTION (route and/or transit) is not in the correct format, does not exist or is blank. | EFT |
| 8 | ACCOUNT NUMBER is not a valid format for the specified INSTITUTION. | EFT |
| 9 | ITEM TRACE NO. is invalid. | EFT |
| 10 | STORED TRANSACTION TYPE is invalid or blank. | EFT |
| 11 | ORIGINATOR SHORT NAME is blank. | EFT |
| 12 | PAYOR/PAYEE NAME is blank. | EFT |
| 13 | ORIGINATOR LONG NAME is blank. | EFT |
| 14 | Originating Direct Clearer ID is invalid or blank. | EFT |
| 15 | CROSS REFERENCE is blank. | EFT |
| 16 | INSTITUTION FOR RETURNS (route and/or transit) is invalid or blank. It should specify your credit union. | EFT |
| 19 | Original item trace number is invalid or blank. | EFT |
| 21 | DATA ELEMENT ID is invalid or blank. | EFT |
| E | Accepted but errors were noted | EFT |
| M | Rejected, message authentication code (MAC) failed | EFT |
| P | Partially accepted, at least one transaction set was rejected | EFT |
| R | Rejected | EFT |
| W | Rejected, assurance failed validity tests | EFT |
| X | Rejected, content after decryption could not be analyzed | EFT |
| TR | Rejected by 824 | EFT |
| AC01 | Account identifier incorrect | SEPA |
| UPAY | Undue payment | SEPA |
| AC06 | Account blocked | SEPA |
| AC13 | Invalid debtor account type | SEPA |
| AG01 | Direct debit forbidden | SEPA |
| AG02 | Invalid bank operation code | SEPA |
| AGNT | Incorrect agent | SEPA |
| AM04 | Insufficient funds | SEPA |
| AM05 | Duplication | SEPA |
| BE04 | Missing creditor address | SEPA |
| BE05 | Unrecognized creditor | SEPA |
| CURR | Incorrect currency | SEPA |
| CUST | Recall by customer | SEPA |
| CUTA | Recall due to investigation request | SEPA |
| DT01 | Invalid date | SEPA |
| DUPL | Duplicate payment | SEPA |
| ED05 | Settlement failed | SEPA |
| FF01 | Invalid file format | SEPA |
| FF05 | Direct debit type incorrect | SEPA |
| FRAD | Fraud | SEPA |
| MD01 | No valid mandate | SEPA |
| MD02 | Mandate data missing or incorrect | SEPA |
| MD06 | Disputed authorized transaction | SEPA |
| MD07 | Debtor deceased | SEPA |
| MS02 | Refusal by debtor | SEPA |
| MS03 | Reason not specified | SEPA |
| PY01 | Not routable | SEPA |
| RC01 | Bank identifier incorrect | SEPA |
| RR01 | Missing debtor account or identification | SEPA |
| RR02 | Missing debtor name or address | SEPA |
| RR03 | Missing creditor name or address | SEPA |
| RR04 | Regulatory reason | SEPA |
| SL01 | Specific service offered by debtor agent | SEPA |
| TECH | Payment in error due to technical problem | SEPA |
| TM01 | Invalid cut off time | SEPA |
| AC04 | Account closed | SEPA |
# Using the Example API Calls (Console Window)
To configure and test the API examples, first click on one of the API calls in the API Reference section and then click **Switch to Console** in the right hand pane.
Using the Console window you can update the headers, the request body, and parts of the API endpoint.
For example, for many requests you must update the endpoint to include your account ID, which you do by selecting **URI Parameters** and then updating the **ACCOUNT_ID** value.
(To get your account ID, log into the Paysafe Back Office, choose **Accounts** and look in the *Account* column). You must choose an account which has been enabled for the direct debit method
you wish to use. You must also update the Header to include your API Key by selecting **Headers** and then updating the **Authorization** value using the Base64
version of your API key. To get your API key, log into the test version of the Merchant Back Office and choose **Settings > API Key**.
Click *View Base 64 Encoded* and copy the key to your clipboard. Paste the key after the word Basic to replace the text YOUR-BASE64-ENCODED-API-KEY.
When you are ready to test your example, you can choose between the Production and Mock server environment:
* Production server – This calls the resource on Paysafe's Test system.
* Mock server – This environment simply returns the dummy values in the example response irrespective of the parameters you supply. You do not need to use your account ID or Test API key for this request.
To call the API resource, click **Call Resource**. The response is displayed in the Console window.
# Legal and Community
<ul>
<li><a href="https://www.paysafe.com/paysafegroup/privacy-policy/" target="_blank">Privacy Policy</a></li>
<li><a href="https://developer.paysafe.com/en/resources-and-support/terms-of-use/" target="_blank">Terms of Use</a></li>
<li><a href="https://www.paysafe.com/paysafegroup/regulatory-disclosures/" target="_blank">Regulatory Disclosures</a></li>
</ul>
## Verify That the Service Is Accessible [GET /monitor]
<a name="verifyservice" title="Verify Service"></a>
This call returns a status of READY if the API is available.
+ Response 200 (application/json)
+ Body
{
"status" : "READY"
}
# Purchases [/purchases]
<a name="purchaserequest" title="Purchase Request"></a>
## ACH Purchase [POST /v1/accounts/{account_id}/purchases]
<a name="achpurchaserequest" title="ACH Purchase Request"></a>
This shows you four examples of an ACH Purchase request:
* A regular Purchase request
* A Purchase request including [Split Payouts](https://developer.paysafe.com/en/rest-apis/platforms/split-payouts/split-payouts-overview/)
* A Purchase request using a payment token
* A Purchase request using a single-use token that also creates a permanent, reusable payment token representing the ACH account
In the case of a Purchase request using a payment token, you can use either of two payment token types:
* The permanent, reusable payment token that you receive in the response to a Customer Vault [ACH bank account creation request](https://developer.paysafe.com/en/vault/api/#/reference/0/ach-bank-accounts/create-an-ach-bank-account)
* The temporary payment token that you receive in the response to a Customer Vault [ACH single-use token creation request](https://developer.paysafe.com/en/vault/api/#/reference/direct-debit-single-use-tokens/direct-debit-single-use-tokens/create-an-ach-single-use-token)
+ Parameters
+ account_id:123456789 (string, required) - This is the merchant account number.
+ Attributes
+ Include Purchase Base
+ Include ACH
+ Include profile
+ Include billingDetails
+ Include Splitpay Request
+ Include links
+ Request Submit an ACH Purchase Request (application/json)
+ Headers
Authorization: Basic YOUR-BASE64-ENCODED-API-KEY
+ Body
{
"merchantRefNum": "04.04.17_2",
"amount": 10155,
"customerIp": "192.0.126.111",
"ach": {
"accountHolderName": "First Company",
"accountType": "SAVINGS",
"payMethod": "WEB",
"accountNumber": "998772192",
"routingNumber": "211589828",
"paymentDescriptor": "Transaction"
},
"profile": {
"firstName": "John",
"lastName": "Johnson",
"email": "[email protected]",
"ssn": "123456789",
"dateOfBirth": {
"day": 24,
"month": 10,
"year": 1981
}
},
"billingDetails": {
"street": "100 Queen Street West",
"street2": "Apt. 55",
"city": "Ottawa",
"state": "ON",
"country": "CA",
"zip": "M1M 1M1",
"phone": "6139991100"
}
}
+ Response 200 (application/json)
+ Body
{
"merchantRefNum": "04.04.17_2",
"amount": 10155,
"ach": {
"lastDigits": "92",
"accountHolderName": "First Company",
"accountType": "SAVINGS",
"payMethod": "WEB",
"paymentDescriptor": "Transaction",
"routingNumber": "211589828",
"accountNumber": "*******92"
},
"profile": {
"firstName": "John",
"lastName": "Johnson",
"email": "[email protected]",
"ssn": "*******89",
"dateOfBirth": {
"year": 1981,
"month": 10,
"day": 24
}
},
"billingDetails": {
"street": "100 Queen Street West",
"street2": "Apt. 55",
"city": "Ottawa",
"state": "ON",
"country": "CA",
"zip": "M1M 1M1",
"phone": "6139991100"
},
"customerIp": "192.0.126.111",
"dupCheck": true,
"id": "7afd1d4a-39b8-4756-ba58-d886ad4aa35c",
"txnTime": "2017-04-04T13:35:17Z",
"currencyCode": "USD",
"status": "COMPLETED",
"links": [{
"rel": "self",
"href": "https://api.test.paysafe.com/directdebit/v1/accounts/1001058140/purchases/7afd1d4a-39b8-4756-ba58-d886ad4aa35c"
}]
}
+ Request Submit an ACH Purchase Request with Split Payouts (application/json)
+ Headers
Authorization: Basic YOUR-BASE64-ENCODED-API-KEY
+ Body
{
"merchantRefNum": "04.04.17_2",
"amount": 10000,
"customerIp": "192.0.126.111",
"ach": {
"accountHolderName": "First Company",
"accountType": "SAVINGS",
"payMethod": "WEB",
"accountNumber": "998772192",
"routingNumber": "211589828",
"paymentDescriptor": "Transaction"
},
"profile": {
"firstName": "John",
"lastName": "Johnson",
"email": "[email protected]",
"ssn": "123456789",
"dateOfBirth": {
"day": 24,
"month": 10,
"year": 1981
}
},
"billingDetails": {
"street": "100 Queen Street West",
"street2": "Apt. 55",
"city": "Ottawa",
"state": "ON",
"country": "CA",
"zip": "M1M 1M1",
"phone": "6139991100"
},
"splitpay": {
"linkedAccount": "123124124",
"percent": 5
}
}
+ Response 200 (application/json)
+ Body
{
"merchantRefNum": "04.04.17_2",
"amount": 10155,
"ach": {
"lastDigits": "92",
"accountHolderName": "First Company",
"accountType": "SAVINGS",
"payMethod": "WEB",
"paymentDescriptor": "Transaction",
"routingNumber": "211589828",
"accountNumber": "*******92"