| Environment | Method | Endpoint |
|---|---|---|
| Sandbox | put | https://apisandbox.braspag.com.br/v2/RecurrentPayment/{RecurrentPaymentId}/Payment |
| Production | put | https://api.braspag.com.br/v2/RecurrentPayment/{RecurrentPaymentId}/Payment |
During the recurrence lifecycle, it is possible to update:
- Acquirer (e.g., from Rede to Cielo)
- Card (in case of an expired card)
This update affects all data in the "Payment" node. To keep previous data, you must provide these fields using the already saved values to be retained.
Request
put https://apisandbox.braspag.com.br/v2/RecurrentPayment/{RecurrentPaymentId}/Payment
{
"Type":"CreditCard",
"Amount":"20000",
"Installments":3,
"Country":"USA",
"Currency":"USD",
"SoftDescriptor":"Mensagem",
"Provider":"Simulado",
"CreditCard":{
"Brand":"Master",
"Holder":"Nome do Portador",
"CardNumber":"5412217070050381",
"ExpirationDate":"05/2019"
},
"Credentials": {
"Code": "9999999",
"Key": "D8888888",
"Password": "LOJA9999999",
"Username": "#Braspag2018@NOMEDALOJA#",
"Signature": "001"
}
}--request PUT "https://apisandbox.braspag.com.br/v2/RecurrentPayment/{RecurrentPaymentId}/Payment"
--header "Content-Type: application/json"
--header "MerchantId: xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
--header "MerchantKey: 0123456789012345678901234567890123456789"
--header "RequestId: xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
--data-binary
{
"Type":"CreditCard",
"Amount":"20000",
"Installments":3,
"Country":"USA",
"Currency":"USD",
"SoftDescriptor":"Mensagem",
"Provider":"Simulado",
"CreditCard":{
"Brand":"Master",
"Holder":"Nome do Portador",
"CardNumber":"5412217070050381",
"ExpirationDate":"05/2019"
},
"Credentials": {
"Code": "9999999",
"Key": "D8888888",
"Password": "LOJA9999999",
"Username": "#Braspag2018@NOMEDALOJA#",
"Signature": "001"
}
}
--verboseBelow are the header field properties for this request:
| Property (header) | Type | Size | Required | Description |
|---|---|---|---|---|
MerchantId | Guid | 36 | Yes | Merchant identifier in Split de Pagamento |
MerchantKey | Text | 40 | Yes | Public key for Dual Authentication in Split de Pagamento |
Content-Type | Header | 40 | Yes | Application/json |
RequestId | GUID | 36 | No | Request identifier defined by the merchant, used when the merchant uses different servers for each GET/POST/PUT request. |
| Property (body) | Description | Type | Size | Required? |
|---|---|---|---|---|
RecurrentPaymentId | Recurrence identification number. | Text | 50 | Yes (sent in the endpoint) |
Provider | Payment method provider name. | Text | 15 | Yes |
Type | Payment method type. | Text | 100 | Yes |
Amount | Order amount, in cents. | Number | 15 | Yes |
Installments | Number of installments. | Number | 2 | Yes |
SoftDescriptor | Text that will appear on the cardholder's statement. | Text | 13 | No |
CreditCard.CardNumber | Shopper's card number. | Text | 16 | Yes |
CreditCard.Holder | Shopper's name printed on the card. Note: Field size rules may vary depending on the acquirer. | Text | 25 | Yes |
CreditCard.ExpirationDate | Expiration date printed on the card. | Text | 7 | Yes |
CreditCard.SecurityCode | Security code printed on the back of the card. | Text | 4 | Yes |
CreditCard.Brand | Card brand. | Text | 10 | Yes |
Credentials.Code | Affiliation generated by the acquirer. | Text | 100 | Conditional* |
Credentials.Key | Affiliation key/token generated by the acquirer. | Text | 100 | Conditional* |
Credentials.Username | Username generated during onboarding with the acquirer (providers such as Rede and Getnet use username and password in communications, so this field must be sent). | Text | 50 | Conditional* |
Credentials.Password | Password generated during onboarding with the acquirer (providers such as Rede and Getnet use username and password in communications, so this field must be sent). | Text | 50 | Conditional* |
Credentials.Signature | Send the acquirer Global Payments TerminalID (e.g., 001). For Safra, provide the merchant name, city, and state concatenated with semicolons ";". Example: StoreName;São Paulo;SP. | Text | -- | Conditional* |
- **Required if the affiliation is not preconfigured in the payment methods of the
MerchantIDused.- In the sandbox environment using the Simulated provider, it is not necessary to send the
Credentialsnode.
Resppnse
HTTP Status 200Refer to the HTTP status codes list to see all status codes that may be returned by the API.