Update an instance of payments with different phases of payment flows
Twilio enabled secure payments solution for accepting credit and ACH payments over the phone.
update an instance of payments with different phases of payment flows.
Path parameters
-
The SID of the Account that will update the resource.
-
The SID of the call that will update the resource. This should be the same call sid that was used to create payments resource.
-
The SID of Payments session that needs to be updated.
Body
-
Capture string
The piece of payment information that you wish the caller to enter. Must be one of
payment-card-number
,expiration-date
,security-code
,postal-code
,bank-routing-number
, orbank-account-number
.Values are
payment-card-number
,expiration-date
,security-code
,postal-code
,bank-routing-number
, orbank-account-number
. -
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.
-
Status string
Indicates whether the current payment session should be cancelled or completed. When
cancel
the payment session is cancelled. Whencomplete
, Twilio sends the payment information to the selectedconnector for processing. Values are
complete
orcancel
. -
Provide an absolute or relative URL to receive status updates regarding your Pay session. Read more about the Update and Complete/Cancel POST requests.
curl \
-X POST https://api.twilio.com/2010-04-01/Accounts/{AccountSid}/Calls/{CallSid}/Payments/{Sid}.json \
--user "username:password" \
-H "Content-Type: application/x-www-form-urlencoded" \
-d 'Capture=payment-card-number&IdempotencyKey=string&Status=complete&StatusCallback=https%3A%2F%2Fexample.com'
{
"Capture": "payment-card-number",
"IdempotencyKey": "string",
"Status": "complete",
"StatusCallback": "https://example.com"
}
{
"Capture": "payment-card-number",
"IdempotencyKey": "string",
"Status": "complete",
"StatusCallback": "https://example.com"
}
{
"account_sid": "string",
"call_sid": "string",
"date_created": "string",
"date_updated": "string",
"sid": "string",
"uri": "https://example.com"
}
{
"account_sid": "string",
"call_sid": "string",
"date_created": "string",
"date_updated": "string",
"sid": "string",
"uri": "https://example.com"
}