github.com/twilio/twilio-go@v1.20.1/rest/api/v2010/docs/AccountsCallsPaymentsApi.md (about) 1 # AccountsCallsPaymentsApi 2 3 All URIs are relative to *https://api.twilio.com* 4 5 Method | HTTP request | Description 6 ------------- | ------------- | ------------- 7 [**CreatePayments**](AccountsCallsPaymentsApi.md#CreatePayments) | **Post** /2010-04-01/Accounts/{AccountSid}/Calls/{CallSid}/Payments.json | 8 [**UpdatePayments**](AccountsCallsPaymentsApi.md#UpdatePayments) | **Post** /2010-04-01/Accounts/{AccountSid}/Calls/{CallSid}/Payments/{Sid}.json | 9 10 11 12 ## CreatePayments 13 14 > ApiV2010Payments CreatePayments(ctx, CallSidoptional) 15 16 17 18 create an instance of payments. This will start a new payments session 19 20 ### Path Parameters 21 22 23 Name | Type | Description 24 ------------- | ------------- | ------------- 25 **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. 26 **CallSid** | **string** | The SID of the call that will create the resource. Call leg associated with this sid is expected to provide payment information thru DTMF. 27 28 ### Other Parameters 29 30 Other parameters are passed through a pointer to a CreatePaymentsParams struct 31 32 33 Name | Type | Description 34 ------------- | ------------- | ------------- 35 **PathAccountSid** | **string** | The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that will create the resource. 36 **IdempotencyKey** | **string** | A unique token that will be used to ensure that multiple API calls with the same information do not result in multiple transactions. This should be a unique string value per API call and can be a randomly generated. 37 **StatusCallback** | **string** | Provide an absolute or relative URL to receive status updates regarding your Pay session. Read more about the [expected StatusCallback values](https://www.twilio.com/docs/voice/api/payment-resource#statuscallback) 38 **BankAccountType** | **string** | 39 **ChargeAmount** | **float32** | A positive decimal value less than 1,000,000 to charge against the credit card or bank account. Default currency can be overwritten with `currency` field. Leave blank or set to 0 to tokenize. 40 **Currency** | **string** | The currency of the `charge_amount`, formatted as [ISO 4127](http://www.iso.org/iso/home/standards/currency_codes.htm) format. The default value is `USD` and all values allowed from the Pay Connector are accepted. 41 **Description** | **string** | The description can be used to provide more details regarding the transaction. This information is submitted along with the payment details to the Payment Connector which are then posted on the transactions. 42 **Input** | **string** | A list of inputs that should be accepted. Currently only `dtmf` is supported. All digits captured during a pay session are redacted from the logs. 43 **MinPostalCodeLength** | **int** | A positive integer that is used to validate the length of the `PostalCode` inputted by the user. User must enter this many digits. 44 **Parameter** | [**interface{}**](interface{}.md) | A single-level JSON object used to pass custom parameters to payment processors. (Required for ACH payments). The information that has to be included here depends on the <Pay> Connector. [Read more](https://www.twilio.com/console/voice/pay-connectors). 45 **PaymentConnector** | **string** | This is the unique name corresponding to the Pay Connector installed in the Twilio Add-ons. Learn more about [<Pay> Connectors](https://www.twilio.com/console/voice/pay-connectors). The default value is `Default`. 46 **PaymentMethod** | **string** | 47 **PostalCode** | **bool** | Indicates whether the credit card postal code (zip code) is a required piece of payment information that must be provided by the caller. The default is `true`. 48 **SecurityCode** | **bool** | Indicates whether the credit card security code is a required piece of payment information that must be provided by the caller. The default is `true`. 49 **Timeout** | **int** | The number of seconds that <Pay> should wait for the caller to press a digit between each subsequent digit, after the first one, before moving on to validate the digits captured. The default is `5`, maximum is `600`. 50 **TokenType** | **string** | 51 **ValidCardTypes** | **string** | Credit card types separated by space that Pay should accept. The default value is `visa mastercard amex` 52 53 ### Return type 54 55 [**ApiV2010Payments**](ApiV2010Payments.md) 56 57 ### Authorization 58 59 [accountSid_authToken](../README.md#accountSid_authToken) 60 61 ### HTTP request headers 62 63 - **Content-Type**: application/x-www-form-urlencoded 64 - **Accept**: application/json 65 66 [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) 67 [[Back to Model list]](../README.md#documentation-for-models) 68 [[Back to README]](../README.md) 69 70 71 ## UpdatePayments 72 73 > ApiV2010Payments UpdatePayments(ctx, CallSidSidoptional) 74 75 76 77 update an instance of payments with different phases of payment flows. 78 79 ### Path Parameters 80 81 82 Name | Type | Description 83 ------------- | ------------- | ------------- 84 **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. 85 **CallSid** | **string** | The SID of the call that will update the resource. This should be the same call sid that was used to create payments resource. 86 **Sid** | **string** | The SID of Payments session that needs to be updated. 87 88 ### Other Parameters 89 90 Other parameters are passed through a pointer to a UpdatePaymentsParams struct 91 92 93 Name | Type | Description 94 ------------- | ------------- | ------------- 95 **PathAccountSid** | **string** | The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that will update the resource. 96 **IdempotencyKey** | **string** | A unique token that will be used to ensure that multiple API calls with the same information do not result in multiple transactions. This should be a unique string value per API call and can be a randomly generated. 97 **StatusCallback** | **string** | Provide an absolute or relative URL to receive status updates regarding your Pay session. Read more about the [Update](https://www.twilio.com/docs/voice/api/payment-resource#statuscallback-update) and [Complete/Cancel](https://www.twilio.com/docs/voice/api/payment-resource#statuscallback-cancelcomplete) POST requests. 98 **Capture** | **string** | 99 **Status** | **string** | 100 101 ### Return type 102 103 [**ApiV2010Payments**](ApiV2010Payments.md) 104 105 ### Authorization 106 107 [accountSid_authToken](../README.md#accountSid_authToken) 108 109 ### HTTP request headers 110 111 - **Content-Type**: application/x-www-form-urlencoded 112 - **Accept**: application/json 113 114 [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) 115 [[Back to Model list]](../README.md#documentation-for-models) 116 [[Back to README]](../README.md) 117