UNPKG

26.9 kBTypeScriptView Raw
1import {Address, AddressParam, Metadata, MetadataParam} from './shared';
2
3/**
4 * The Source object.
5 */
6export interface Source {
7 /**
8 * Unique identifier for the object.
9 */
10 id: string;
11
12 /**
13 * String representing the object's type. Objects of the same type share the same value.
14 */
15 object: 'source';
16
17 ach_credit_transfer?: Source.AchCreditTransfer;
18
19 ach_debit?: Source.AchDebit;
20
21 acss_debit?: Source.AcssDebit;
22
23 alipay?: Source.Alipay;
24
25 /**
26 * A positive integer in the smallest currency unit (that is, 100 cents for $1.00, or 1 for ¥1, Japanese Yen being a zero-decimal currency) representing the total amount associated with the source. This is the amount for which the source will be chargeable once ready. Required for `single_use` sources.
27 */
28 amount: number | null;
29
30 au_becs_debit?: Source.AuBecsDebit;
31
32 bancontact?: Source.Bancontact;
33
34 card?: Source.Card;
35
36 card_present?: Source.CardPresent;
37
38 /**
39 * The client secret of the source. Used for client-side retrieval using a publishable key.
40 */
41 client_secret: string;
42
43 code_verification?: Source.CodeVerification;
44
45 /**
46 * Time at which the object was created. Measured in seconds since the Unix epoch.
47 */
48 created: number;
49
50 /**
51 * Three-letter [ISO code for the currency](https://stripe.com/docs/currencies) associated with the source. This is the currency for which the source will be chargeable once ready. Required for `single_use` sources.
52 */
53 currency: string | null;
54
55 /**
56 * The ID of the customer to which this source is attached. This will not be present when the source has not been attached to a customer.
57 */
58 customer?: string;
59
60 eps?: Source.Eps;
61
62 /**
63 * The authentication `flow` of the source. `flow` is one of `redirect`, `receiver`, `code_verification`, `none`.
64 */
65 flow: string;
66
67 giropay?: Source.Giropay;
68
69 ideal?: Source.Ideal;
70
71 klarna?: Source.Klarna;
72
73 /**
74 * Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.
75 */
76 livemode: boolean;
77
78 /**
79 * Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object in a structured format.
80 */
81 metadata: Metadata | null;
82
83 multibanco?: Source.Multibanco;
84
85 /**
86 * Information about the owner of the payment instrument that may be used or required by particular source types.
87 */
88 owner: Source.Owner | null;
89
90 p24?: Source.P24;
91
92 receiver?: Source.Receiver;
93
94 redirect?: Source.Redirect;
95
96 sepa_credit_transfer?: Source.SepaCreditTransfer;
97
98 sepa_debit?: Source.SepaDebit;
99
100 sofort?: Source.Sofort;
101
102 source_order?: Source.SourceOrder;
103
104 /**
105 * Extra information about a source. This will appear on your customer's statement every time you charge the source.
106 */
107 statement_descriptor: string | null;
108
109 /**
110 * The status of the source, one of `canceled`, `chargeable`, `consumed`, `failed`, or `pending`. Only `chargeable` sources can be used to create a charge.
111 */
112 status: string;
113
114 three_d_secure?: Source.ThreeDSecure;
115
116 /**
117 * The `type` of the source. The `type` is a payment method, one of `ach_credit_transfer`, `ach_debit`, `alipay`, `bancontact`, `card`, `card_present`, `eps`, `giropay`, `ideal`, `multibanco`, `klarna`, `p24`, `sepa_debit`, `sofort`, `three_d_secure`, or `wechat`. An additional hash is included on the source with a name matching this value. It contains additional information specific to the [payment method](https://stripe.com/docs/sources) used.
118 */
119 type: Source.Type;
120
121 /**
122 * Either `reusable` or `single_use`. Whether this source should be reusable or not. Some source types may or may not be reusable by construction, while others may leave the option at creation. If an incompatible value is passed, an error will be returned.
123 */
124 usage: string | null;
125
126 wechat?: Source.Wechat;
127}
128
129export namespace Source {
130 export interface AchCreditTransfer {
131 account_number?: string | null;
132
133 bank_name?: string | null;
134
135 fingerprint?: string | null;
136
137 refund_account_holder_name?: string | null;
138
139 refund_account_holder_type?: string | null;
140
141 refund_routing_number?: string | null;
142
143 routing_number?: string | null;
144
145 swift_code?: string | null;
146 }
147
148 export interface AchDebit {
149 bank_name?: string | null;
150
151 country?: string | null;
152
153 fingerprint?: string | null;
154
155 last4?: string | null;
156
157 routing_number?: string | null;
158
159 type?: string | null;
160 }
161
162 export interface AcssDebit {
163 bank_address_city?: string | null;
164
165 bank_address_line_1?: string | null;
166
167 bank_address_line_2?: string | null;
168
169 bank_address_postal_code?: string | null;
170
171 bank_name?: string | null;
172
173 category?: string | null;
174
175 country?: string | null;
176
177 fingerprint?: string | null;
178
179 last4?: string | null;
180
181 routing_number?: string | null;
182 }
183
184 export interface Alipay {
185 data_string?: string | null;
186
187 native_url?: string | null;
188
189 statement_descriptor?: string | null;
190 }
191
192 export interface AuBecsDebit {
193 bsb_number?: string | null;
194
195 fingerprint?: string | null;
196
197 last4?: string | null;
198 }
199
200 export interface Bancontact {
201 bank_code?: string | null;
202
203 bank_name?: string | null;
204
205 bic?: string | null;
206
207 iban_last4?: string | null;
208
209 preferred_language?: string | null;
210
211 statement_descriptor?: string | null;
212 }
213
214 export interface Card {
215 address_line1_check?: string | null;
216
217 address_zip_check?: string | null;
218
219 brand?: string | null;
220
221 country?: string | null;
222
223 cvc_check?: string | null;
224
225 description?: string;
226
227 dynamic_last4?: string | null;
228
229 exp_month?: number | null;
230
231 exp_year?: number | null;
232
233 fingerprint?: string;
234
235 funding?: string | null;
236
237 iin?: string;
238
239 issuer?: string;
240
241 last4?: string | null;
242
243 name?: string | null;
244
245 three_d_secure?: string;
246
247 tokenization_method?: string | null;
248 }
249
250 export interface CardPresent {
251 application_cryptogram?: string;
252
253 application_preferred_name?: string;
254
255 authorization_code?: string | null;
256
257 authorization_response_code?: string;
258
259 brand?: string | null;
260
261 country?: string | null;
262
263 cvm_type?: string;
264
265 data_type?: string | null;
266
267 dedicated_file_name?: string;
268
269 description?: string;
270
271 emv_auth_data?: string;
272
273 evidence_customer_signature?: string | null;
274
275 evidence_transaction_certificate?: string | null;
276
277 exp_month?: number | null;
278
279 exp_year?: number | null;
280
281 fingerprint?: string;
282
283 funding?: string | null;
284
285 iin?: string;
286
287 issuer?: string;
288
289 last4?: string | null;
290
291 pos_device_id?: string | null;
292
293 pos_entry_mode?: string;
294
295 read_method?: string | null;
296
297 reader?: string | null;
298
299 terminal_verification_results?: string;
300
301 transaction_status_information?: string;
302 }
303
304 export interface CodeVerification {
305 /**
306 * The number of attempts remaining to authenticate the source object with a verification code.
307 */
308 attempts_remaining: number;
309
310 /**
311 * The status of the code verification, either `pending` (awaiting verification, `attempts_remaining` should be greater than 0), `succeeded` (successful verification) or `failed` (failed verification, cannot be verified anymore as `attempts_remaining` should be 0).
312 */
313 status: string;
314 }
315
316 export interface Eps {
317 reference?: string | null;
318
319 statement_descriptor?: string | null;
320 }
321
322 export interface Giropay {
323 bank_code?: string | null;
324
325 bank_name?: string | null;
326
327 bic?: string | null;
328
329 statement_descriptor?: string | null;
330 }
331
332 export interface Ideal {
333 bank?: string | null;
334
335 bic?: string | null;
336
337 iban_last4?: string | null;
338
339 statement_descriptor?: string | null;
340 }
341
342 export interface Klarna {
343 background_image_url?: string;
344
345 client_token?: string | null;
346
347 first_name?: string;
348
349 last_name?: string;
350
351 locale?: string;
352
353 logo_url?: string;
354
355 page_title?: string;
356
357 pay_later_asset_urls_descriptive?: string;
358
359 pay_later_asset_urls_standard?: string;
360
361 pay_later_name?: string;
362
363 pay_later_redirect_url?: string;
364
365 pay_now_asset_urls_descriptive?: string;
366
367 pay_now_asset_urls_standard?: string;
368
369 pay_now_name?: string;
370
371 pay_now_redirect_url?: string;
372
373 pay_over_time_asset_urls_descriptive?: string;
374
375 pay_over_time_asset_urls_standard?: string;
376
377 pay_over_time_name?: string;
378
379 pay_over_time_redirect_url?: string;
380
381 payment_method_categories?: string;
382
383 purchase_country?: string;
384
385 purchase_type?: string;
386
387 redirect_url?: string;
388
389 shipping_first_name?: string;
390
391 shipping_last_name?: string;
392 }
393
394 export interface Multibanco {
395 entity?: string | null;
396
397 reference?: string | null;
398
399 refund_account_holder_address_city?: string | null;
400
401 refund_account_holder_address_country?: string | null;
402
403 refund_account_holder_address_line1?: string | null;
404
405 refund_account_holder_address_line2?: string | null;
406
407 refund_account_holder_address_postal_code?: string | null;
408
409 refund_account_holder_address_state?: string | null;
410
411 refund_account_holder_name?: string | null;
412
413 refund_iban?: string | null;
414 }
415
416 export interface Owner {
417 /**
418 * Owner's address.
419 */
420 address: Address | null;
421
422 /**
423 * Owner's email address.
424 */
425 email: string | null;
426
427 /**
428 * Owner's full name.
429 */
430 name: string | null;
431
432 /**
433 * Owner's phone number (including extension).
434 */
435 phone: string | null;
436
437 /**
438 * Verified owner's address. Verified values are verified or provided by the payment method directly (and if supported) at the time of authorization or settlement. They cannot be set or mutated.
439 */
440 verified_address: Address | null;
441
442 /**
443 * Verified owner's email address. Verified values are verified or provided by the payment method directly (and if supported) at the time of authorization or settlement. They cannot be set or mutated.
444 */
445 verified_email: string | null;
446
447 /**
448 * Verified owner's full name. Verified values are verified or provided by the payment method directly (and if supported) at the time of authorization or settlement. They cannot be set or mutated.
449 */
450 verified_name: string | null;
451
452 /**
453 * Verified owner's phone number (including extension). Verified values are verified or provided by the payment method directly (and if supported) at the time of authorization or settlement. They cannot be set or mutated.
454 */
455 verified_phone: string | null;
456 }
457
458 export interface P24 {
459 reference?: string | null;
460 }
461
462 export interface Receiver {
463 /**
464 * The address of the receiver source. This is the value that should be communicated to the customer to send their funds to.
465 */
466 address: string | null;
467
468 /**
469 * The total amount that was charged by you. The amount charged is expressed in the source's currency.
470 */
471 amount_charged: number;
472
473 /**
474 * The total amount received by the receiver source. `amount_received = amount_returned + amount_charged` is true at all time. The amount received is expressed in the source's currency.
475 */
476 amount_received: number;
477
478 /**
479 * The total amount that was returned to the customer. The amount returned is expressed in the source's currency.
480 */
481 amount_returned: number;
482
483 /**
484 * Type of refund attribute method, one of `email`, `manual`, or `none`.
485 */
486 refund_attributes_method: string;
487
488 /**
489 * Type of refund attribute status, one of `missing`, `requested`, or `available`.
490 */
491 refund_attributes_status: string;
492 }
493
494 export interface Redirect {
495 /**
496 * The failure reason for the redirect, either `user_abort` (the customer aborted or dropped out of the redirect flow), `declined` (the authentication failed or the transaction was declined), or `processing_error` (the redirect failed due to a technical error). Present only if the redirect status is `failed`.
497 */
498 failure_reason: string | null;
499
500 /**
501 * The URL you provide to redirect the customer to after they authenticated their payment.
502 */
503 return_url: string;
504
505 /**
506 * The status of the redirect, either `pending` (ready to be used by your customer to authenticate the transaction), `succeeded` (succesful authentication, cannot be reused) or `not_required` (redirect should not be used) or `failed` (failed authentication, cannot be reused).
507 */
508 status: string;
509
510 /**
511 * The URL provided to you to redirect a customer to as part of a `redirect` authentication flow.
512 */
513 url: string;
514 }
515
516 export interface SepaCreditTransfer {
517 bank_name?: string | null;
518
519 bic?: string | null;
520
521 iban?: string | null;
522
523 refund_account_holder_address_city?: string | null;
524
525 refund_account_holder_address_country?: string | null;
526
527 refund_account_holder_address_line1?: string | null;
528
529 refund_account_holder_address_line2?: string | null;
530
531 refund_account_holder_address_postal_code?: string | null;
532
533 refund_account_holder_address_state?: string | null;
534
535 refund_account_holder_name?: string | null;
536
537 refund_iban?: string | null;
538 }
539
540 export interface SepaDebit {
541 bank_code?: string | null;
542
543 branch_code?: string | null;
544
545 country?: string | null;
546
547 fingerprint?: string | null;
548
549 last4?: string | null;
550
551 mandate_reference?: string | null;
552
553 mandate_url?: string | null;
554 }
555
556 export interface Sofort {
557 bank_code?: string | null;
558
559 bank_name?: string | null;
560
561 bic?: string | null;
562
563 country?: string | null;
564
565 iban_last4?: string | null;
566
567 preferred_language?: string | null;
568
569 statement_descriptor?: string | null;
570 }
571
572 export interface SourceOrder {
573 /**
574 * A positive integer in the smallest currency unit (that is, 100 cents for $1.00, or 1 for ¥1, Japanese Yen being a zero-decimal currency) representing the total amount for the order.
575 */
576 amount: number;
577
578 /**
579 * Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies).
580 */
581 currency: string;
582
583 /**
584 * The email address of the customer placing the order.
585 */
586 email?: string;
587
588 /**
589 * List of items constituting the order.
590 */
591 items: Array<SourceOrder.Item> | null;
592
593 shipping?: SourceOrder.Shipping;
594 }
595
596 export namespace SourceOrder {
597 export interface Item {
598 /**
599 * The amount (price) for this order item.
600 */
601 amount: number | null;
602
603 /**
604 * This currency of this order item. Required when `amount` is present.
605 */
606 currency: string | null;
607
608 /**
609 * Human-readable description for this order item.
610 */
611 description: string | null;
612
613 /**
614 * The quantity of this order item. When type is `sku`, this is the number of instances of the SKU to be ordered.
615 */
616 quantity?: number;
617
618 /**
619 * The type of this order item. Must be `sku`, `tax`, or `shipping`.
620 */
621 type: string | null;
622 }
623
624 export interface Shipping {
625 address?: Address;
626
627 /**
628 * The delivery service that shipped a physical product, such as Fedex, UPS, USPS, etc.
629 */
630 carrier?: string | null;
631
632 /**
633 * Recipient name.
634 */
635 name?: string | null;
636
637 /**
638 * Recipient phone (including extension).
639 */
640 phone?: string | null;
641
642 /**
643 * The tracking number for a physical product, obtained from the delivery service. If multiple tracking numbers were generated for this purchase, please separate them with commas.
644 */
645 tracking_number?: string | null;
646 }
647 }
648
649 export interface ThreeDSecure {
650 address_line1_check?: string | null;
651
652 address_zip_check?: string | null;
653
654 authenticated?: boolean | null;
655
656 brand?: string | null;
657
658 card?: string | null;
659
660 country?: string | null;
661
662 customer?: string | null;
663
664 cvc_check?: string | null;
665
666 description?: string;
667
668 dynamic_last4?: string | null;
669
670 exp_month?: number | null;
671
672 exp_year?: number | null;
673
674 fingerprint?: string;
675
676 funding?: string | null;
677
678 iin?: string;
679
680 issuer?: string;
681
682 last4?: string | null;
683
684 name?: string | null;
685
686 three_d_secure?: string;
687
688 tokenization_method?: string | null;
689 }
690
691 export type Type =
692 | 'ach_credit_transfer'
693 | 'ach_debit'
694 | 'acss_debit'
695 | 'alipay'
696 | 'au_becs_debit'
697 | 'bancontact'
698 | 'card'
699 | 'card_present'
700 | 'eps'
701 | 'giropay'
702 | 'ideal'
703 | 'klarna'
704 | 'multibanco'
705 | 'p24'
706 | 'sepa_credit_transfer'
707 | 'sepa_debit'
708 | 'sofort'
709 | 'three_d_secure'
710 | 'wechat';
711
712 export interface Wechat {
713 prepay_id?: string;
714
715 qr_code_url?: string | null;
716
717 statement_descriptor?: string;
718 }
719}
720
721export interface SourceCreateParams {
722 /**
723 * Amount associated with the source. This is the amount for which the source will be chargeable once ready. Required for `single_use` sources. Not supported for `receiver` type sources, where charge amount may not be specified until funds land.
724 */
725 amount?: number;
726
727 /**
728 * Three-letter [ISO code for the currency](https://stripe.com/docs/currencies) associated with the source. This is the currency for which the source will be chargeable once ready.
729 */
730 currency?: string;
731
732 /**
733 * The `Customer` to whom the original source is attached to. Must be set when the original source is not a `Source` (e.g., `Card`).
734 */
735 customer?: string;
736
737 /**
738 * Specifies which fields in the response should be expanded.
739 */
740 expand?: Array<string>;
741
742 /**
743 * The authentication `flow` of the source to create. `flow` is one of `redirect`, `receiver`, `code_verification`, `none`. It is generally inferred unless a type supports multiple flows.
744 */
745 flow?: SourceCreateParams.Flow;
746
747 /**
748 * Information about a mandate possibility attached to a source object (generally for bank debits) as well as its acceptance status.
749 */
750 mandate?: SourceCreateParams.Mandate;
751
752 metadata?: MetadataParam;
753
754 /**
755 * The source to share.
756 */
757 original_source?: string;
758
759 /**
760 * Information about the owner of the payment instrument that may be used or required by particular source types.
761 */
762 owner?: SourceCreateParams.Owner;
763
764 /**
765 * Optional parameters for the receiver flow. Can be set only if the source is a receiver (`flow` is `receiver`).
766 */
767 receiver?: SourceCreateParams.Receiver;
768
769 /**
770 * Parameters required for the redirect flow. Required if the source is authenticated by a redirect (`flow` is `redirect`).
771 */
772 redirect?: SourceCreateParams.Redirect;
773
774 /**
775 * Information about the items and shipping associated with the source. Required for transactional credit (for example Klarna) sources before you can charge it.
776 */
777 source_order?: SourceCreateParams.SourceOrder;
778
779 /**
780 * An arbitrary string to be displayed on your customer's statement. As an example, if your website is `RunClub` and the item you're charging for is a race ticket, you may want to specify a `statement_descriptor` of `RunClub 5K race ticket.` While many payment types will display this information, some may not display it at all.
781 */
782 statement_descriptor?: string;
783
784 /**
785 * An optional token used to create the source. When passed, token properties will override source parameters.
786 */
787 token?: string;
788
789 /**
790 * The `type` of the source to create. Required unless `customer` and `original_source` are specified (see the [Cloning card Sources](https://stripe.com/docs/sources/connect#cloning-card-sources) guide)
791 */
792 type?: string;
793
794 usage?: SourceCreateParams.Usage;
795}
796
797export namespace SourceCreateParams {
798 export type Flow = 'code_verification' | 'none' | 'receiver' | 'redirect';
799
800 export interface Mandate {
801 /**
802 * The parameters required to notify Stripe of a mandate acceptance or refusal by the customer.
803 */
804 acceptance?: Mandate.Acceptance;
805
806 /**
807 * The amount specified by the mandate. (Leave null for a mandate covering all amounts)
808 */
809 amount?: number | '';
810
811 /**
812 * The currency specified by the mandate. (Must match `currency` of the source)
813 */
814 currency?: string;
815
816 /**
817 * The interval of debits permitted by the mandate. Either `one_time` (just permitting a single debit), `scheduled` (with debits on an agreed schedule or for clearly-defined events), or `variable`(for debits with any frequency)
818 */
819 interval?: Mandate.Interval;
820
821 /**
822 * The method Stripe should use to notify the customer of upcoming debit instructions and/or mandate confirmation as required by the underlying debit network. Either `email` (an email is sent directly to the customer), `manual` (a `source.mandate_notification` event is sent to your webhooks endpoint and you should handle the notification) or `none` (the underlying debit network does not require any notification).
823 */
824 notification_method?: Mandate.NotificationMethod;
825 }
826
827 export namespace Mandate {
828 export interface Acceptance {
829 /**
830 * The Unix timestamp (in seconds) when the mandate was accepted or refused by the customer.
831 */
832 date?: number;
833
834 /**
835 * The IP address from which the mandate was accepted or refused by the customer.
836 */
837 ip?: string;
838
839 /**
840 * The parameters required to store a mandate accepted offline. Should only be set if `mandate[type]` is `offline`
841 */
842 offline?: Acceptance.Offline;
843
844 /**
845 * The parameters required to store a mandate accepted online. Should only be set if `mandate[type]` is `online`
846 */
847 online?: Acceptance.Online;
848
849 /**
850 * The status of the mandate acceptance. Either `accepted` (the mandate was accepted) or `refused` (the mandate was refused).
851 */
852 status: Acceptance.Status;
853
854 /**
855 * The type of acceptance information included with the mandate. Either `online` or `offline`
856 */
857 type?: Acceptance.Type;
858
859 /**
860 * The user agent of the browser from which the mandate was accepted or refused by the customer.
861 */
862 user_agent?: string;
863 }
864
865 export namespace Acceptance {
866 export interface Offline {
867 /**
868 * An email to contact you with if a copy of the mandate is requested, required if `type` is `offline`.
869 */
870 contact_email: string;
871 }
872
873 export interface Online {
874 /**
875 * The Unix timestamp (in seconds) when the mandate was accepted or refused by the customer.
876 */
877 date?: number;
878
879 /**
880 * The IP address from which the mandate was accepted or refused by the customer.
881 */
882 ip?: string;
883
884 /**
885 * The user agent of the browser from which the mandate was accepted or refused by the customer.
886 */
887 user_agent?: string;
888 }
889
890 export type Status = 'accepted' | 'pending' | 'refused' | 'revoked';
891
892 export type Type = 'offline' | 'online';
893 }
894
895 export type Interval = 'one_time' | 'scheduled' | 'variable';
896
897 export type NotificationMethod =
898 | 'deprecated_none'
899 | 'email'
900 | 'manual'
901 | 'none'
902 | 'stripe_email';
903 }
904
905 export interface Owner {
906 /**
907 * Owner's address.
908 */
909 address?: Owner.Address;
910
911 /**
912 * Owner's email address.
913 */
914 email?: string;
915
916 /**
917 * Owner's full name.
918 */
919 name?: string;
920
921 /**
922 * Owner's phone number.
923 */
924 phone?: string;
925 }
926
927 export namespace Owner {
928 export interface Address {
929 /**
930 * City, district, suburb, town, or village.
931 */
932 city?: string;
933
934 /**
935 * Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)).
936 */
937 country?: string;
938
939 /**
940 * Address line 1 (e.g., street, PO Box, or company name).
941 */
942 line1?: string;
943
944 /**
945 * Address line 2 (e.g., apartment, suite, unit, or building).
946 */
947 line2?: string;
948
949 /**
950 * ZIP or postal code.
951 */
952 postal_code?: string;
953
954 /**
955 * State, county, province, or region.
956 */
957 state?: string;
958 }
959 }
960
961 export interface Receiver {
962 /**
963 * The method Stripe should use to request information needed to process a refund or mispayment. Either `email` (an email is sent directly to the customer) or `manual` (a `source.refund_attributes_required` event is sent to your webhooks endpoint). Refer to each payment method's documentation to learn which refund attributes may be required.
964 */
965 refund_attributes_method?: Receiver.RefundAttributesMethod;
966 }
967
968 export namespace Receiver {
969 export type RefundAttributesMethod = 'email' | 'manual' | 'none';
970 }
971
972 export interface Redirect {
973 /**
974 * The URL you provide to redirect the customer back to you after they authenticated their payment. It can use your application URI scheme in the context of a mobile application.
975 */
976 return_url: string;
977 }
978
979 export interface SourceOrder {
980 /**
981 * List of items constituting the order.
982 */
983 items?: Array<SourceOrder.Item>;
984
985 /**
986 * Shipping address for the order. Required if any of the SKUs are for products that have `shippable` set to true.
987 */
988 shipping?: SourceOrder.Shipping;
989 }
990
991 export namespace SourceOrder {
992 export interface Item {
993 amount?: number;
994
995 currency?: string;
996
997 description?: string;
998
999 /**
1000 * The ID of the SKU being ordered.
1001 */
1002 parent?: string;
1003
1004 /**
1005 * The quantity of this order item. When type is `sku`, this is the number of instances of the SKU to be ordered.
1006 */
1007 quantity?: number;
1008
1009 type?: Item.Type;
1010 }
1011
1012 export namespace Item {
1013 export type Type = 'discount' | 'shipping' | 'sku' | 'tax';
1014 }
1015
1016 export interface Shipping {
1017 /**
1018 * Shipping address.
1019 */
1020 address: AddressParam;
1021
1022 /**
1023 * The delivery service that shipped a physical product, such as Fedex, UPS, USPS, etc.
1024 */
1025 carrier?: string;
1026
1027 /**
1028 * Recipient name.
1029 */
1030 name?: string;
1031
1032 /**
1033 * Recipient phone (including extension).
1034 */
1035 phone?: string;
1036
1037 /**
1038 * The tracking number for a physical product, obtained from the delivery service. If multiple tracking numbers were generated for this purchase, please separate them with commas.
1039 */
1040 tracking_number?: string;
1041 }
1042 }
1043
1044 export type Usage = 'reusable' | 'single_use';
1045}